Professional Web Applications Themes

What's wrong... - PHP Development

Here is my code: if ($doit == okmodifier) { $sid = $HTTP_POST_VARS['sid']; $nommod = $HTTP_POST_VARS['nommod']; $nintro = $HTTP_POST_VARS['introduction']; $niouzemod = $HTTP_POST_VARS['niouzemod']; ?> <center><b>LA NOUVELLE A ETE MODIFIE!</b></center><BR><BR> <b>Nom de votre nouvelle:</b> <?echo "$nommod";?><br> <b>Votre Introduction:</b><br> <?echo "$nintro";?><br><br> <b>Votre Nouvelles:</b><br> <?echo "$niouzemod";?> <? $db = mysql_connect ("$dbhost", "$dblogin", "$dbpass"); mysql_select_db ("$database", $db); mysql_query("UPDATE barfi_niouze SET nom='$nommod', niouze='$niouzemod', intro='$nintro' WHERE id='$sid'"); } ?> ?? I really dont understand what im doing wrong... Phil...

  1. #1

    Default What's wrong...

    Here is my code:

    if ($doit == okmodifier) {
    $sid = $HTTP_POST_VARS['sid'];
    $nommod = $HTTP_POST_VARS['nommod'];
    $nintro = $HTTP_POST_VARS['introduction'];
    $niouzemod = $HTTP_POST_VARS['niouzemod'];
    ?>
    <center><b>LA NOUVELLE A ETE MODIFIE!</b></center><BR><BR>
    <b>Nom de votre nouvelle:</b> <?echo "$nommod";?><br>
    <b>Votre Introduction:</b><br>
    <?echo "$nintro";?><br><br>
    <b>Votre Nouvelles:</b><br>
    <?echo "$niouzemod";?>

    <?
    $db = mysql_connect ("$dbhost", "$dblogin", "$dbpass");
    mysql_select_db ("$database", $db);
    mysql_query("UPDATE barfi_niouze SET nom='$nommod', niouze='$niouzemod',
    intro='$nintro' WHERE id='$sid'");
    }
    ?>


    ??
    I really dont understand what im doing wrong...


    Phil

    Philippe Robert Guest

  2. #2

    Default Re: What's wrong...

    Whats the error message?

    use <?php to open tags, I see you dont have any opening php tag at the
    start?

    Also, check the positioning of your { and }
    You have the opening one in one chunk of PHP, and the closing one in
    another?

    "Philippe Robert" <spam_barfisympatico.ca> wrote in message
    news:lXcub.4896$ZF1.551287news20.bellglobal.com.. .
    > Here is my code:
    >
    > if ($doit == okmodifier) {
    > $sid = $HTTP_POST_VARS['sid'];
    > $nommod = $HTTP_POST_VARS['nommod'];
    > $nintro = $HTTP_POST_VARS['introduction'];
    > $niouzemod = $HTTP_POST_VARS['niouzemod'];
    > ?>
    > <center><b>LA NOUVELLE A ETE MODIFIE!</b></center><BR><BR>
    > <b>Nom de votre nouvelle:</b> <?echo "$nommod";?><br>
    > <b>Votre Introduction:</b><br>
    > <?echo "$nintro";?><br><br>
    > <b>Votre Nouvelles:</b><br>
    > <?echo "$niouzemod";?>
    >
    > <?
    > $db = mysql_connect ("$dbhost", "$dblogin", "$dbpass");
    > mysql_select_db ("$database", $db);
    > mysql_query("UPDATE barfi_niouze SET nom='$nommod', niouze='$niouzemod',
    > intro='$nintro' WHERE id='$sid'");
    > }
    > ?>
    >
    >
    > ??
    > I really dont understand what im doing wrong...
    >
    >
    > Phil
    >

    DM Guest

  3. #3

    Default Re: What's wrong...

    Hi,

    there is the problem... Everything works fine but the mysql UPDATE dont
    work... The data base isn't updated... But I have no mySQL error...
    Database, login, password are set and the connection to the mysql
    database work fine.

    Phil

    DM wrote:
    > Whats the error message?
    >
    > use <?php to open tags, I see you dont have any opening php tag at the
    > start?
    >
    > Also, check the positioning of your { and }
    > You have the opening one in one chunk of PHP, and the closing one in
    > another?
    >
    > "Philippe Robert" <spam_barfisympatico.ca> wrote in message
    > news:lXcub.4896$ZF1.551287news20.bellglobal.com.. .
    >
    >>Here is my code:
    >>
    >>if ($doit == okmodifier) {
    >>$sid = $HTTP_POST_VARS['sid'];
    >>$nommod = $HTTP_POST_VARS['nommod'];
    >>$nintro = $HTTP_POST_VARS['introduction'];
    >>$niouzemod = $HTTP_POST_VARS['niouzemod'];
    >>?>
    >><center><b>LA NOUVELLE A ETE MODIFIE!</b></center><BR><BR>
    >><b>Nom de votre nouvelle:</b> <?echo "$nommod";?><br>
    >><b>Votre Introduction:</b><br>
    >><?echo "$nintro";?><br><br>
    >><b>Votre Nouvelles:</b><br>
    >><?echo "$niouzemod";?>
    >>
    >> <?
    >> $db = mysql_connect ("$dbhost", "$dblogin", "$dbpass");
    >>mysql_select_db ("$database", $db);
    >>mysql_query("UPDATE barfi_niouze SET nom='$nommod', niouze='$niouzemod',
    >> intro='$nintro' WHERE id='$sid'");
    >>}
    >> ?>
    >>
    >>
    >>??
    >>I really dont understand what im doing wrong...
    >>
    >>
    >>Phil
    >>
    >
    >
    >
    Philippe Robert Guest

  4. #4

    Default Re: What's wrong...

    Philippe Robert wrote:
    -> Subject "What's Wrong"

    For a minute there, you sounded like my wife.


    Disco Octopus Guest

  5. #5

    Default Re: What's wrong...

    On 2003-11-18, Philippe Robert <spam_barfisympatico.ca> wrote:

    Changed the quote order a little

    A: I don't know :P
    Q: Why do people think that writing an answer above a question is nice?
    >>>Here is my code:
    >>>
    >>>if ($doit == okmodifier) {
    Where comes $doit from? What is okmodifier?
    >>>$sid = $HTTP_POST_VARS['sid'];
    >>>$nommod = $HTTP_POST_VARS['nommod'];
    >>>$nintro = $HTTP_POST_VARS['introduction'];
    >>>$niouzemod = $HTTP_POST_VARS['niouzemod'];
    >>>?>
    >>> <?
    >>> $db = mysql_connect ("$dbhost", "$dblogin", "$dbpass");
    >>>mysql_select_db ("$database", $db);
    >>>mysql_query("UPDATE barfi_niouze SET nom='$nommod', niouze='$niouzemod',
    >>> intro='$nintro' WHERE id='$sid'");
    echo ' I ran a query , hurray';
    >>>}
    else {
    echo 'I did not run a query, bOO';
    }
    >>> ?>

    --
    My jabber handle is [email]aardbeijabber.org[/email]
    Tim Van Wassenhove Guest

  6. #6

    Default Re: What's wrong...

    intead of queerying your database, try printing the suery-string on the
    screen, using a die("$query"); or so.
    Drop the output it into mysql-front and read the SQL message
    That'll help you pinpointing your error.
    A wrong type-entry for a field does not always produce an error, but
    prevents the record being updated.

    Regards,

    Michel




    "Philippe Robert" <spam_barfisympatico.ca> wrote in message
    news:Btdub.4910$ZF1.566692news20.bellglobal.com.. .
    > Hi,
    >
    > there is the problem... Everything works fine but the mysql UPDATE dont
    > work... The data base isn't updated... But I have no mySQL error...
    > Database, login, password are set and the connection to the mysql
    > database work fine.
    >
    > Phil
    >
    > DM wrote:
    >
    > > Whats the error message?
    > >
    > > use <?php to open tags, I see you dont have any opening php tag at the
    > > start?
    > >
    > > Also, check the positioning of your { and }
    > > You have the opening one in one chunk of PHP, and the closing one in
    > > another?
    > >
    > > "Philippe Robert" <spam_barfisympatico.ca> wrote in message
    > > news:lXcub.4896$ZF1.551287news20.bellglobal.com.. .
    > >
    > >>Here is my code:
    > >>
    > >>if ($doit == okmodifier) {
    > >>$sid = $HTTP_POST_VARS['sid'];
    > >>$nommod = $HTTP_POST_VARS['nommod'];
    > >>$nintro = $HTTP_POST_VARS['introduction'];
    > >>$niouzemod = $HTTP_POST_VARS['niouzemod'];
    > >>?>
    > >><center><b>LA NOUVELLE A ETE MODIFIE!</b></center><BR><BR>
    > >><b>Nom de votre nouvelle:</b> <?echo "$nommod";?><br>
    > >><b>Votre Introduction:</b><br>
    > >><?echo "$nintro";?><br><br>
    > >><b>Votre Nouvelles:</b><br>
    > >><?echo "$niouzemod";?>
    > >>
    > >> <?
    > >> $db = mysql_connect ("$dbhost", "$dblogin", "$dbpass");
    > >>mysql_select_db ("$database", $db);
    > >>mysql_query("UPDATE barfi_niouze SET nom='$nommod', niouze='$niouzemod',
    > >> intro='$nintro' WHERE id='$sid'");
    > >>}
    > >> ?>
    > >>
    > >>
    > >>??
    > >>I really dont understand what im doing wrong...
    > >>
    > >>
    > >>Phil
    > >>
    > >
    > >
    > >
    >

    Michel Guest

Similar Threads

  1. what is wrong
    By SLext in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: July 21st, 09:37 AM
  2. What am I doing wrong?
    By Aaron Bertrand - MVP in forum ASP Database
    Replies: 34
    Last Post: January 23rd, 11:01 PM
  3. What am I doing wrong???!?!
    By bfinelsen in forum Coldfusion Database Access
    Replies: 2
    Last Post: June 30th, 03:24 PM
  4. what is wrong here?
    By The Lone Wolf in forum PHP Development
    Replies: 1
    Last Post: October 5th, 08:49 PM
  5. [PHP] What is wrong??????
    By David Nicholson in forum PHP Development
    Replies: 1
    Last Post: July 14th, 07:27 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139