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