Linera Posted September 5, 2006 Share Posted September 5, 2006 This script will not display the form: <?php$self = $_SERVER['PHP_SELF'];$name = $_POST['moviename'];$genre = $_POST['moviegenre'];$year = $_POST['movieyear'];if( ( !$name ) or ( !$genre ) or ( !$year ) ){$form ="Please enter all new movie details..."$form.="<form action=\"$self\"";$form.=" method=\"post\">Movie's Title: ";$form.="<input type=\"text\" name=\"moviename\"";$form.=" value=\"$name\"><br>Genre: ";$form.="<select name=\"moviegenre\" size=\"1\">";$form.="<option value=\"Action/Adventure\">Action/Adventure</option>";$form.="<option value=\"Adaptation\">Adaptation</option>";$form.="<option value=\"Animation\">Animation</option>";$form.="<option value=\"Art/Foreign\">Art/Foreign</option>";$form.="<option value=\"Biopic\">Biopic</option>";$form.="<option value=\"Classics\">Classics</option>";$form.="<option value=\"Comedy\">Comedy</option>";$form.="<option value=\"Crime/Gangster\">Crime/Gangster</option>";$form.="<option value=\"Documentary\">Documentary</option>";$form.="<option value=\"Drama\">Drama</option>";$form.="<option value=\"Features\">Features</option>";$form.="<option value=\"Holiday\">Holiday</option>";$form.="<option value=\"Kids/Family\">Kids/Family</option>";$form.="<option value=\"Miscellaneous\">Miscellaneous</option>";$form.="<option value="Musical/Performing Arts"\>Musical/Performing Arts</option>";$form.="<option value=\"Politics/Religion\">Politics/Religion</option>";$form.="<option value=\"Remake\">Remake</option>";$form.="<option value=\"Romance\">Romance</option>";$form.="<option value=\"Science Fiction/Fantasy\">Science Fiction/Fantasy</option>";$form.="<option value=\"Sequel\">Sequel</option>";$form.="<option value=\"Special Interest\">Special Interest</option>";$form.="<option value=\"Sports\">Sports</option>";$form.="<option value=\"Suspense/Horror\">Suspense/Horror</option>";$form.="<option value=\"Teen\">Teen</option>";$form.="<option value=\"Thriller\">Thriller</option>";$form.="<option value=\"War\">War</option>";$form.="<option value=\"Western\">Western</option>";$form.="</select>";$form.="<br>Year: ";$form.="<input type=\"text\" name=\"movieyear\"";$form.=" value=\"$year\"><br>";$form.="<input type=\"submit\" value=\"Submit\">";$form.="</form>";echo( $form );}?> Link to comment Share on other sites More sharing options...
justsomeguy Posted September 5, 2006 Share Posted September 5, 2006 You left a semicolon off the first line in the IF block, and probably have errors turned off. You should always develop with errors turned on, that way you don't have to sit around and wait for an answer to an easy problem. Link to comment Share on other sites More sharing options...
Linera Posted September 5, 2006 Author Share Posted September 5, 2006 stupid php book shows no ; in the sample script. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now