Jump to content

stevemreid

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by stevemreid

  1. So simple when you know how but I may not have ever worked it out by myself. Thank you so much! Steve
  2. Hey all, Im a newb and have came across a problem which I hope you guys can help with. I've got a form that submits some info into a mysql database. It works and all the data goes into the database, and once you have submitted your info on the form you can press a button on the form page which loads the previously submitted values back into the form. It nearly works in that it returns all the data unless theres a space in it - i.e if one form field contains the word "Jones" it will return it , but if it was "Mr Jones" it would only return "Mr". Heres some code if its needed: On the php page that "inserts" the data into the database I have this: $address4=$_POST['address4']; $postcode=$_POST['postcode']; then //put all the variables into a session variable so there accesible across the whole site foreach($_POST as $key => $value) $_SESSION[$key] = $value; Once you press the button to reload the previous values the code to populate the form is : <td><strong>Address 4</strong></td>       <td><input name='address4' type='text' id='address4' value=$_SESSION[address4]></td>     </tr>     <tr>       <td><strong>Postcode<span class='rederror'>*</span></strong></td>       <td><input name='postcode' type='text' id='postcode' value=$_SESSION[postcode]></td>     </tr>   <tr> The mysql table fields in question are varchars. Could someone point me in the right direction? Thanks! Steve
×
×
  • 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.