Jump to content

update/edit


andy_b_1502

Recommended Posts

mrMarcus that worked, thank you.

 

And yes there is still an issue with the header re-direct to view01.php.

 

Is there any way around this, as the session at the top of the page is set so that if a unauthorized user tired to get to that page, it drops out to index.php with out a valid log in... 

Link to comment
Share on other sites

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

<?PHP
session_start();

include ('php only scripts/db.php');
$id = $_GET['id'];
$website = $_GET['website'];
$phone = $_GET['phone'];
$phone2 = $_GET['phone2'];
$premiumuser_decription = $_GET['premiumuser_decription'];

$website = isset($_POST['$website']);
$phone = isset($_POST['$phone']);
$phone2 = isset($_POST['$phone2']);
$premiumuser_decription = isset($_POST['$premiumuser_decription']);

$query = "UPDATE companies SET website = '". mysql_real_escape_string($website) ."', phone = '". mysql_real_escape_string($phone) ."', phone2 = '". mysql_real_escape_string($phone2) ."', premiumuser_description = '". mysql_real_escape_string($premiumuser_decription) ."' WHERE id = ". mysql_real_escape_string($id);
$result = mysql_query($query ) or die("SELECT Error: ".mysql_error());
header("Location: view01.php?id=" . $id); 
exit(0);
?>

 

i was thinking something like this? any ideas?

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.