Jump to content

jscix

Members
  • Posts

    197
  • Joined

  • Last visited

    Never

Everything posted by jscix

  1. Are you passing the value to your index.php, which then includes the script, which handles the database query? Why not link the form directly to a script that handles the query?
  2. <?php if($page == "" || $page=="Home") { include("includes/Home.php"); } elseif (file_exists("includes/$page.php")) { include("includes/$page.php"); } else { include("includes/404.php"); } ?>
  3. is_dir() opendir() readdir() closedir() if you need more help, pm me.
  4. if the string contains just \n, the STRLEN($string), of that string should be 2. if it's greater than two, it contains other character, or. or you could find the last position of \n, get all the text before and after it, and make sure each one has a value besides "" etc.
  5. Learning C# 2005 By Jesse Liberty, Brian MacDonald ............................................... Publisher: O'Reilly Pub Date: February 2006 Print ISBN-10: 0-596-10209-7 Print ISBN-13: 978-0-59-610209-8 Pages: 552
  6. In my experience* they are trash. Most of the 'in 24 hour' books I've read, tell you how to get things done but lack any detailed description of what your actually doing. Sure you might be able to copy down the code, and have a working guestbook.. but do you understand how each part works and why it works? What if you run into an error? It's always best to understand what your doing. (I haven't actually read that sams book, though.. it may be good.)
  7. Theres no one way to do anything, be creative. :-) That cookie file would get enormous after a while. I'd say, you could create a temporary tables and use timestamps. (time stamp of users last login, vs timestamps of posts made) etc.. might work, no?
  8. PHP and SQL. You will use PHP to Manipulate, Save and Fetch Data from your SQL Database.
  9. Most Oreilly books are good, generally look for 'introduction' books, try to avoid the 'learn php in 24 hours' type books. they are trash. good luck.
  10. You either didn't enter all of the values for that row, or mistyped a feild name. I believe..
  11. Simple.. if your new poetry entries are assigned a unique identifier upon submission, then if someone queues a poetry.php?poem=4, and there is not a poem assigned to that identifier (It should return nothing, or a blank array) then, you simply print out "Poem does not exist"
  12. I'm not sure what the issue is, that causes this.. Perhaps someone else knows.. or you could contact your web-host for details.
  13. well, I had to re-write my code in a way that when an error occured, it would still 'fall-though' the script, instead of dying. or exiting. E.G: <? //first query to obtain house info from user if ($GetHouseInfo = mysql_query("SELECT * FROM houses WHERE UserID='{$_SESSION['Current_User']}'")) { // Fetch the row from the database if (($houserow = mysql_fetch_assoc($GetHouseInfo))) { $GetHouses = mysql_query("SELECT houses.*, cities.*, countries.* FROM houses, cities, countries WHERE houses.UserID ='{$_SESSION['Current_User']}' AND cities.CityID = houses.CityID AND cities.CountryID = countries.CountryID") or die(mysql_error()); if (($gethouserow = mysql_fetch_assoc($GetHouses))) { $HouseTotals = mysql_num_rows($GetHouses); $GetHouseLodgers = mysql_query("SELECT * FROM userregistration , houses WHERE userregistration.HouseID = houses.HouseID") or die(mysql_error()); $HouseLoderTotals = mysql_num_rows($GetHouseLodgers); } else { echo "house not found"; } } else { echo "usr not found"; } } ?>
  14. http://www.ibm.com/developerworks/library/x-xmlphp1.html
  15. I had this happen to me before, on a free webhost,it usually only happened where I called die(), or exit(); check to see if your html, is cut off after your php include.
  16. PHP can't refresh the page, but it can redirect back, to the same page header("Location: page.html"); You can do it in javascript easily, though. oh. Also.. if your using the Header code, nothing can be outputted before-hand. It has to come before any data is sent to the browser.
  17. I'm hoping english isn't your first language, but from the sounds of: "it is color reconizing program which i want to be able to browse a certain game", sounds like you might need something like java...
  18. try doing: print_l ($game); See what results you get in the dumped array..
  19. if you only want to show the month, do some parsing.. rip the month out of the numerical date. $newdate = substr($order_date,5,6); then a simple case statement, switch ($newdate) { case "01": $month = "January"; break; } etc..
  20. Well I Figured it out a couple days ago, forgot about this post. .. if anyones interested or just in case someone else has this problem ever - The solution was to dump the list into an ArrayList Object, which has some awesome functions .. Much Much faster also. http://www.dotnetspider.com/kb/Article17.aspx
  21. Php isnt encoded in to the image, php has a graphics engine that can generate graphics. You basically create a php file that outputs an image, and link that outputting script as an img < img src = " whatever.php" > http://us3.php.net/gd
  22. http://snippets.dzone.com/posts/show/1455 That should help.
  23. Trying using if (strlen($username) < 1) || (strlen($password) < 1));
×
×
  • 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.