Jump to content
Killersites Forums


New Members
  • Posts

  • Joined

  • Last visited

sakarora's Achievements


Newbie (1/14)



  1. Thankyou Thankyou Thankyou... i am done with it.. thanks alot Ben... :*
  2. Hi Ben, THANKS FOR YOUR REPLY... what and how much portion is to be removed?? plz be specific... i am newbie... when i remove if loop it gives me blank page when i click on edit.... or tell me what is to be written in place of is_numeric... if i want user to be enter characters only.. P.S i removed if (isset($_POST['submit'])) { // confirm that the 'id' value is a valid integer before getting the form data if (is_string($_POST['signum'])) { // get form data, making sure it is valid $signum =$_POST['signum']; $name = mysql_real_escape_string(htmlspecialchars($_POST['name'])); $emp_id = mysql_real_escape_string(htmlspecialchars($_POST['emp_id'])); // check that firstname/lastname fields are both filled in if ($name == '' || $emp_id == '') { // generate error message $error = 'ERROR: Please fill in all required fields!'; //error, display form renderForm($signum, $name, $emp_id, $error); } else { // save the data to the database mysql_query("UPDATE EMP SET name='$name', emp_id='$emp_id' WHERE signum='$signum'") or die(mysql_error()); // once saved, redirect back to the view page header("Location: view.php"); } } else { // if the 'id' isn't valid, display an error echo 'Error!'; } } PLEASE EDIT THE SCRIPT FOR ME AND PASTE IT OVER HERE IF POSSIBLE...
  3. hi admin.. i used the script you provided for editing.. first of all thanks for the lovely script.. i created a table with id,firstname and lastname fields..as u told and it went perfect with no error... but i tried it for another table and fields 'signum' in place of 'id'.. and it gave me error because signum is varchar type... and id is int... if i keep signum as int then it works fine but gives error for varchar.... there's a line in edit.php which checks that input is_numeric... what to write inplace of that... please provide me with that script...i urgently need it.... THANKS IN ADVANCE...
  • Create New...