Jump to content

On Reload form wont keep full value


BillyMako

Recommended Posts

Hey,

When my page reploads to populate a menu, when the reload is done i loose everything which has a space in it.

Eg. street_name = 262 Pultney Street

262 will stay and "Pultney Street" will dissapear on reload.

 

 

var val6=document.create_account.street_address.value;

self.location='test.php?firstname=' + val1 etc....

<tr><?  @$street_address=$_GET['street_address'];  ?>
                <td width="120" class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
                <td class="main"><?PHP echo"<input type=text name=street_address value=$street_address>"; ?> *</td>
              </tr>

 

How can i keep the whole value?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/
Share on other sites

realize how $_GET works

 

It is analyzed from the QUERY_STRING sent to the page

so you need to adjust your link structure to include the proper query string or use a new method

 

 

What you showed us makes no sense because you aren't even echoing a variable you are echoing a constant and settings a variable and using it later down (very poorly)

 

Look into basic php dos and don'ts such as short tags error supression variable declerations etc.

			echo "<select name='suburb'><option value='$suburb'>Select Suburb</option>"; // onchange=\"reload(this.form)\"
while($pop = mysql_fetch_array($query)) { 
if($pop['postcode']==@$suburb){
echo  "<option value='$pop[postcode]'>$pop[suburb]</option>";
}else{
echo "<option selected value='$suburb'>$pop[suburb]</option>";}
}

echo "</select>";

			 ?> *

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.