Jump to content

patrickking04

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

patrickking04's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i sure will, thanks again for all the help.
  2. you done it mate. it works now. and adds to the database;
  3. I got this now 1 incidents in area but nothing was added to mysql
  4. This is whats on the server right now. <?php include 'connect.php'; ?> <?php $id=$_GET["ID"]; echo "ID is ($ID)."; if (isset($id)) { $sql="SELECT * FROM hotspot WHERE ID=$ID"; //Select every thing from 'hotspot' table $query=mysql_query($sql); $row=mysql_fetch_array($query); $name=$row['zone'];// Zone area $value=$row['bullcount'];// counts of bullys $newvalue=$value+1; $sql="UPDATE hotspot SET bullcount='$newvalue' WHERE ID=$ID"; //updates counts of bullys by +1 $query=mysql_query($sql); echo "$newvalue incidents in area $name"; //Prints new total count and area name. } else { die("Error:$id not updated"); //Prints error } ?>
  5. i now get ID is (1).Error: not updated
  6. <?php $id=$_GET["id"]; echo "ID is ".$id; ?> produces this ID is 1
  7. hmmm... thats what i was just thinking. its a ubuntu lamp setup. might just install wamp on a virtual xp pc and see if it works.
  8. included it and i get ID is ().Error: not updated even on the test page with just the hyperlink
  9. heres what i have no the main page. <?php include 'connect.php'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="Generator" content="Serif WebPlus 11.0.6.030"> <title>Home</title> </head> <a href="processbully.php?id=1"><img src="wpimages/Math_corri.png" width="14" height="152" border="0" id="Math_corri" name="Math_corri" title="" alt="" onload="OnLoadPngFix()"></a></div> </div> </body> </html>
  10. Yeah i checked it and the id corrsponds to the same id in the database.
  11. yeah your right it not sending it across. ID is ().Error: not updated im using the processbully.php?id=1 thing you help me with at the beginning.
  12. nope not understand, no error are coming up. <?php if (isset($id)) { $sql="SELECT * FROM 'hotspot' WHERE id=$id"; //Select every thing from 'hotspot' table $query=mysql_query($sql); $row=mysql_fetch_array($query); $name=$row['zone'];// Zone area $value=$row['bullcount'];// counts of bullys $newvalue=$value+1; $sql="UPDATE 'hotspot' SET bullcount='$newvalue' WHERE id=$id"; //updates counts of bullys by +1 $query=mysql_query($sql); echo "$newvalue incidents in area $name"; //Prints new total count and area name. } else { die("Error:$id not updated"); //Prints error } ?>
  13. does there need to be a ! in the isset? like so if (!isset($id))
×
×
  • 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.