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

Link to comment
Share on other sites

			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>";

			 ?> *

Link to comment
Share on other sites

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.