Jump to content

what's wrong with my code (below) ?


jd2007

Recommended Posts

<?php
$id=$_GET["varj"];
$gname=$_GET["varg"];
$grom_no=$_GET["varh"];
$glink=$_GET["vark"];

$db=mysql_connect("localhost", "root") or die(mysql_error());
mysql_select_db("ndsrom");
$query="update games set name=$gname where id=$id";
$result=mysql_query($query);
$query2="update games set romno=$grom_no where id=$id";
$result2=mysql_query($query2);
$query3="update games set link=$glink where id=$id";
$result3=mysql_query($query3);
if ($result && $result2 && $result3)
{
  $edit="<br><br>Game succesfully edited!";
  header("location:index.php?var10=$edit"); 
}
else
{
  $edit2="<br><br>ERROR!";
  header("location:index.php?var11=$edit2"); 
}



?>

 

it always results in error !

Link to comment
https://forums.phpfreaks.com/topic/60963-whats-wrong-with-my-code-below/
Share on other sites

If your mysql database has no password than anyone could log on to it using name root on the cmd prompty and add records read confedental information get other users passwords flood, drop, and erase your databases!

 

Do you think google has a password set up! Of course they do because without it the mysql is UNSECURE!

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.