Jump to content

editing mysql


samsbc12

Recommended Posts

[code]<?
//Store username and pass
$username="*******";
$password="*******";
$database="*******";

//Variables
//Pulls From Form
$id=$_POST['id'];
$category=$_POST['category'];
$name=$_POST['name'];
$description=$_POST['description'];
$link=$_POST['link'];
$mirror=$_POST['mirror'];

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

if($name != ""){

$query = "UPDATE links SET category='$category', name='$name', description='$description', link='$link',  mirror='$mirror' WHERE id='$id' ";

mysql_query($query);
mysql_close();
echo"<html>
<title>Addedt</title>
<style type=\"text/css\">
<!--
body {
    background-color: #666666;
}
-->
</style></head>

<body>
<div align=\"center\"><font color=\"#FFCC00\" face=\"Arial, Helvetica, sans-serif\">Record Updated. </font></div>
</body>
</html>
";



}?>
<meta http-equiv="refresh" content="2;URL=************">[/code]
Link to comment
https://forums.phpfreaks.com/topic/10534-editing-mysql/
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.