
batwimp
Members-
Posts
319 -
Joined
-
Last visited
Everything posted by batwimp
-
You should put your database queries, etc... BEFORE your for loop.
-
Is that a blank line before your php tags in admin-news.php? That would cause a header error.
-
Prepare for a global variable flame from the guru(s).
-
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.
-
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");
-
Can a server answer a GET request with a POST response?
batwimp replied to jhsachs's topic in PHP Coding Help
Do you have a sample page that works? -
trying to avoid session variables being destroyed
batwimp replied to imsewhi's topic in PHP Coding Help
Now you tell me! -
Doesn't post it in the database :( (HELP PLEASE) ):
batwimp replied to buzzern96's topic in PHP Coding Help
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. -
and make sure you have session_start(); at the top of each page you are using sessions.
-
Anyone with some insight on parcing THIS text to mysql database?
batwimp replied to 0o0o0's topic in PHP Coding Help
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. -
Something Wrong with My Logic? - User IDs or Coordinates?
batwimp replied to Thauwa's topic in PHP Coding Help
Try ORDER BY instead of SORT BY -
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.
-
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>";
-
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?
-
So you're not seeing your form at all?
-
If you display the page in your browser, then do a View Source, what does the HTML look like?
-
Could you post the actual code?
-
And let's not forget hashing your passwords before entering them into the database.
-
Sorry, I misunderstood the question. Use mgallforever's code.
-
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.
-
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'];
-
Are you sure $row['price'] contains and actual value when it's written to the form?
-
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.
-
Have you verified your GETS are passing in values before you assign them to the session variables? var_dump($_GET);
-
Post the line where the error is pointing.