Dynadot

GoDaddy and PHP not mixing well for me. Please help.

Spaceship Spaceship
Watch
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
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Check the database permissions for the database user. If they haven't been granted "update" and "delete" you won't be able to update or delete rows.
 
0
•••
Checked that and it was that. Godaddy just doesn't like the post method I think. I used the get method and it worked fine.
 
0
•••
That makes no sense.

Where are $detail and $id in your example coming from? Are you assuming register_globals (deprecated!!!) is set?
 
0
•••
That makes no sense.

Where are $detail and $id in your example coming from? Are you assuming register_globals (deprecated!!!) is set?

I'm not 100% what that means but I assumed this script would work since it did with other servers.

I also made sure the method was "post"

then I called to them like this
$id=$_POST['id'];

I even added spaces like
$id = $_POST['id'];



The actual form contains all the names and values. And then the action is the script I'm showing you. And I'm still having problems with a single page process that I used from phpeasystep.net tutorials. It's the update multiple rows one.

I've tried a lot of the "solutions" that other sites have posted and it hasn't worked for me. :| :'(


I used the method listed above at first on all the other update scripts and it didn't work. I used get instead and it worked like magic lol. I literally just replaced all POST with GET
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back