Jump to content

napurist

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by napurist

  1. Add exit(); after header("Location:gameindex.php"); and see if that helps...
  2. Add the wrap attribute to the html tag like this... <textarea cols="20" rows="5" wrap="hard">
  3. You may want to fix #f4f4f4;'>$_POST['age']</input>< to #f4f4f4;'>".$_POST['age']."</input>< first and see what happens...
  4. Your contact form would need to be accessed via a link like this. http://www.gvrrid.org/contact/index.php?to=president Then your contact page "index.php" would need a statement such as $to = $_GET['to']; You can then run an if statement, as you would like, to set the SELECTED option for the drop down.
  5. It's not in PHP in the html code in the first code box. That is strictly HTML. Unless they just meant to leave out the opening and closing php tags???
  6. I would suggest that you change the checkbox names to 'police', 'firstname', and 'lastname' respectively. Then assign them to variables for processing on your php page. Currently, you have them named "form[]" which is literally "form[]" in hmtl. Its not an array.
  7. Without seeing some snippits of code its hard to tell. A browser refresh usually does the trick for me.
  8. Just for clarification. You said the error message is getting triggered but the tables get populated with the values. Is that correct?
  9. The POST variable your looking for is $_POST['select'] not $_POST['city']. The POST's variable in a select box is the select name not the option name. Hope this helps...
  10. I find it easier sometimes to export the data from mysql to excel, manipulate the data and import it back into mysql as required.
  11. take out the second WHERE
  12. I think what you are asking for is to dynamically create the href link so you can use $_GET to display your news article. If that is so then just replace <a href="news.php" class="news-header" >'.$title.'</a> with <a href="news.php?id='.$row['id'].'" class="news-header" >'.$title.'</a> Let me know if that help...
  13. If the user successfully logs in then put something like - $_SESSION['id'] = $id; Of course the $id variable above should already be set based upon a previous SQL statement where you did something like $sql = 'SELECT id FROM users WHERE username = $_POST['username'] AND pass = $_POST['pass']'; $row = mysql_fetch_assoc(mysql_query($sql)); $id = $row['id']; Be sure to put session_start(); at the beginning of every page to assure you can write and read to the session variable. You call it at any time from any page (that has session_start() by just using $_SESSION['id']. This is very basic framework to get you started. There's a little more if you want it secure and some error control.
×
×
  • 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.