Jump to content

dooper3

Members
  • Posts

    161
  • Joined

  • Last visited

    Never

Everything posted by dooper3

  1. Thanks for your input, think i'm sorted now!
  2. This may seem like a simple and meaningless question to you all, but it is something that has intrigued me for a while... What is the correct protocol for version numbering for software etc. (i.e. when do you call something v1.7, v1.8, v1.9 etc. and when and why would you change the numbering to v2.0 etc.)?
  3. Hi all, I've just started to teach myself Javascript, and am struggling with my first script - give me php anyday! It partly works, in that the onFocus part works and the hidden span element appears, but the onblur part does not, and so the span element does not hide itself when the user moves into the next field. Here is the code for the script in the head section: <script language="javascript"> function ToggleMsg(input) { if (document.getElementById(input).style.display="none") { document.getElementById(input).style.display="block" } else if (document.getElementById(input).style.display="block") { document.getElementById(input).style.display="none" } } </script> And here is the code for the form: <form method=post name="myform"> <input style="width: 300;" onFocus="ToggleMsg('box1msg');" onBlur="ToggleMsg('box1msg');" /><br /> <span id="box1msg">This is my message</span> <input style="width: 300; margin-top: 10px;" onfocus="ToggleMsg('box2msg');" onblur="ToggleMsg('box2msg');" /> <span id="box2msg">Second message<span> </form> Each span element is already set as "display: none;" in the css in the head section when the page loads. Can anyone show me where i'm going wrong and explain why please?
  4. I agree with adam, rather than find a script ready made, learn about it by making your own. Research the use of mktime(), time() and date() functions and it's pretty straightforward from there.
  5. It would probably help to make sure your code is valid, currently it's not: XHTML Transitional (41 errors): Validate XHTML CSS - global.css (1 error): Validate global.css CSS - content.css (1 error, 10 warnings): Validate content.css
  6. Are you sure you mean you want to crop the image, or do you mean you want to resize it? They are different things. Cropping actually removes part of the image, but the rest of it stays the same size as it was before (though the overall image becomes smaller as a result of some of it being removed). Resizing is just taking an image and making it smaller, but keeping all of the original picture.
  7. remove the quote marks from either side of $database when you select the database. OR Don't put the name of the database into a variable at all and keep the quote marks when connecting to the database.
  8. Why not use substr();? $url=http://www.google.com; if (substr($url, 0, 7) != "http://") { echo ("You didn't enter http://"); } Hope that helps.
  9. no, date("Y-m-d H:i:s") is not valid, for the current time/date just use $now=time() as i said above. And sorry, $today should be $now.
  10. I'm sorry I don't really understand what you're trying to say. As long as you retrieve the expiry time from the database and put it in the variable $expiry then the above code will work.
  11. google for the word smarty gives you this response as first choice: http://www.smarty.net/ - template engine Google's handy, you should try it sometime and save yourself the trouble of asking people.
  12. Well it would be worth more up and running with a domain, because then anyone can buy it, otherwise you're limiting yourself to the tech savvy people.
  13. eBay under businesses-> internet businesses sedo.com and many domain parking sites that sell domains will allow you to sell developed websites too. There should be plenty of choices.
  14. Do it like this: $start='2008-01-11 06:38:44' $months_to_add=13; $qty_years=floor($months_to_add/12); $qty_months=$months_to_add%12; $bits=explode("-",$start); $year=$bits[0] $month=$bits[1]; $newyear=$year+$qty_years; $newmonth=$month+$qty_months; $newdate=$newyear."-".$newmonth."-".$bits[2]; That's probably not the best way of doing it, but it should work. I'm assuming that your date format is YYYY-MM-DD, not YYYY-DD-MM.
  15. I'm no javascript expert, but try changing the name of the function to something else. Some languages don't allow you to start variables and functions with words like "Print". Change it to something random like banana to test this. edit: Oops... if it was showing the alert before then it was not the name of the function causing the problem, ignore me!
  16. It seems nsr500rossi has php5 fastCGI support. Would having fastCGI enabled instead of standard PHP5 affect whether phpinfo(); could be shown?
  17. The script could be something along the lines of... $now=time(); $nextweek=$now+(60*60*24*7); if ($expiry<=$nextweek && $expiry >=$today) { mail($to,$from,$subject, "From: you@yoursite.com"); } Obviously you'd need to stick in your database connection bits around that script and make it a little more detailed than that, but I hope that gives you the idea. After the email was sent you'd also need to make sure that the database was updated to show that, otherwise people would receive multiple emails.
  18. Try putting the alert after the disabling part of the function, as an alert may stop the script running.
  19. Try this instead: mysql_connect($server,$username,$password); @mysql_select_db($database) or die ("Unable to connect to the database"); $id=$_POST['id']; $do=mysql_query ("SELECT id,venue_name FROM calendar_events WHERE status='confirmed' "); $x=mysql_num_rows($do); while ($row = mysql_fetch_array($do, MYSQL_ASSOC)) { for($i=0;$i<$x;$i++) { extract($row); $venues.="venue_name[$i]=$name&"; } } echo ("&total=".$x."&".$venues."id=$id"); ?> Haven't checked it but that should work I think.
  20. So the alert shows up but the Print button doesn't disable, or both don't happen? Start by putting the function script above the form input, not below.
  21. To bring it vaguely back on topic... 1) PHP won't allow you to install fonts on a user's machine as PHP runs server-side, not client-side 2) You fire the potato gun at the cheerleaders, then get them to rub marmalade into each other to soothe the bruising.
  22. This is the article you should read... http://webcollab.sourceforge.net/unicode.html but if your host doesn't want to give you mbstring, then it won't work.
  23. So do you want it to enlarge within the same page, or go to a new page which only shows the image full size with a link back to the person's profile or what?
  24. lol, sorry, probably not the best word to use. But you're thinking of skuttled, not scuppered. But for good measure - to sink a search engine you need 5 cheerleaders, a high powered potato gun and two gallons of marmalade. I won't insult your intelligence by telling you how to use all of those items, that's obvious, we all know!
×
×
  • 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.