-
Image Slideshow
That'll be the problem - Internet Explorer has some security annoyances when opening a page stored on your own computer. Upload it to the net, goodbye yellow message.
-
Anyone elighten me as to why my code doesnt work?
#1 { ... } Rename it to #one, or something descriptive - IDs and classes can't begin with a digit. Check out the HTML spec:
-
Newbie baffled by 4 similar tags?
It's handy to know that there's only one element with a particular ID. For example, the <label> tag, or Javascript's document.getElementById.
-
W3C Validator & Site Error
Yeah, you should, though it's easy to let it slip out of laziness, fair enough - but I've not heard anybody specifically say to ignore a validator. If you're using an <h9> tag, which has never existed in any version of HTML, then you definitely need to pay attention to what it's telling you.
-
Mail advertising for web hosting
Treat these two separate groups separately. For those without a website, why even mention hosting? They neither know nor care what this means. Give them less things to worry about, not more, hosting is just a detail. For those with a website, why risk changing something they don't understand when their site just works? You need something remarkable, you need to sell them on the non-geeky benefits. Sing the benefits of sharing iCal/Vista calendars over the internet (with WebDAV), automatic backups (Mozy affiliation), comprehensive web stats (Google Analytics), and a spam-free inbox (GMail). The list goes on. Disk usage and bandwidth belong in the terms & conditions, not as a bullet-point in your sales pitch. Charge more than your competition, you'll be worth it.
-
++ operator
Yep, that's the difference between a prefix operator (++firstNumber) and a postfix operator (firstNumber++) When you're using firstNumber++, you're not being ignored, but the addition takes place after the line that it appears on. e.g: number = 1; alert(++number); // This increments on the same line, so will display "2" alert(number); // This will also show "2" number = 1; alert(number++); // This increments after this line, so will display "1" alert(number); // The postfix increment from above is now in effect, so this will display "2"
-
little help getting to grips with regular expressions needed
You're not a million miles away. ([^\"]+) matches at least one series of characters (that's the + sign), that aren't quote marks (that's the [^\"]) It doesn't match anything between FILE and the first quote mark, but otherwise you're right.
-
javascript error brings up error console
This is a Firefox quirk arising from linking to "java script:", where there's nothing following the colon. However, it's kind of the wrong question anyway, as search engines will be entirely unaware of any pages that are linked to in such a manner. For the most part, if you're using frames or iframes, you're doing something wrong which will end in tears and frustration. Look into PHP - if I weren't cramming a piece of toast into my face about to rush out the door, I'd be more helpful, but I'm sure somebody will tell you all about file includes
-
.inc.php what is .inc extension?
It's purely a matter of preference, though it's not especially common these days.
-
Php Search Engine Example
I haven't any examples I can give, I'm afraid, but I've had a quick go at your search form. Should be helpful - it's not complete, but it's something you can use as a base. By the way, I notice you're using VARCHAR everywhere in your database - this will make it difficult when searching through numeric fields. You should use INTs instead. <?php mysql_connect('localhost', 'root', ''); if (mysql_errno()) { trigger_error('Couldn\'t select database - '.mysql_error()); } mysql_select_db('dbsignup'); if (mysql_errno()) { trigger_error('Couldn\'t select database - '.mysql_error()); } $searchSubmitted = false; if ($_SERVER['REQUEST_METHOD'] == 'POST') { $searchSubmitted = true; $criteria = array(); if (!empty($_POST['gender'])) { // Gender selected - gender is a string $criteria[] = 'gender = \''.mysql_real_escape_string($_POST['gender']).'\''; } if (!empty($_POST['age'])) { // Age selected - age can only be a number $criteria[] = 'age = '.((int) $_POST['age']); } if (!empty($_POST['height_one']) && !empty($_POST['height_two'])) { // Both height_one and height_two are selected $criteria[] = 'age BETWEEN '.((int) $_POST['height_one']).' AND '.$_POST['height_two']; } else if (!empty($_POST['height_one'])) { // Only height_one was selected $criteria[] = 'age >= '.((int) $_POST['height_one']); } else if (!empty($_POST['height_two'])) { // Only height_two was selected $criteria[] = 'age <= '.((int) $_POST['height_two']); } $sql = 'SELECT * FROM customer'; if (count($criteria) > 0) { // Only add a where clause if some criteria have been selected. // If no criteria are selected, show all results. $sql .= ' WHERE ('.implode(') AND (', $criteria).')'; } // This is for debugging - remove it when you're happy with how things work print '<pre>'.htmlspecialchars($sql).'</pre>'; $result = mysql_query($sql); if (mysql_errno()) { trigger_error('Query failed - '.mysql_error(), E_USER_ERROR); } $customers = array(); while ($customer = mysql_fetch_assoc($result)) { $customers[] = $customer; } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Test</title> </head> <body> <form method="post"> <p> Gender: <select name="gender"> <option value="">(either)</option> <option>Male</option> <option>Female</option> </select> </p> <p> Age: <select name="age"> <option value="">(any)</option> <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option> <option>24</option> <option>25</option> <option>26</option> <option>27</option> <option>28</option> <option>29</option> </select> </p> <p> Height: <select name="height_one"> <option value="">(any)</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> to <select name="height_two"> <option value="">(any)</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> </p> <p> <input type="submit" value="Search" /> </p> </form> <?php if ($searchSubmitted): ?> <?php if (count($customers) == 0): ?> <p> Sorry, no customers were found for your search. Try altering your search options. </p> <?php else: ?> <table> <?php foreach ($customers as $customer): ?> <tr> <td><?php echo htmlspecialchars($customer['first_name']); ?> <td><?php echo htmlspecialchars($customer['age']); ?> </tr> <?php endforeach; ?> </table> <?php endif; ?> <?php endif; ?> </body> </head> </html>
-
Php Search Engine Example
EDIT: I assumed you meant a search engine for the entire site, rather than say a list of products in a database, so take the following with that in mind. Depends Would the search engine be for a large site or a small site? Databased or non-databased? Will you be using a shared hosting account, or do you have control of the server? Do you need to handle the search yourself, or would Google Custom Search be enough? A small site means you could use something that goes through all of the pages of the site every time somebody searches. It's not very efficient, but you could get away with it if you've not got hundreds of pages and your site isn't incredibly popular. It's fairly easy to set up. If it's a databased site (i.e CMS, blog, forum, something you've put together), you could look at a MySQL full-text search. Be sure to stem your words first. If it's a large, non-databased site, you're probably going to have to write a crawler, and either put results into MySQL, or use something like Lucene. Anyway, as you can see, there's no easy answer Do you want something that just works, is easy to setup and get your head around, or do you want to go all out and build something immense?
-
I sold out
P.P.S: Dizi totally meant it.
-
I sold out
Nobody's being serious, Penguin. You're great, don't take it personally. P.S: UNCLEAN
-
I sold out
UNCLEAN. BANISH HIM.
-
Jump to html page with form and a go button
Sure, you could do this: Enter a number:<br /> <input type="text" id="code" value="" /> <input type="button" value="Go" onclick="document.location = '/html/' + document.getElementById('code').value + '.html'" />