Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Darrel Lyons
2,991 PointsEchoing after database update
How do i echo after a database update? I thought the code below would do it but when the echo is made, i have to go off the page and go back onto it to see the update.
mysql_query("UPDATE table SET example='' WHERE id=''");
echo "Echo";
1 Answer
Navid Mirzaie Milani
6,274 Pointswhat do you mean how do i echo ? you can redirect after the update.
$query = "SELECT * FROM bla";
$result = mysql_query($query) or die (mysql_error());
if($result){
header("Location: http://mydomain.com/myOtherPage.php");
die();
}