Results 1 to 5 of 5

Thread: [RESOLVED] SQL query not responding correctly

Threaded View

  1. #1

    Thread Starter
    Addicted Member Jazz00006's Avatar
    Join Date
    Feb 2006
    Posts
    185

    [RESOLVED] SQL query not responding correctly

    heres my code:

    PHP Code:
    $sql ="UPDATE `smf_members` SET 
    `Quote1` = '" 
    $_POST['Quote1'] . "',
    `Quote2` = '" 
    $_POST['Quote2'] . "',
    `Quote3` = '" 
    $_POST['Quote3'] . "' WHERE `ID_MEMBER` =" $_GET['user'] . " LIMIT 1 ;"
    PHP Code:
    <form action="http://sf.greyfyre.info/roed/changequote.php?C=1&user=<?php echo $_GET['user']; ?>" method="post" name="form1" id="form1">
      <label>Quote1
      <input name="Quote1" type="text" id="Quote1" value="<?php
    mysql_close
    ($sql);
    echo 
    $data['Quote1'];
      
    ?>
      " size="40" maxlength="30" />
     
        <label>Quote2
        <input name="Quote2" type="text" id="Quote2" value="<?php
    echo $data['Quote2'];
      
    ?>" size="40" maxlength="30" />

        <label>Quote3
        <input name="Quote3" type="text" id="Quote3" value="<?php
    echo $data['Quote3'];
      
    ?>" size="40" maxlength="30" />
        </label>
      </p>


                <label>Password
                <input name="password" type="password" id="password" />
                </label>

                        <input type="submit" name="Submit" value="Submit" /></p>

    </form>

    and heres my problem, some times the code will update a database, and sometimes it will only change quote3, is it something i am not doing right? (probably is but i thought i would come here first because im still learning php)
    Last edited by Jazz00006; Oct 16th, 2006 at 11:05 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width