Jump to content

quick question regarding GET


jbrill

Recommended Posts

if i have this:

$update = "UPDATE guestbook SET actual_time='".$_POST['actual_time']."',cat='".$_POST['cat']."', subcat='".$_POST['subcat']."',machine_time='".$_POST['machine_time']."', setup='".$_POST['setup']."', notes='".$_POST['notes']."' WHERE id='".$_GET['idr']."'";


echo $update."<br>";
mysql_query($update);

echo "<table align=\"center\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\" class=\"tableoutline\">
<tr>
<td class=\"success\">";
echo "Step Was Updated Successfuly!</td></tr></table>";

 

 

i would like, upon success,  to forward to modjob.php where idr = id and table = jobs

 

could someone please write this for me?

 

Link to comment
Share on other sites

You are taking raw data directly from $_POST and $_GET and inserting it into your database.

 

$update = "UPDATE guestbook SET actual_time='".$_POST['actual_time'] . "...";

 

What happens if I enter the following in your actual_time field:

NULL; DELETE * FROM guestbook WHERE 1;

 

Your SQL query then becomes:

UPDATE guestbook SET actual_time=NULL; DELETE * FROM guestbook WHERE 1;

 

It would take some experimenting and knowledge about your site to get that far, but careless programming makes that kind of information easy to retrieve.

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.