BillyMako Posted August 20, 2008 Share Posted August 20, 2008 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 More sharing options...
genericnumber1 Posted August 20, 2008 Share Posted August 20, 2008 use proper html value='$street_address' Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620763 Share on other sites More sharing options...
cooldude832 Posted August 20, 2008 Share Posted August 20, 2008 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 https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620764 Share on other sites More sharing options...
BillyMako Posted August 20, 2008 Author Share Posted August 20, 2008 It is in <? echo"..."; ?> Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620767 Share on other sites More sharing options...
BillyMako Posted August 20, 2008 Author Share Posted August 20, 2008 I am modifying inside oscommerce software. What do i need to change to keep the full value of "262 pultney street" ? At the moment it only keeps "262" after the reload. Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620769 Share on other sites More sharing options...
cooldude832 Posted August 20, 2008 Share Posted August 20, 2008 I am modifying inside oscommerce software Did u pay for this software? if so I'd get a refund cause from this bit it looks like pure junk Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620770 Share on other sites More sharing options...
BillyMako Posted August 20, 2008 Author Share Posted August 20, 2008 No i didn't im modifying it, i work for the company. Can any one help of not? Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620772 Share on other sites More sharing options...
genericnumber1 Posted August 20, 2008 Share Posted August 20, 2008 billy: see my comment value=$street_address changed to value='$street_address' Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620775 Share on other sites More sharing options...
cooldude832 Posted August 20, 2008 Share Posted August 20, 2008 No i didn't im modifying it, i work for the company. Can any one help of not? If you wrote this and get paid for it you are really lucky cause I've got no clue how you can call your self a web designer. Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620782 Share on other sites More sharing options...
BillyMako Posted August 20, 2008 Author Share Posted August 20, 2008 Thankyou genericnumber1 Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620783 Share on other sites More sharing options...
genericnumber1 Posted August 20, 2008 Share Posted August 20, 2008 cooldude, be civil, the code isn't that bad. Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620784 Share on other sites More sharing options...
BillyMako Posted August 20, 2008 Author Share Posted August 20, 2008 One more problem, once submitted the value in suburb drop list is not kept. Please help on this one, it's my last problem. Thanks Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620805 Share on other sites More sharing options...
genericnumber1 Posted August 20, 2008 Share Posted August 20, 2008 Can we see the code in question ? Link to comment https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620808 Share on other sites More sharing options...
BillyMako Posted August 20, 2008 Author Share Posted August 20, 2008 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 https://forums.phpfreaks.com/topic/120471-on-reload-form-wont-keep-full-value/#findComment-620837 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.