tsuoshiro Posted September 21, 2009 Share Posted September 21, 2009 Hello, i have a problem in my UPDATE program... At first it runs smoothly, when i will update it, there is a Parse error or "Parse error: parse error in C:\wamp\www\update ~orig~\update_student_process2.php on line 60" . Please, i really need your help. These are the the codes.. filename: update.php <form action='update_student_process.php' method='post'> <tbody> <tr> <td height="2" colspan="6" align="left" bgcolor="#FFFFFF"> </td> </tr> <tr> <td width="111" bgcolor="#FFFFFF"><pan class="style10">Student_Number</span></td> <input name="student_number" maxlength="7" size="10" type="text" id="student_number" /> </font></td> <td width="56"><input type="submit" name="Submit" id="button" value="Submit" /></td> <td width="56"><input type="reset" name="Reset" id="button" value="Reset" /></td> </tr> </table> </form> filename: update_student_process.PHP <?php $connection = mysql_connect("localhost", "root","change"); if (!$connection) {die("Database Connection failed!". mysql_error());} $db_select = mysql_select_db("cpedb",$connection); if(!$db_select) {die("Database Connection failed!". mysql_error());} ?> <?php $student_number; $student_number=$_POST['student_number']; //Perform database query if($student_number=$_POST['student_number']) { $result=mysql_query("SELECT * FROM student Where student_number ='$student_number' ",$connection); if(!$result) { die("Database Connection failed!". mysql_error()); } echo "<table border=0>"; $row=mysql_fetch_array($result); echo ("<form name='frm_details' action='update_student_process2.php' method='post'>"); echo ("<input type='hidden' name='action' value='update'>"); echo ("Student Number : <input type='text' name='student_number' readonly value='".$row["student_number"]."'><br>"); echo ("Last Name : <input type='text' name='last_name' readonly value='".$row["last_name"]."'><br>"); echo ("First Name : <input type='text' name='first_name' readonly value='".$row["first_name"]."'><br>"); echo ("Middle Name : <input type='text' name='middle_name' readonly value='".$row["middle_name"]."'><br>"); echo ("Year Level: <input type='text' name='year_level' value='".$row["year_level"]."'><br>"); echo ("Gender : <input type='text' name='gender' readonly value='".$row["gender"]."'><br>"); echo ("Birthday : <input type='text' name='birthday_month' readonly value='".$row["birthday_month"]."'>"); echo ("<input type='text' name='birthday_day' readonly value='".$row["birthday_day"]."'>"); echo ("<input type='text' name='birthday_year' readonly value='".$row["birthday_year"]."'><br>"); echo ("Age: <input type='text' name='age' value='".$row["age"]."'><br>"); echo ("Email : <input type='text' name='email' value='".$row["email"]."'><br>"); echo ("Student PhoneNumber : <input type='text' name='student_phone_number' value='".$row["student_phone_number"]."'><br>"); echo ("Student CellphoneNumber : <input type='text' name='student_cellphone_number' value='".$row["student_cellphone_number"]."'><br>"); echo ("Student Address : <input type='text' name='student_address' value='".$row["student_address"]."'><br>"); echo ("Student ProvincialAddress : <input type='text' name='student_provincial_address' value='".$row["student_provincial_address"]."'><br>"); echo ("Citizenship : <input type='text' name='citizenship' value='".$row["citizenship"]."'><br>"); echo ("Civil Status: <input type='text' name='civil_status' value='".$row["civil_status"]."'><br>"); echo ("Religion : <input type='text' name='religion' value='".$row["religion"]."'><br>"); echo ("Mother Name : <input type='text' name='mother_name' value='".$row["mother_name"]."'><br>"); echo ("Mother Occupation : <input type='text' name='mother_occupation' value='".$row["mother_occupation"]."'><br>"); echo ("Father Name : <input type='text' name='father_name' value='".$row["father_name"]."'><br>"); echo ("Father Occupation : <input type='text' name='father_occupation' value='".$row["father_occupation"]."'><br>"); echo ("Guardian Name : <input type='text' name='guardian_name' value='".$row["guardian_name"]."'><br>"); echo ("Guardian Relationship : <input type='text' name='guardian_relationship' value='".$row["guardian_relationship"]."'><br>"); echo ("Guardian ContactNumber : <input type='text' name='guardian_contact_number' value='".$row["guardian_contact_number"]."'><br>"); echo ("Guardian Address : <input type='text' name='guardian_address' value='".$row["guardian_address"]."'><br>"); echo ("<input type='submit' name='f_submit' value='Update'>"); echo ("</form>"); } ?> <?php //Closing database mysql_close($connection); ?> FILENAME: update_student_process2 Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 21, 2009 Share Posted September 21, 2009 This is a double post ignore it... naughty. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.