Jump to content

Changing Page


mtmrop

Recommended Posts

Hi,

this is my first post on this forum and my first ever go at php...please be gentle with this complete noob!

 

I'm putting some code together for a website, but have got a bit stuck.

 

I need to be able to go to a different webpage after the php has finished it's job.

In this case, the code updates a mySQL database (that bit works) but after that, I need the user to be returned to another page on the website.  Can this be done?  Chopped down version of the code is below...

 

<?php

$con = mysql_connect("localhost","xx","xx");

if (!$con)

  {

  die('Could not connect: ' . mysql_error());

  }

 

mysql_select_db("xx", $con);

 

mysql_query("UPDATE wTable SET wName = '$_POST[wName]'

WHERE ID='$_POST[wid]'");

 

?>

 

 

What I want now is for the user to be sent to page mysite.com/admin.php

 

Thanks in advance for any help!

 

mtm

Link to comment
https://forums.phpfreaks.com/topic/169626-changing-page/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.