jscix
Members-
Posts
197 -
Joined
-
Last visited
Never
Everything posted by jscix
-
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?
-
<?php if($page == "" || $page=="Home") { include("includes/Home.php"); } elseif (file_exists("includes/$page.php")) { include("includes/$page.php"); } else { include("includes/404.php"); } ?>
-
[SOLVED] Check if a string contains something other than \n
jscix replied to papaface's topic in PHP Coding Help
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. -
[.NET] Any good resources/books for a beginner?
jscix replied to KevinM1's topic in Other Programming Languages
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 -
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.)
-
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?
-
PHP and SQL. You will use PHP to Manipulate, Save and Fetch Data from your SQL Database.
-
You either didn't enter all of the values for that row, or mistyped a feild name. I believe..
-
[SOLVED] Ensure a variable passed through through URL exists?
jscix replied to FridayRain's topic in PHP Coding Help
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" -
I'm not sure what the issue is, that causes this.. Perhaps someone else knows.. or you could contact your web-host for details.
-
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"; } } ?>
-
http://www.ibm.com/developerworks/library/x-xmlphp1.html
-
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.
-
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.
-
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...
-
$id = ($_GET['id']);
-
try doing: print_l ($game); See what results you get in the dumped array..
-
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..
-
[SOLVED] C#, Removing Duplicate items in a listview.
jscix replied to jscix's topic in Other Programming Languages
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 -
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
-
http://snippets.dzone.com/posts/show/1455 That should help.
-
Trying using if (strlen($username) < 1) || (strlen($password) < 1));
-
[SOLVED] Limiting number of characters in a string...
jscix replied to cgm225's topic in PHP Coding Help
substr($string, 0, 4);