-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
In order to run PHP though you would need to install a web server (for instance Apache) and PHP. There are packages that make it really easy for you such as LAMP and XAMPP. You say you're using WinXP, is this for some kind of intranet site?
-
\w matches: a-z A-Z 0-9 _ Basically all it does is match a string that consists of *only* those characters I just listed above, and is 1 or more character in length.
-
Oh okay, just need to jiggle it around a little.. echo '<td><a href="' . $scripturl . '?action=downloads;sa=view;down=' . $file['ID_FILE'] . '"><img src="/images/' . $file['title'] . '.png" alt="" />' . $file['title'] . '</a></td>';
-
Do you mean using a CSS trick to show the text whilst images are disabled? For SEO purposes...
-
Oh sorry yeah... echo '<td><a href="' . $scripturl . '?action=downloads;sa=view;down=' . $file['ID_FILE'] . '"><img src="/images/' . $file['title'] . '.png" alt="' . $file['title'] . '" /></a></td>';
-
Within the code you provided, replace the second line (the echo statement) with the line I posted.
-
Can you elaborate on this? What do you see? Do you have errors disabled?
-
Okay cool, could you show the PHP code declaring the '$loc_long', '$loc_lat', '$loc_place' (...) variables.
-
Try.. echo '<td><a href="' . $scripturl . '?action=downloads;sa=view;down=' . $file['ID_FILE'] . '"><img src="/images/' . $file['title'] . '" alt="' . $file['title'] . '" /></a></td>'; Also removed the mix of variable joins / concatenation.
-
Revenue idea for phpfreaks (Second attempt)
Adam replied to dreamwest's topic in PHPFreaks.com Website Feedback
I personally hate those kind of in your face adverts, please don't get them :-\ -
Yeahh..
-
I posted a link showing how to use innerHTML. I'm not exactly sure why the document.write() method isn't working.. I can't remember the last time I used it to be fair, so I don't know a great deal about it. From the sounds of it though browsers have trouble with it when it's used within XHTML pages, take a look here. I'd say forget about document.write() and learn how to use other methods, namely innerHTML.
-
Heh no I agree about the missing brace, was just adding some extra thoughts in.
-
Sounds like you're using the wrong data type, integer i imagine? Try float for numbers with decimal points and varchar for mixed text. Edit: Ohhh missed that last bit. Can you post the table structure?
-
Actually you don't need to add in extra brackets like that. His was fine, yours has a syntax error. Also to add though, you're trying to use a variable before you've declared it. The $usernamefield and $passwordfield variables need to be moved before the query. You should also looking securing those inputs from XSS attacks. 1 more thing as well, to determine if the query successfully returned a matching row, use mysql_num_rows.
-
document.write() should work, but it's not the method I'd choose. I prefer to edit the 'innerHTML' of a div or span. What happens when you remove the comment for the alert()?
-
Ah knew it was around somewhere. Have a quick play around with this, a little 'font tester' Gevans made: http://projects.purplecoffee.co.uk/styler/
-
Thankyou nrg_alpha
-
As pointed out before, I think the website lacks a little something. Centering it would be a good idea, but also the font could use a little re-working as well. Unlike what other people have said though, I don't think a good design specifically requires the use of 2-3 fonts; however I do think you need to work on the style of the font more. Perhaps a few subtle graphics and varied shades would make the design look a lot better too.
-
Ha, I play squash every week and quite luckily never taken a jab like that yet! Hurts like hell to the face as well!
-
Give html_entity_decode a bash.
-
Somewhere in your code the htmlspecialchars function or similar is being applied to the data. This is generally to prevent XSS attacks, so ensure that it won't effect any other output before removing it.
-
Odd one. Thought there'd be a little more built-in functionality for this but can't seem to find anything. Came up with this in the end, seems a little bloated for what it is though: if (isset($_SERVER['HTTP_REFERRER'])) { if (preg_match('/^(www\.)?([^\.]+)/', parse_url($_SERVER['HTTP_REFERRER'], PHP_URL_HOST), $matches)) { print $matches[2]; } }
-
Try this: $colour_condition = ''; if (isset($_POST['Colour'])) { $colour = mysql_real_escape_string($_POST['Colour']); $colour_condition = "and Color='$colour'"; } $query_rsVehicle = "SELECT ID, `Vehicle Registration`, Make, Model, Color, Transmission, `Fuel Type`, Mileage, `Reg Year`, `Image Prefix`, `Key Point 1`, `Key Point 2`, `Key Point 3`, `Key Point 4` FROM vehicles WHERE Model LIKE \"%$Search%\" AND Wheelbase IN ('$Wheelbase') AND `Roof Height` IN ('$RoofHeight') $colour_condition";