Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dbhost = "localhost"; // this will ususally be 'localhost', but can sometimes differ
- $dbname = "database"; // the name of the database that you are going to use for this project
- $dbuser = "root"; // the username that you created, or were given, to access your database
- $dbpass = "root"; // the password that you created, or were given, to access your database
- mysql_connect($dbhost, $dbuser, $dbpass) or die("MySQL Error: " . mysql_error());
- mysql_select_db($dbname) or die("MySQL Error: " . mysql_error());
- $ud_ID = $_REQUEST["ID"];
- $ud_linktitle = $_POST["ud_linktitle"];
- $ud_linkid = $_POST["ud_linkid"];
- $ud_linkowner = $_POST["ud_linkowner"];
- $query = "UPDATE Klipbook_Links SET Link_ID = '$ud_linkid', Link_Title = '$ud_linktitle', Link_Owner_ID = '$ud_linkowner' WHERE Link_ID = '$ud_ID'";
- $res = mysql_query($query);
- if ($res)
- echo "<p>Record Updated<p>";
- else
- echo "Problem updating record. MySQL Error: " . mysql_error();
- ?> <?php
- $dbhost = "localhost"; // this will ususally be 'localhost', but can sometimes differ
- $dbname = "database"; // the name of the database that you are going to use for this project
- $dbuser = "root"; // the username that you created, or were given, to access your database
- $dbpass = "root"; // the password that you created, or were given, to access your database
- mysql_connect($dbhost, $dbuser, $dbpass) or die("MySQL Error: " . mysql_error());
- mysql_select_db($dbname) or die("MySQL Error: " . mysql_error());
- $ud_ID = $_REQUEST["ID"];
- $ud_linktitle = $_POST["ud_linktitle"];
- $ud_linkid = $_POST["ud_linkid"];
- $ud_linkowner = $_POST["ud_linkowner"];
- $query = "UPDATE Klipbook_Links SET Link_ID = '$ud_linkid', Link_Title = '$ud_linktitle', Link_Owner_ID = '$ud_linkowner' WHERE Link_ID = '$ud_ID'";
- $res = mysql_query($query);
- if ($res)
- echo "<p>Record Updated<p>";
- else
- echo "Problem updating record. MySQL Error: " . mysql_error();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement