Jump to content

batwimp

Members
  • Posts

    319
  • Joined

  • Last visited

Everything posted by batwimp

  1. You should put your database queries, etc... BEFORE your for loop.
  2. Is that a blank line before your php tags in admin-news.php? That would cause a header error.
  3. Prepare for a global variable flame from the guru(s).
  4. There may also be a misunderstanding of scope. When you declare a variable inside a function, like your $var in this example, it doesn't exist outside of that function. You would need to call the function and have it return the value that you wanted from inside the function. You have the function returning, but you are not assigning it to a variable outside the function.
  5. Just use a double quote instead of a single quote. PHP will parse variables that are inside double quotes, but not inside single quotes: return success($mes,"./ffamatches.php?id=$matchid");
  6. You have a syntax error in your $cb string. Please post what the string is supposed to look like after the variables have been filled it.
  7. and make sure you have session_start(); at the top of each page you are using sessions.
  8. My machine gave a syntax error on the json you provided. For some reason, it didn't like this part: "sF":00112 because it starts with zeros. It doesn't like a single zero either, though this link: http://www.json.org/ shows that it should be able to start with one zero (which it still errors out if it does). You may want to fix these errors before you keep messing around with json.
  9. You may also want to check into this: http://us3.php.net/manual/en/filter.filters.validate.php Though some say it has some problems. Read the comments.
  10. echo <<<EOT <textarea id="question{$questionNo} name="{$thoughtsArray[$questionNo]['answerText']}" cols="60" rows="2"> EOT; echo isset($questionNo) ? htmlentities($thoughtsArray[$questionNo]['answerText'], ENT_QUOTES) : ''; echo "</textarea>";
  11. Are you trying to display text from the array in the text area, or just take it as an input to later throw into a database?
  12. If you display the page in your browser, then do a View Source, what does the HTML look like?
  13. And let's not forget hashing your passwords before entering them into the database.
  14. Sorry, I misunderstood the question. Use mgallforever's code.
  15. In this case, I prefer to assign a variable and do the check before the HTML: session_start() if(isset($_SESSION['frommonth'])){ $fmonth = $_SESSION['frommonth']; }else{ $fmonth = "None"; } <select name="from_month" id="from_month"> <option value="<?php echo $fmonth;?>" selected="selected">mm</dd> <?for ($i=1;$i<=12;$i++):?> <option value="<?=$i?>"><?=$months[$i]?></dd> <?endfor;?> </select> Not tested.
  16. Ok, so for debugging purposes, stop the script right after the dump so you can see if there's anything in there: var_dump($_GET); exit; $_SESSION['tel'] = $_GET['Lat']; $_SESSION['Lon'] = $_GET['Lon']; $_SESSION['Lat'] = $_GET['Lat'];
  17. Are you sure $row['price'] contains and actual value when it's written to the form?
  18. It will print to the screen what is currently in your $_GET array. It will let you know if they are being populated correctly from your form. Put it right before you assign to your session array: var_dump($_GET); $_SESSION['tel'] = $_GET['Lat']; $_SESSION['Lon'] = $_GET['Lon']; $_SESSION['Lat'] = $_GET['Lat']; This will print some text out to the screen to let you know what is in your GET array. Copy that output and paste it here.
  19. Have you verified your GETS are passing in values before you assign them to the session variables? var_dump($_GET);
  20. Post the line where the error is pointing.
×
×
  • 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.