Jump to content

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


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


This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.