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 Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted August 20, 2008 Share Posted August 20, 2008 use proper html value='$street_address' Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
BillyMako Posted August 20, 2008 Author Share Posted August 20, 2008 It is in <? echo"..."; ?> Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment 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' Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
BillyMako Posted August 20, 2008 Author Share Posted August 20, 2008 Thankyou genericnumber1 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted August 20, 2008 Share Posted August 20, 2008 Can we see the code in question ? Quote Link to comment 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>"; ?> * Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.