- Impact
- 18
PHP:
<?php require ('inc/dbc.php');
require ('inc/head.inc');
require('inc/safe.php');
require ('inc/menu.inc');
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
// update data in mysql database
$sql="UPDATE $tbl_name SET detail='$detail' WHERE id='$id'";
$result=mysql_query($sql);
// if successfully updated.
if($result){
echo "Successful";
echo "<BR>";
echo "<a href='edit_emails.php'>View result</a>";
}
require('inc/foot.inc'); ?>
I really need help. It doesn't want to work for me. I mean it adds to the database when I INSERT but UPDATE and SET WHERE does not work.
And I specified GoDaddy because the two other hosts I use (bluehost and integrityhost) the script works on both of their servers!
I don't even think the mailing works. I'm beginning to hate godaddy.
Help is 110% appreciated I'll add rep and try to give you something of course if you solve my prob!:o