Jump to content

aleksanteri

Members
  • Posts

    130
  • Joined

  • Last visited

Everything posted by aleksanteri

  1. Must admit W3Schools was the way I got to real coding...I had been viewing page sources to learn HTML, but my syntax was far from correct, for example, I used <body> in <head> because I thought it was used to define the background color! Here I learned CSS, JavaScript, VBScript, PHP and SQL. I would never have been developing my skills in WWW without this site :)I use W3Schools for references for client scripting and PHP. PHP.net I use when I want info on things not on W3S yet or if I need another description when I am like .EDIT: OOH, almost forgot XML and especially XML:SVG. Really great tutorial. I am just hoping all major browsers would support SVG (OK, Opera supports it by default) by default. Then I could use SVG freely.
  2. I have used PHP now for a while and would like to have MySQL with it too, but it looks like I need to compile PHP manually. I had PHP installed in a binary and I have now the source code (the binary is safe still ) Few questions:- If I have PHP in C:\php-5.1.4\, what is the directory for MySQL? If MySQL doesn't come to the PHP directory, how do I configure PHP to use MySQL?- How do I configure PWS to use PHP?- Where can I get the tool to compile PHP?
  3. Try using relative values instead of absolute values.
  4. Version 5 has some more functions: DATE:date_default_timezone_get()date_default_timezone_set()date_sunrise()date_sunset()idate()FILE / DIR:scandir()file_put_contents()fputcsv()FTP:ftp_alloc()ftp_chmod()ftp_raw()ARRAY:array_combine()array_diff_key()array_diff_ukey()array_intersect_key()array_intersect_uassoc() array_intersect_ukey()array_product()array_udiff_assoc()array_udiff_uassoc()array_uintersect()array_uintersect_assoc() array_uintersect_uassoc()array_walk_recursive()HTTP:headers_list()setrawcookie()STRING:convert_uudecode()convert_uuencode()fprintf()htmlspecialchars_decode()str_ireplace()stripos()strpbrk()strripos()substr_compare()vfprintf()MISC:time_sleep_until() I caught these old release articles with my RSS reader from PHP.net
  5. So it's solved, right?
  6. Oh, yeah.You can use HTTP_GET_VARS[var] where var is var in $_GET[var].Short: HTTP_*_VARS[var] == _*[var]. * can be COOKIE, POST and GET.
  7. I was just thinking that could EasyPHP be changed with first- installing IIS from Settings \ Add and remove programs \ Add and remove Windows Components \ IIS- installing PHP binary and configuring it with IIS (included in installer)- installing MySQL from www.mysql.com but I don't know about configuring it, quess download just the binaryif it wouldn't be a problemThese links might come in handy: http://en.php.net/get/php-5.1.4-installer.exe/from/a/mirrorhttp://dev.mysql.com/get/Downloads/MySQL-4...2.zip/from/pickI needed the OS because if you were running for example Win98 like me, this trick would need PWS.It is important that you install the server first and select the same server from the list when PHP servers come.This trick worked on my Win98 when I downloaded PWS and PHP binary.
  8. Are you able to use HTTP_GET_VARS[var]?
  9. I changed my editor from NP2 to NP++... I like the way you can create your own syntax highlightings.
  10. Really? got to check that out, but if it really works, I didn't add WML to my NP++ supported user-defined languages for nothing
  11. You could put an empty space to the end and the start of a string and the test. Then you could check whole word:$user_agent = $_SERVER["HTTP_USER_AGENT"];$user_agent = " " . $user_agent;$user_agent .= " ";if(strpos($user_agent, " bot ") !== false)
  12. Has W3Schools or this forum got an rss feed? I just got a free reader and I'm looking for interest feeds (currently got one from PHP Group). Actually I'm just hoping to have my daily digest in feed form...
  13. Use a table with no cellpadding and cellspacing. <table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="img1.gif" alt="Image" /></td></tr><tr><td><img src="img2.gif" alt="Image" /></td></tr></table>
  14. I understand...What about not giving the menu imgs to divs but to the table tag? <table border="0" cellspacing="0"><tr><td id="tojlogo"></td></tr><tr><td id="link_anv_on">Användare</tr></td><tr><td id="link_admin_off"><a href="#" class="linksbutton">Administratör</a></tr></td><tr><td id="link_rapport_off"><a href="#" class="linksbutton">Intressent</a></tr></td><tr><td id="wrapper"></tr></td><tr><td id="wrapper_top"></tr></td></table>
  15. When you write XHTML, is it mandatory to use the XML definition? <?xml version="1.0" ?><!DOCTYPE ...><html><head><!-- some things --></head><body><!-- some things --></body></html>
  16. I mean I try to stop the month starting from sunday, you know to make the weekday valid for each date, the empty spaces before "1 June".However, although June 2006 starts from thursday, 1 June on my calendar starts on saturday...I used mktime to update the $timestamp with the new info.I am not able to use getdate(), it returns an assosiative array and my PHP shows me a warning of having constants when I try to use it. $getdate = getdate(time());$getdate[mon] returns a warning that constant "mon" is undefined...
  17. $html = "<table border=\"0\">"print($html); or something like that.
  18. PHP:$email = $_REQUEST["email"];$field1 = $_REQUEST["field1"];$field2 = $_REQUEST["field2"];$field3 = $_REQUEST["field3"];$field4 = $_REQUEST["field4"];if(!empty($field1) && !empty($field2) && !empty($field3) && !empty($field14) && str_match("@", $email) == "@" && str_match(".", $email))// form valid The email can be tricked however.
  19. You need to access "seemobject" with document.getElementById("seemobject") The document.seemobject works only if seemobject is in the name attribute of the object.
  20. OK, I'm doing a calendar but I don't know what is wrong on making PHP clear where is the month's first day. My solution was to valiadate each date's week number (0=sunday, 6=saturday).I don't know what is now wrong... it starts from saturday. <?php$months = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");$daynames = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");$timestamp = time();$month = (isset($_GET["month"])) ? $_GET["month"] : date("F",$timestamp);$year = (integer) (isset($_GET["year"])) ? $_GET["year"] : date("Y",$timestamp) ;$monthname = $month;foreach($months as $index => $temp){ if($temp == $month) $month = $index;}$timestamp = mktime(0, 0, 0, $month, $year);$days = (integer) date("t", $timestamp);$monthnum = (integer) date("n", $timestamp);?><html><body><form action="date.php" method="GET"><!-- month selector --><select name="month"><?phpforeach($months as $x){ $sel = ""; if($x == $month) $sel = " selected=\"selected\""; print("\t<option value=\"$x\" $sel>$x</option>\n");}?></select><!-- year selector --><select name="year"><?phpfor($y = 1970; $y <= 2010; $y++){ $totals++; $sel = ""; if($y == $year) $sel = " selected=\"selected\""; print("\t<option value=\"$y\" $sel>$y</option>\n");}?></select><input type="submit" /></form><table border="1" cellspacing="0" style="text-align: center"><tr><?phpfunction validate_month($weekday_int, $month, $year, $date){ $info_timestamp = mktime(0, 0, 0, $month, $date, $year); $right_week = date("w", $info_timestamp); if($weekday_int == $right_week) return true; else return false;}foreach($daynames as $day) print("\t<th>$day</th>\n");?></tr><?php$cellnum = 0;$datecount = 1;$weekdaycount = 1;for($x = 1; $x <= $days; ++$x){ $cellnum++; if($datecount % 7 == 1 && $datecount != 1) print("</tr>\n<tr>\n"); if(validate_month($weekdaycount, $month, $year, $x)) { print("\t<td>$monthname $x</td>\n"); ++$weekdaycount; } else { print("\t<td> </td>\n"); } ++$datecount;}?></table></body></html> thanks for advice.
  21. Yeah... but aspnetguy's forum sounds really good, I definatly need to check it out.
  22. He might be right. I found this for example:SQL quick ref validate
  23. I found on the XMLDOM tutorial that you can do a test on creating ADO objects."window.ActiveXObject" returns boolean true when the browser is IE (or should be)."(document.implementation && document.implementation.createDocument)" returns true when the browser is Mozilla etc etc.And now comes the coolest part. What if you can test that can it handle it. You can't give support to browser in the "Edit Preferences" section, eh? So: <script type="text/javascript">var browser = navigator.appNameif (!window.ActiveXObject && !document.implementation && !document.implementation.createDocument){alert("Your browser will not execute the slideshow script" + '\n' "It must be viewed in either Internet Explorer or Firefox")}</script> Note I'm not 100% sure about does this script work, but I think it should work... expect when Opera can return true in "(document.implementation && document.implementation.createDocument)", that might be a bummer that I'm really afraid of.
×
×
  • Create New...