Jump to content

Sw0rDz

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Sw0rDz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I used this following script to make a review page.. It didn't work and came up with the following error <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <?php $self = $_POST['PHP_SELF']; $name = $_POST['nick']; $game = $_POST['game']; $review = $_POST['review']; #the html form $form = "<form action=\"self\" methd=\"post\">"; $form.= "Nick: <input type=\"text\" name=\"nick\" "; $form.= "size=\"50\" value=\"name\"> <br>"; $form.= "Game: <input type=\"text\" name=\"game\" "; $form.= "size=\"50\" value=\"game\"> <br>"; $form.= "Review: <br>"; $form.= "textare name=\"review\" cols=\"45\" "; $form.= "rows=\"4\">$review</textarea> <br>"; $form.= "<input type=\"submit\" name=\"submit\" "; $form.= "value=\"add\"> </form>"; #on first opening display the form if( !$submit) { $msg = $form; } #or redisplay a message and the form if incomplete else if( !$nick or !$game or !$review) { $msg = "<b>Please comlete all fields</b><br><br>"; $msg.= $form; } #or add the form data to the review database table else #otherwise connect to mysql { $conn = @mysql_connect( "localhost", "sw0rdz", "Mysecret" ) or die( "could not connect to database"; ); #select the database $rs = @mysql_select_db( "sw0rdz_nintendoplace", $conn ) or die ( "could no select database" ); #create the sql query if( $name and $review ) { $sql ="insert into reviews (nick, game, review) values(\"$nick\",\"#$game\",\"review\")"; $rs = @mysql_query( $sql, $conn ) or die ( "could not execute sql query" ); } #confrim entry and display a link to view review if ($rs) { $msg = "<h3>Thank you - your enty has been saved."; $msg.= "<br><a hred =\"index\">"; $msg.= "Go hom</a></h3>"; } } #write the page echo( $msg ); ?> </body> </html> the error Parse error: parse error, unexpected ';' in /usr/home/sw0rdz/domains/nintendoplace.com/public_html/review.php on line 38 The page is at Review if its not to hard please help..
×
×
  • 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.