Hey all,
I am still fairly new to PHP programming and I am trying to put together a page where you select search terms from a drop down menu and it keeps the menu at your search choice in the menu after the search.
Here is the code I was suggested to use, but I am having problems understanding how it keeps the choice in the menu.
I can almost understand how it works, but I need a little push to grasp it.
Here is the code:
foreach($options as $key => $content)
{
if ($key == $value) $select = ' selected="selected"';
else $select = NULL;
$html .=
'<option value="' . htmlspecialchars($key) . '"' . $select .
'>' . htmlspecialchars($content) . '</option>' . "n";
}
Now I understand how to walk through the code, but I am having trouble understanding how it holds over the choice.
THanks in advance for the help...
Help: problem with Headers to download PDF file
Hi,I'm trying to implement a script where when a user clicks a link he gets a PDF file to open or save.In my index.php page I have the following link:Code: <a
reorder sql query
ok so i have this very simple code:Code: $query = "SELECT search_keywords, COUNT(search_keywords) AS counter FROM phpbb_popsearch GROUP BY search_keywords ORDER BY counter DESC limit 5";
please help
HTML Code:Code: <span id="ctl00"><span> <div class="ldpPropFeatures"> <div
problems with contact forms that are only protected against SQL injections
What could be a potential problem with contact forms that are only protected against SQL injections and have an admin side view for the enquiry ?
Need help to identify this error please
:confused:Can anyone help me tell what this error message means? Maybe tell me where to look to fix the error as well?Thanks
gmmktime or mktime
I live in the UK, i am within the GMT (with daylight saving time ie 1 hour difrence between summer and winter) Should i be using GMDATE and GMMKTIME or DATE and MKTIME... for all my date and time
php require help needed
Ok i tried to use the search funtion but the word require is everywhere.i'm really new to creating websites... I've built them in the past but allways had some sort of template to go off of from a
Keeping data in form
How can I keep whatever I write in the form?
MSSQL/PHP
I am tryint to setup a webapplication developed in PHP, Apache2.0 and SQLServer2000 as backend which is running smoothly on a system in UK. I got the code and database backup from the Production
If statement help please.
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and the second one is for a sub navigation (which is a small box). I am trying to write an IF statement so