dbomb101 Posted September 20, 2009 Share Posted September 20, 2009 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 >_< Quote Link to comment https://forums.phpfreaks.com/topic/174929-solved-data-retrival/ Share on other sites More sharing options...
redarrow Posted September 20, 2009 Share Posted September 20, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/174929-solved-data-retrival/#findComment-921883 Share on other sites More sharing options...
dbomb101 Posted September 20, 2009 Author Share Posted September 20, 2009 thanks for the info man, thought it was something like that only reason i asked cause i kinda assumed the page refreshed once the submit button was pressed Quote Link to comment https://forums.phpfreaks.com/topic/174929-solved-data-retrival/#findComment-921890 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.