Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. OK. Can't see the form so make sure that has the correct fields. when comparing strings try using strcmp($password, $password2) == 0 (I think thats just good practice!) BUT the one thing that kills it is $key=md5($user_name); you have no $user_name - just $username so I suspect the key field in your database is not null and has no default value it will always get the md5 of null. PS Just read thorpes - key is indeed a reserved word!!!
  2. post your query that grabs the blog entries....
  3. try placing your product image as a background image of a span tag. give the span width and height (and display: block) then when the product has sold out you simply need to put <img src="soldout.gif" /> in side the span. If it has transparancy in all teh right places then it will appear on top of the product image.
  4. <?php echo "<td><img src=\"../images/".$row[9]."\" width=\"" . $yourwidth ."\" height=\"" . $yourheight . "\" /></td>";  ?>
  5. for ($i = 5; $i > 0; $i--) { echo $i; } ALTERNATIVELY sort your blog entries in DESC order in your query.
  6. you can do this using the cascade. if you want all your links in your navigation to be green and these links are inside a div with id="nav" then simply use: [code] div#nav a { color: green; } [/code] this will ensure only those anchors in the div with that id will take on the style. Then your table can be in another div that is NOT a child of div#nav will not take on those style properties.
  7. ToonMariner

    safari

    Hey peeps, I have a problem with fieldsets and safari. I have the following html... [code]<div id="media"> <img src="/userfiles/images/contact.jpg" alt="image" width="380" height="320" longdesc="/longdesc.php?image_id=61" /> <span class="hidden"><a href="/longdesc.php?image_id=61">d</a></span> </div> <div id="text"> <form action="/index.php" method="post" enctype="application/x-www-form-urlencoded"> <fieldset> <legend>Person</legend> <label for="person">Person:</label> <select name="mailto" id="mailto"> <option value="contact-us/person">Please Select...</option> <option value="2">Rob Charlton</option> <option value="6">Mike Douglas</option> <option value="8">Richard Elphick</option> <option value="3">Joe Gellert</option> <option value="10">Andy Roberts</option> </select><br /> <label for="name">Your Name:</label> <input type="text" name="name" id="name" value="" /><br /> <label for="email">Email:</label> <input type="text" name="email" id="email" value="" /><br /> <label for="subject">Subject:</label> <input type="text" name="subject" id="subject" value="" /><br /> <label for="message">Message:</label> <textarea name="message" id="message"></textarea><br /> </fieldset> <input type="hidden" name="section" id="section" value="contact-us" /> <input type="hidden" name="mode" id="mode" value="person" /> <input type="submit" name="submit" id="submit" value="Send" /> </form> <div class="clear"></div> </div>[/code] Now the div#media is floated right. BUT the fieldset in safari goes behind the image and is 100% the width of the div#text. I have tried setting a right margin on the fieldset to no avail. I know safari support for fieldsets is not too hot but this is driving me mad. url if you need it. [url=http://waringnetts.contrastcompany.co.uk/contact-us/person]http://waringnetts.contrastcompany.co.uk/contact-us/person[/url]
  8. just include the file - u'll be fine
  9. have you looked at just vreating a style sheet with th emedia="print" attribute? this measn you don't need to create a diiferent html page for print - just use the same pages. There are some css properties to keep certain text with other text - i.e. to prevent it breaking over pages which is waht you're after.
  10. just dump the contents of the $_session['myCart']; You could loop through that variable and format the output but essentially thats all you need to do.
  11. have a look at this [url=http://css-discuss.incutio.com/?page=BoxModelHack]http://css-discuss.incutio.com/?page=BoxModelHack[/url] It should shed some light on what is going on and what you can do.
  12. processing this data via direct from submission is fine - its as secure as your ssl encryption - if that is satisfactory go ahead and do your magic. MKAE SURE that the database is secure as it can be - encrypt the data using the mycrypt functions and try your best to make sure any keys are not available to the outside world. I personally would place the actual code that does the processing/encrption above the root folder of your site and simply include it the php script that accepts the data from teh form.
  13. use a recursive function to traverse the tree tructure and chek if the current file is_dir. make sure you account for . and ..
  14. [url=http://www.w3schools.com/ajax/ajax_example.asp]http://www.w3schools.com/ajax/ajax_example.asp[/url] This gives you all the js you need (bar a couple of mods to get it working on opera). It looks like exactly what you want - all you are doing is sending the value of the textbox to a php script which queries a database, checks some results and feeds back a string based on its findings. That script you will have to write your self - but that is the easy part ;)
  15. can u posta link to your site - its easire to see whats going on. It would be nice to have a link to old and one where the new is falling down.
  16. ToonMariner

    sizes

    Some CUSTOMERS demand fixed width sites!!!! 90% of our clients at work still (initially I might add) demand that a site looks exactly the same in IE5 on win98 and Safari on Mac OSX. We often sit an laugh for about 20 mins when that happens.... ;)
  17. you need to look at teh mod re_write rules if you wish to prevent these links going dead. If i were you I would continue with your updating to get the site php driven - even a cms may help! check out mod-write to redirect your old pages to new urls and get the site indexed once more ?(ps i learnt about mod_rewrite for friendly urls - apparantly bots index them buch better than urls like ?action=this&mode=that)
  18. yep. I think what play wants is to restrict the user to having 14 charcters in their nick name BUt allowing them to make them bold, italic, illegible etc. IN that case allow MORE characters in the database field for their nickname (hell go 255!) then when they submit use something like [code] if ( strlen(strip_tags($_POST['nickname'])) > 16 ) { // cancel the update } else { // do the update // use addslashes anyway - even if magic quotyes are on so long as you use // stripslashe on the output it won't matter too much. // better to check and use if magic quotes is off but if you aint sure use em. } ?> [/code]
  19. [code]<?php $num=mysql_numrows($res);    $prev_show_val = NULL; $prev_year = NULL; while ($row = mysql_fetch_assoc($res)) { if ($prev_year != $row['yea']) {   //update the year here so no years repeat   $prev_year = $row['date'];   echo '<font face="arial" size="6" color="#2F4F4F">'  . $row['year']. '</font>'; }     if ($prev_show_val != $row['date']) {   //update the show date here so no dates repeat   $prev_show_val = $row['date'];   echo '<font face="arial" size="4" color="#2F4F4F">'  . $row['date']. '</font>'; } } ?> [/code] Try not to use teh font tag though - its deprecated - use <span> or better still h1 h2 etc and STYLE them with your css.
  20. is this just YOUR database here or do many people use that interface - all with their own account?
  21. Forgot about that - go with the option groups!!! ;)
  22. thats a pity as using ajax would vastly improve your sites performance on a mobile deveice with limited connectivity speed. sending a whole new header for the entire page would slow teh site down a lot. conversly populating ALL the data on the one page load will cause another significant lag in loading time. I haven't really paid attention to development fpr mobile browsers bar using the stylesheet and media attribute. I would be interested if you had any information on what mobile browsers are capable of (in terms of js) or a link to resources where I could read up on such matters. If most of the mobile browsers do have some rudamanetary ajax support then I would go for the ajax other wise I would opt for the entire page to be loaded once more with the new info.
  23. ???? <a href=#>click here[/url] inside where? the link is dead btw -  i get the 404 page
  24. either the db already exists under a different user account or you don't have permission to create another database
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.