Jump to content

Want to know if this script is ok to pick up values from a form of another page


co.ador

Recommended Posts

 <?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(); ?>

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


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.