taksi10 Posted February 4, 2010 Report Share Posted February 4, 2010 <?php // if there are any errors, display them if ($error != '') { echo ' '.$error.''; } ?> Branch No.: * Street: * Area: * City: * Post Code: * Tel. No.: * Fax No.: * * required Quote Link to comment Share on other sites More sharing options...
Guest 24hourapartments Posted February 4, 2010 Report Share Posted February 4, 2010 not working. Can anyone tell what's the problem? --Scott Quote Link to comment Share on other sites More sharing options...
quyen Posted February 4, 2010 Report Share Posted February 4, 2010 not working. Can anyone tell what's the problem? --Scott Hello, Try this one: Your text will show here Quyen, Quote Link to comment Share on other sites More sharing options...
quyen Posted February 4, 2010 Report Share Posted February 4, 2010 (edited) Hello Taksi10, I think the problem comes from the form. Check your function renderForm() again, and also give the input fields different names. I hope that will help! Quyen, Edited February 4, 2010 by quyen Quote Link to comment Share on other sites More sharing options...
taksi10 Posted February 4, 2010 Author Report Share Posted February 4, 2010 Hello Taksi10, I think the problem comes from the form. Check your function renderForm() again, and also give the input fields different names. I hope that will help! Quyen, thanks miss quyen i changed already the name of the fields. but the output is just the same. does my function renderForm() code correct? Quote Link to comment Share on other sites More sharing options...
quyen Posted February 4, 2010 Report Share Posted February 4, 2010 (edited) Hi again, Could you please send me the php file, and I will try to edit it for you. Or you can try this: $bno = mysql_real_escape_string(htmlspecialchars($_POST['branch_id'])); $street = mysql_real_escape_string($_POST['street']); $area = mysql_real_escape_string(htmlspecialchars($_POST['area'])); $city = mysql_real_escape_string(htmlspecialchars($_POST['city'])); $postcode = mysql_real_escape_string(htmlspecialchars($_POST['postcode'])); $telno = mysql_real_escape_string(htmlspecialchars($_POST['tel'])); $faxno = mysql_real_escape_string(htmlspecialchars($_POST['fax'])); Note: branch_id, street, area, city, postcode, tel, fax have to be exacly the same with form_component_name (I am not sure what do they look like now after you edit). In the code above, for example your input text is : ....do the same to other components. Or you can try to read this page, very basic and simple, also easy to understand : http://w3schools.com/php/php_post.asp Goodluck! Quyen, Edited February 5, 2010 by quyen Quote Link to comment Share on other sites More sharing options...
taksi10 Posted February 5, 2010 Author Report Share Posted February 5, 2010 Hi again, Could you please send me the php file, and I will try to edit it for you. Or you can try this: $bno = mysql_real_escape_string(htmlspecialchars($_POST['branch_id'])); $street = mysql_real_escape_string($_POST['street']); $area = mysql_real_escape_string(htmlspecialchars($_POST['area'])); $city = mysql_real_escape_string(htmlspecialchars($_POST['city'])); $postcode = mysql_real_escape_string(htmlspecialchars($_POST['postcode'])); $telno = mysql_real_escape_string(htmlspecialchars($_POST['tel'])); $faxno = mysql_real_escape_string(htmlspecialchars($_POST['fax'])); Note: branch_id, street, area, city, postcode, tel, fax have to be exacly the same with form_component_name (I am not sure what do they look like now after you edit). In the code above, for example your input text is : ....do the same to other components. Or you can try to read this page, very basic and simple, also easy to understand : http://w3schools.com/php/php_post.asp Goodluck! Quyen, hi again ms. quyen thanks very much for making me realize that the names of the fields are all the same. i changed it, and tried to make a new page. and now its working already! thanks so much. its really true that sometimes with your excitement to do the program you forgot the small important things thanks for the help again. Quote Link to comment Share on other sites More sharing options...
quyen Posted February 5, 2010 Report Share Posted February 5, 2010 You are welcome! 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.
Note: Your post will require moderator approval before it will be visible.