Jump to content

[SOLVED] Error


zamp0e

Recommended Posts

Hai there, I've just started learning about PHP and I've been spending some time trying to make a vote thing that will display the results.

 

So far I've come up with everything but the actual Updating the database when someone votes. This is the error I'm receiving

 

Parse error: parse error in ************ on line 123

 

<?php

    }

else {

    if (is_array($_POST['design'])) {

        echo 'You selected: <br />';

        foreach ($_POST['design'] as $a) {

          echo "<i>$a</i><br />";

}

  if($a==Stilig)

  {

  UPDATE roster SET antal='1' WHERE id='1'

  }                                      <--- LINE 123!

        }

    else {

        echo 'Nothing selected';

}

   

}

?>

 

 

 

Any help would be appreciated, thanks in advance.

Link to comment
Share on other sites

Thanks alot :) As I said I'm very new to this and everywhere Ive read the Update syntax were written like this:

 

UPDATE Persons

SET Address='Nissestien 67', City='Sandnes'

WHERE LastName='Tjessem' AND FirstName='Jakob'

 

Again, thanks for the help, it worked perfectly.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.