PLS want wrong with my code

Started on the old forum in January 2011 · view the original in the archive · old links redirect here

8 replies · 362 views · started 15 years ago · 1 min read

3 participants
adex3g Developer · 181 posts #1
<?php require_once "header.php"; function Adex_AcAddpchat($username,$pchat,$chatid){ if (!valid_username($username) || !user_exists($username)) { return false; } // now we update the password in the database $query = sprintf("insert into adeyemi_acpchat set name = '%s',ac_chatid = '%s'", mysql_real_escape_string($pchat), mysql_real_escape_string($chatid)); if (mysql_query($query)) { return false; }else {return false;} return false; } function Adex_Acpchat(){ echo '<form action="./adex_acaddpchat.php" method="post"> <input type="hidden" value="'.$_SESSION['username'].'" name="username"> pchat: <input name="chat" type="text" maxlength="15"> '; $cchat = mysql_query("select ac_id,ac_name from adeyemi_acpchat order by ac_id, ac_name"); echo "chat category:<select name=\"chatid\">"; while($chat = mysql_fetch-array($cchat)) { echo '<option value="$chat">$chat[1]</option>'; } echo "</select> <input name=\"chat\" type=\"submit\" value=\"addchat\"> </form>"; } if (isLoggedIn() == true) { if (isset($_POST['chat'])) { if (Adex_AcAddpchat($_POST['username'], $_POST['chat'], $_POST['chatid'])) { echo "chat added! [Return to homepage](#)"; } else { echo "chat failed! Please try again."; Adex_Acpchat(); } } else { Adex_Acpchat(); } } else { // user is not loggedin show_loginform(); } require_once "footer.php"; ?>

pls the above code did not show submit input, what rerror am i have with xhtml/php

have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com

subzero Super moderator Fellow · 3,954 posts #2

What the page showing?

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

adex3g Developer · 181 posts #3

it does not show this submit button not showing the html from here echo '<option value="$chat[0]">$chat[1]</option>'; } echo "</select>

<input name="chat" type="submit" value="addchat">

</form>"; and my $chat[0] and $chat[1] not showing what wrong

have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com

subzero Super moderator Fellow · 3,954 posts #4

What part you think you got wrong

<input type=\"submit\" name=\"chat\"  value=\"addchat\" > |<input type=\"reset\">

Added after 2 minutes:

When you echo ' ';

you can't get the $_GET or $_POST

So by doing this

echo "<option value="$chat[0]">$chat[1]</option>";

or

echo '<option value='".$chat[0]."'>".$chat[1]."</option>';

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

subzero Super moderator Fellow · 3,954 posts #6

check again

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

adex3g Developer · 181 posts #7

Warning: Unexpected character in input: '' (ASCII=92) state=1 in /home/adex3g/public_html/adex_acaddpchat.php on line 32

Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /home/adex3g/public_html/adex_acaddpchat.php on line 32

have connected with http://adexchat.com ? Fun up with http://forum.adexchat.com

subzero Super moderator Fellow · 3,954 posts #8

Weird ...

Ok what you gotten so far?

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

wap2k Developer · 168 posts #9

If you post up your full form i can tell you what is incorrect with the code. You have a \ Where it is not wanted.

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close