Jump to content

I think my PHP is broke...


markvaughn2006

Recommended Posts

This is a general question, has this happened to any of you and how did you fix it??

Last night I programmed a crapload of php, and everything I did worked flawlessly, tonight I feel like I'm going backwards, stuff that worked last night is now returning errors and once I fix one thing, another thing breaks. Does having godaddy shared hosting have anything to do with this?? Is it just a misplaced } or ' somewhere throwing everything off??? Thanks for any help, i feel like I'm going insane!

Link to comment
Share on other sites

There a heap load of stuff about go daddy and incompatibility with php functions turned off or on or even not work due to security end off go daddy.

 

If the script works locally on your pc, then i am sure, that go daddy got something turned off,

 

and no never heard them adjust any php.ini for anybody ever.

 

You can post the line that go daddy is moaning at, to see if we can help but

like i say we don't own go daddy servers mate.

 

Link to comment
Share on other sites

How would we know if a missing ' or } could be throwing everything off if you haven't posted any code?

 

thanks jackass!

I wasn't trying to be rude; you can't ask a question that would be specific to your code then not post any code..

Link to comment
Share on other sites

and basically the problem I'm having now is...

 

$result = mysql_query("SELECT * FROM users_tbl WHERE location='Burger Queen'") or die(mysql_error()); 

$row = mysql_fetch_array( $result);}

while ($row = mysql_fetch_array($result)) {

  echo '<form target="actions" method="post" action="attack.php"><input type="submit" value="Attack" />'.$row['user_name']." - ".$row['location_message'].'<input type="hidden" name="attackee" value="'.$row['user_name'].'" /></form>';

 

//Supposed to list everyone that has the location "Burger Queen" and it worked fine last night now today it is only showing 3 people that have that location instead of the 5 that I see have that location in the DB...

 

It just seems like there is some kind of inconsistent errors happening.

 

Also I can only log in with 2 of the 5 user names for some reason, there is nothing different about them, this is the error I'm getting

 

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE user_name='Bob'' at line 1

 

Once again, this all worked fine yesterday thats why I was wondering if my shared Godaddy hosting might be causing some random problems or if there was some little quirk like editing the php.ini file to make it not be so flaky or something...

Link to comment
Share on other sites

and basically the problem I'm having now is...

 

$result = mysql_query("SELECT * FROM users_tbl WHERE location='Burger Queen'") or die(mysql_error());

$row = mysql_fetch_array( $result);}

while ($row = mysql_fetch_array($result)) {

  echo '<form target="actions" method="post" action="attack.php"><input type="submit" value="Attack" />'.$row['user_name']." - ".$row['location_message'].'<input type="hidden" name="attackee" value="'.$row['user_name'].'" /></form>';

 

If that snippet of code is anything to go by I'd say its your programming that is at fault. No point in blaming your host for it.

Link to comment
Share on other sites

Try now mate, might work. (( i corrected you faults, but the code not dynamic and all hard codded , but this is php.....

 

<?php
$result = mysql_query("SELECT * FROM users_tbl WHERE location='Burger Queen'") or die(mysql_error()); 
$row = mysql_fetch_array( $result);
while ($row = mysql_fetch_assoc($result)) {
echo '<form target="actions" method="post" action="attack.php"><input type="submit" value="Attack" />'.$row['user_name']." - ".$row['location_message'].'<input type="hidden" name="attackee" value="'.$row['user_name'].'" /></form>';
}
?>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.