HuggieBear
Members-
Posts
1,899 -
Joined
-
Last visited
Everything posted by HuggieBear
-
Sorry, I'm lost. You want to return to the form page after submitting the form? Regards Huggie
-
What exactly isn't functioning, they both appear to be working the same as far as I can see. Pagination looks good on both. Regards Huggie
-
It's a simple enough test to try :) But yes, relevant to the calling doc, not the included doc I believe. Regards Huggie
-
Wildteen, off topic.... Any idea why bladechob's code window scrolls and mine doesn't? Regards Huggie
-
You need to escape the quotes... [code] echo "<font color=\"white\">We are sorry but the dates you have selected are either being provisionally held or not available. Please select another date range or contact Selina Brady on 0870 770 4032 or email <a href=\"mailto:info@southernsunresorts.co.uk\">info@southernsunresorts.co.uk.</a>"; [/code] Regards Huggie
-
No problem at all. Regards Huggie
-
Correct... Try: [code=php:0]if ($album == ""){ [/code] Regards Huggie
-
OK, you're hard coding the option descriptions, so you may as well just hard code the values... <select name="found_us_by" > <option value="Recommendation">Recommendation</option> <option value="Search Engine">Search Engine</option> <option value="Flyer">Flyer</option> <option value="Total Mobile">Total Mobile</option> <option value="What Mobile">What Mobile</option> <option value="Computer Weekly">Computer Weekly</option> <option value="Other">Other</option> </select> Regards Huggie
-
Where you've messed up is here: [code] function outputOptionList(&$list, $selected) { foreach ($list as $item) echo "<option value=\"{$item['Value']}\"" . ($item['Value'] === $selected ? " selected=\"selected\"" : '') . ">{$item['Text']}</option>\n"; } [/code] There's nothing that calls this. It looks to me as though you've taken a page and tried to modify it, rather than coding it from the beginning, this isn't a major problem, but has meant that it's taken us a long while to find something simple... Can I suggest you post the code of the whole page. Regards Huggie
-
The fact it shows... [b]["found_us_by"]=> string(0) ""[/b] means it's submitting fine, but there's no value. If you open the page in your browser and before you type anything in, view the source of the page. Lets have a look at what the html looks like. Regards Huggie
-
That's because we're sad and sit on here all day :D Huggie
-
I'd recommend a regular expression for this... Try posting in the Regular Expression forum on this board and in the mean time check out [url=http://uk.php.net/manual/en/ref.pcre.php]the manual[/url] on it. Regards Huggie
-
ok, do this for me... After this code: [code] if ($_SERVER['REQUEST_METHOD'] == 'POST') { $formValues = $_POST; $formErrors = array(); [/code] Put this: [code] var_dump($formValues); [/code] This will output the contents of your formValues array to the screen. Can you copy it and paste it here? Regards Huggie
-
Yes, but there should be more than that.. Regards Huggie
-
You need to change the php code too, but because I can't see all of that, I can't tell you what to change. Are you able to post the php code that deals with the values once it's submitted? Regards Huggie
-
Something else you should probably change, underneath this code: [code] <?php mysql_connect( "localhost", "user", "pass" ); // Use correct stuff there mysql_select_db( "database" ); // Use Database Name ?> [/code] Replace this: [code=php:0]$cat=$_GET['cat']; [/code] With this: [code=php:0]if (isset($_GET['cat'])) $cat = $_GET['page']; else $cat = "star"; [/code] Is this line, all it does is provide a default category incase someone attempts to get to test.php on its own without specifiying one. Let me know if you're still having problems. Regards Huggie
-
I know what it is!... Look at the name of your select box. It's called 'select' not 'found_us_by' Regards Huggie
-
help with layout of multiple results in table... *SOLVED*
HuggieBear replied to brown2005's topic in PHP Coding Help
Can you provide all of the code for this section, including the while loop... Also use code tags as it's easier to understand... [b][[/b][b]code][/b]My code goes here[b][[/b][b]/code][/b] Regards Huggie -
ok, I think I'm missing something here.... Why are you using a jump menu for that option list? I'm a little out of touch with HTML, but aren't jump menus, designed to move to another section of page/another page all together when you select the value? Regards Huggie
-
ok, you could try this: [code] $result_schedules_scores = mysql_query("SELECT * FROM schedule_scores WHERE season = '000000000001' AND team1_score IS NOT NULL AND team2_score IS NOT NULL ORDER BY 'date' DESC LIMIT 1"); [/code] Regards Huggie
-
Hi, Change: [code=php:0]$day = ($day +1); [/code] To: [code=php:0]$day++; [/code] Regards Huggie
-
Does it by any chance work if you select Recommendation but not the rest? Regards Huggie
-
OK, let me put it another way... [quote]What I am want to do is to check through schedules_scores table and get the last one which had scores entered into the table and display that.[/quote] How do you know which the last one to have scores entered was? Regards Huggie
-
You'd need an additional column, of type timestamp. This way your date column would hold the date of the match and the timestamp column would hold the time of the last update to the row. You could 'ORDER BY' either. An example would be that if a team played one week ago today, my date column would contain 21/09/2006 but your timestamp column would contain 28/09/2006 13:19. [color=red][size=8pt]Note: Formats aren't accurate[/size][/color] Regards Huggie
-
There was, but I didn't think you'd be using it... It's in the code, but it's commented out: [code] <?php $y = mysql_result($result, $x, 0); // Commented out so I could show your example ?> [/code] What this does is get the data for a particular cell. Check the manual for the [url=http://uk.php.net/manual/en/function.mysql-result.php]mysql_result[/url] function. I've given it three parameters. The first is the result set to use, the second is the database row number, as you can see, I've used $x as that's my table row number and finally a field offset. My data was in the first column, so I had no need to offset, hence the 0. This maybe a little confusing, but you should be OK. Regards Huggie