Jonathan Harvey Posted April 20, 2010 Share Posted April 20, 2010 Hey If you guys could help me out with this simple code. It keeps returning an error. I'm new to php and I'm just trying out some thing. I'd appreciate it! And thanks ahead of time<?php<<< HTML<form method="POST" action="$_SERVER[php_SELF]"> <table width="929" height="622" border="1" cellpadding="5"><tr><td width="436">First Name:</td><td width="467"><label><input type="text" name="First_Name" id="First_Name" /></label></td></tr><tr><td>Last Name</td><td><label><input type="text" name="Last_Name" id="Last_Name" /></label></td></tr><tr><td>Date Of Birth</td><td> <input name="month" type="text" value="MM" size="5" maxlength="2" /> -<label><input name="Day" type="text" id="Day" value="DD" size="5" maxlength="2" /> - <input name="Year" type="text" id="Year" value="YYYY" size="6" maxlength="4" /></label></td></tr><tr><td>Mailing Address</td><td><label><input type="text" name="Address" id="Address" /></label></td></tr><tr><td>Apt. Number</td><td><label><input type="text" name="apt. Number" id="apt. Number" /></label></td></tr><tr><td>City</td><td><label><input type="text" name="City" id="City" /></label></td></tr><tr><td>Country</td><td><label><input type="text" name="Country" id="Country" /></label></td></tr><tr><td>Postal Code</td><td><label><input type="text" name="postal" id="postal" /></label></td></tr><tr><td>Phone</td><td><label><input type="text" name="phone" id="phone" /> (eg. 503-000-8800 begin_of_the_skype_highlighting 503-000-8800 end_of_the_skype_highlighting)</label></td></tr><tr><td>Email</td><td><label><input type="text" name="email" id="email" /></label></td></tr><tr><td>First Language</td><td><label><input type="text" name="First Language" id="First Language" /></label></td></tr><tr><td>Name Of School Most Recently Attended:</td><td><label><input type="text" name="school" id="school" /></label></td></tr><tr><td>What College Do you Want to get into? </td><td>Humber: <label><input type="checkbox" name="humber" id="humber" /> Seneca: <input type="checkbox" name="seneca" id="seneca" /></label></td></tr><tr><td> </td><td><input type="submit" value="submit" /></td></tr><tr><td><input type="hidden" name="_submit_check" value="1"></td><td> </td></tr></table></form>_HTML_$first_name = ($_POST['First_Name']); $Last_Name = strip_tags($_POST['Last_Name']); $Month_Of_Birth = strip_tags($_POST['month']);$Day_Of_Birth = strip_tags($_POST['Day']);$Year_Of_Birth = strip_tags($_POST['Year']);$Address = strip_tags($_POST['Address']);$apt_Number = strip_tags($_POST['apt. Number']);$Address = strip_tags($_POST['Address']);$City = strip_tags($_POST['City']);$Address = strip_tags($_POST['Address']);$Country = strip_tags($_POST['Country']);$Postal_code = strip_tags($_POST['postal']);$Phone = strip_tags($_POST['phone']);$Email = strip_tags($_POST['email']);$First_Language = strip_tags($_POST['First Language']);$Most_Recent_School = strip_tags($_POST['school']);if ($_POST['humber']) { $Interested_In = Humber; }else if ($_POST['seneca']) { $Interested_In = Seneca;} ?> Link to comment Share on other sites More sharing options...
Err Posted April 20, 2010 Share Posted April 20, 2010 It would help to give us some helpful information like what exact error message you are getting and what you're trying to achieve.At any rate. To cover some basics, please read through this:http://www.w3schools.com/php/php_intro.aspWhen debugging PHP put this at the beginning of your PHP script. This will display all errors you're having. error_reporting(E_ALL); ini_set('display_errors', 1); Link to comment Share on other sites More sharing options...
thescientist Posted April 20, 2010 Share Posted April 20, 2010 is that code directly copied and pasted out of your page? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.