Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: php/mysql help

  1. #1
    Join Date
    Mar 2007
    Location
    Portland/dorset
    Posts
    1,568
    Tokens
    0

    Latest Awards:

    Default php/mysql help

    I keep getting
    Parse error: syntax error, unexpected T_VARIABLE in /home/public_html/Ichthus/edituser2.php on line 38

    36-42
    PHP Code:
    <? 
    ($_POST['Save'])
    $username htmlspecialchars($_POST[username]);
    $nick htmlspecialchars($_POST[nickname]);
    $email htmlspecialchars($_POST[email]);
    $money htmlspecialchars($_POST[char_money]);
    $sql = @mysql_query("USERNAME user SET username = '$username', nickname = '$nick', email = '$email', char_money = '$money' WHERE user = '$user'");
    Any ideas

    Lets make the map red again

    T4 on the beach 2009 woo
    Need help PM me Im always happy to help, more then the guys at Asda

  2. #2
    Jy4 Guest

    Default

    Hey,

    I'm not too sure mate, but I hope you fix it so Housekeeping can go up

  3. #3
    Join Date
    Dec 2005
    Posts
    2,992
    Tokens
    1,531

    Latest Awards:

    Default

    Try replacing:

    PHP Code:
    ($_POST['Save']) 
    with:

    PHP Code:
    ($_POST['Save']); 
    Not sure if it'll help.
    That went fast.

  4. #4
    Join Date
    Mar 2007
    Location
    Portland/dorset
    Posts
    1,568
    Tokens
    0

    Latest Awards:

    Default

    no thanks anyway +rep
    Lets make the map red again

    T4 on the beach 2009 woo
    Need help PM me Im always happy to help, more then the guys at Asda

  5. #5
    Join Date
    Mar 2008
    Posts
    173
    Tokens
    0

    Default

    Well, is that supposed to be an if statement at the top? ..

  6. #6
    Join Date
    Mar 2007
    Location
    Portland/dorset
    Posts
    1,568
    Tokens
    0

    Latest Awards:

    Default

    i dont under stand what u r saying
    Lets make the map red again

    T4 on the beach 2009 woo
    Need help PM me Im always happy to help, more then the guys at Asda

  7. #7
    Join Date
    Mar 2008
    Posts
    173
    Tokens
    0

    Default

    Well ($_POST["blabla"]) is nothing, your not definining anything.. or saying anything.

    That probably should be an if statement there. if($_POST["blabla"]) {

  8. #8
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?php
    ($_POST['Save']);
    $username htmlspecialchars($_POST[username]);
    $nick htmlspecialchars($_POST[nickname]);
    $email htmlspecialchars($_POST[email]);
    $money htmlspecialchars($_POST[char_money]);
    $sql = @mysql_query("USERNAME user SET username = '$username', nickname = '$nick', email = '$email', char_money = '$money' WHERE user = '$user'"); 
    ?>
    I tried that on php 5.2.5 and there are no errors
    Lets set the stage on fire, and hollywood will be jealous.

  9. #9
    Join Date
    Mar 2007
    Location
    Portland/dorset
    Posts
    1,568
    Tokens
    0

    Latest Awards:

    Default

    Not working
    Last edited by Jordan,; 08-03-2008 at 10:06 PM.
    Lets make the map red again

    T4 on the beach 2009 woo
    Need help PM me Im always happy to help, more then the guys at Asda

  10. #10

    Default

    Try this:
    PHP Code:
    <?php 
    if ($_POST['Save'])
    {
    $username htmlspecialchars($_POST[username]); 
    $nick htmlspecialchars($_POST[nickname]); 
    $email htmlspecialchars($_POST[email]); 
    $money htmlspecialchars($_POST[char_money]); 
    $sql = @mysql_query("USERNAME user SET username = '$username', nickname = '$nick', email = '$email', char_money = '$money' WHERE user = '$user'");  
    ?>

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •