co.ador Posted December 13, 2009 Share Posted December 13, 2009 <?php $strName = isset($_POST['frmSearch']['name'])?/*mysql_real_escape_string(*/$_POST['frmSearch']['name']/*)*/:''; $strZipCode = isset($_POST['frmSearch']['zipcode'])/*mysql_real_escape_string(*/?$_POST['frmSearch']['zipcode']/*)*/:''; $strState = isset($_POST['frmSearch']['state'])/*mysql_real_escape_string(*/?$_POST['frmSearch']['state']/*)*/:''; $arrFoodTypes = isset($_POST['frmSearch']['food_types'])?$_POST['frmSearch']['food_types']:array(); $arrOfferings = isset($_POST['frmSearch']['offerings'])?$_POST['frmSearch']['offerings']:array(); ?> Link to comment https://forums.phpfreaks.com/topic/184995-want-to-know-if-this-script-is-ok-to-pick-up-values-from-a-form-of-another-page/ Share on other sites More sharing options...
ignace Posted December 13, 2009 Share Posted December 13, 2009 1) No. If this is your only validation 2) Stop using the hungarian notation Link to comment https://forums.phpfreaks.com/topic/184995-want-to-know-if-this-script-is-ok-to-pick-up-values-from-a-form-of-another-page/#findComment-976559 Share on other sites More sharing options...
co.ador Posted December 13, 2009 Author Share Posted December 13, 2009 what would be the way to pick up this form values in another page? index.php <form name="frmSearch" class="abajo" action="indexpagination.php" method="POST"> <li class="restaurants-name"> <label for="restaurants-name">Name</label> <input type="text" name="frmSearch[name]" value="<?php echo $strName; ?>" id="restaurants-name" class="text" /> </li> <li class="restaurants-zipcode"> <label for="restaurants-zipcode">Zip</label> <input type="text" name="frmSearch[zipcode]" value="<?php echo $strZipCode; ?>" maxlength="5" id="restaurants-zipcode" class="text" /> </li></form> To indexpagination.php Link to comment https://forums.phpfreaks.com/topic/184995-want-to-know-if-this-script-is-ok-to-pick-up-values-from-a-form-of-another-page/#findComment-976586 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.