Jump to content

Recommended Posts

well basically my problem is this, am using php to get data from a mysql database for a editing page on my website, it retrives the intial information fine, and it saves it fine as well, but the problem is once it submits the changes it doesn't display them instead it displays the changes when it is refreshed/or the submit button is pressed again

 

here is how am getting the data

 

require('query.php');

$details="select * from tutordetails WHERE p_id='".$_SESSION['id']."'";

$result=getQuery($details,$l);

while($row = mysql_fetch_assoc($result))

  {

$_SESSION['forename']=$row['forename'];

$_SESSION['surname']=$row['surname'];

$_SESSION['postcode']=$row['postcode'];

$_SESSION['telephone']=$row['telephone'];

$_SESSION['hideemail']=$row['hideemail'];

$_SESSION['aboutme']=$row['aboutme'];

  }

 

 

and here is how am displaying the info

 

<span class="editInfo" id="forenameSpan">Forname:</span><input type="text" name="forename" id="forename" value="<?php echo $_SESSION['forename']; ?>" />

 

any help would be greatly appreciated >_<

 

Link to comment
https://forums.phpfreaks.com/topic/174929-solved-data-retrival/
Share on other sites

because the page needs to be refreshed young man.

 

if you want to see info/data/images straight away look into ajax ok.

 

your notice most php programmers like the form on a separate page, that way going to the info page got current information.

 

if you want to add things then see them straight away on the same page use ajax

Link to comment
https://forums.phpfreaks.com/topic/174929-solved-data-retrival/#findComment-921883
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.