AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
seems to me like you will want to store both the page name and the image name in variables, then use an if conditional to compare the values.. $x = 1; $url = "page".$x.".php"; $image = "image".$x.".php"; something simple like that. however there are some questions that need to be answered. 1. how are these included files being generated? Dynamically? if not, you can simply add the right image manually.
-
convert image into thumbnail before displaying them.
AyKay47 replied to php_begins's topic in PHP Coding Help
I have a function that I use to make thumbnails that uses PHP's GD functions.. however make sure that GD is compiled with your PHP config -
NP++ initially does not have debugging capabilities, however there is a plugin for NP++ that links to xDebug.. check out this link http://sourceforge.net/projects/npp-plugins/files/DBGP%20Plugin/
-
Floating an image to the left and two paragraphs to the right
AyKay47 replied to music_fan01's topic in CSS Help
use margin-top or margin-bottom to separate your divs instead of breaks.. and the code that you wrote looks good in clearing the divs.. as long as that is your parent div that contains the floating divs.. clear:both is acceptable but in my opinion is an older practice.. -
IMO notepad++ is one of the best freeware editors out there..at least for windows.. if not the best
-
word of caution when dealing with notepad++.. it's encoding is defaulted to utf-8 BOM which will include a BOM (byte order mark) in the beginning of your code... and could cause some confusion when view in browser.. will need to be changed to utf-8 no BOM.. just a heads up
-
your image tags appear to be pathed correctly, the source data is filled in.. are these paths correct?
-
not sure how you have this set up.. but what you need here are variables for the amount of each ingredient needed and a variable for the number of people.. $salt = 1; $sugar = 20; $something_nice = 15; $number_of_people = 3; if($number_of_people > 1){ $new_sugar = $sugar * $number_of_people; $new_something_nice = $something_nice * $number_of_people; $new_salt = $salt * $number_of_people; } i would create a function to do this instead if it will be needed multiple times.. also i assume that the data will be dynamically created.. so the values will be variables most likely.
-
php.net tizag.com no need for books when there are free resources on the web
-
you can either use the clear: both hack for this or your can set a specific width to the parent div holding the floating divs and add "overflow: hidden" to capture the divs again
-
watch your capitilization.. what does a "view source" show your image path to be?
-
you would solve it gizmo..
-
i was thinking the same thing..
-
Floating an image to the left and two paragraphs to the right
AyKay47 replied to music_fan01's topic in CSS Help
a good practice is to use margins instead of breaks. you can define a width for your parent div and set it to overflow: hidden in stead of using the clear: both hack.. -
have you looked into using a database?
-
im not a big fan of that color scheme 9 times out of ten... however this is that one time where I think that it works for the subject in which this website is for.. I like the "what's happening" news feed, nicely done.. i would prefer a left-align text instead of center but that might just be me.. I'm not sure about the "sign up" section being at the bottom like that.. sort of hidden.. could spruce up the CSS on the "photos" and "buy, sell & swap"section tables.. a bit plain right now.. overall I like it
-
if those are the only characters in the string.. you can use this simple pattern for your preg_match.. $pattern = "~\d{4}~"; Edit: above poster beat me to it...
-
i have already told you that the WHERE statement you have will not work.. i will rewrite this for you $sql = "SELECT table.FirstName, table.LastName, table.CourseName, table.LessonStart, table.Weekday, table.Email, table.mMail, table.Postcode, table.Prefecture, table.City, table.Town, table.AddressLine1, table.AddressLine2 FROM Student LEFT JOIN (Enrol,SchCourse,Course,FEnrol,Address,KidsStudent) ON (table.StudentID=table.StudentID AND table.SchCourse = table.SchCourseID AND table.CourseID = table.CourseID AND table.CourseID = table.CourseID AND table.Postcode = table.Postcode AND table.KidsStudent = table.StudentID) WHERE table.DateOfBirth = '0000-00-00' OR (table.DateOfBirth BETWEEN '2001-01-01' AND '1995-12-31') GROUP BY table.FirstName ORDER BY table.FirstName ASC"; replace "table" with the correct table names.. no aliases
-
your where clause strikes me as invalid.. how could "DateOfBirth" equal "0000-00-00" AND be between those two dates? perhaps you meant an OR instead of AND.. as both of those conditions cannot be true at once
-
well the problem here obviously isn't a syntax error since you are not receiving an error from the mysql server.. the problem is that the query is not grabbing any rows due to your main WHERE clause.. I notice that you also need quotes around your two dates in this line. like so WHERE k.DateOfBirth = '0000-00-00' AND (k.DateOfBirth BETWEEN '2001-01-01' AND '1995-12-31')
-
try both suggestions in my previous post.. if it still doesn't work.. post your new code and i will look into it further..
-
since you have multiple and statements, i would use parenthesis around your BETWEEN clause.. $sql = "SELECT FirstName, LastName, CourseName, LessonStart, Weekday, Email, mMail, s.Postcode, Prefecture, City, Town, AddressLine1, AddressLine2 FROM Student s LEFT JOIN Enrol en ON s.StudentID = en.StudentID LEFT JOIN SchCourse sc ON en.SchCourseID = sc.SchCourseID LEFT JOIN Course c ON sc.CourseID = c.CourseID LEFT JOIN FEnrol fe ON c.CourseID = fe.CourseID LEFT JOIN Address a ON s.Postcode = a.Postcode LEFT JOIN KidsStudent ks ON s.StudentID = ks.StudentID WHERE DateOfBirth = '0000-00-00' AND (DateOfBirth BETWEEN 2001-01-01 AND 1995-12-31) GROUP BY FirstName ORDER BY FirstName ASC"; also, you need to use a table prefix for the DateOfBirth field.
-
have you tried using mysql_error() to output the MySQL error? $sql = "SELECT FirstName, LastName, CourseName, LessonStart, Weekday, Email, mMail, s.Postcode, Prefecture, City, Town, AddressLine1, AddressLine2 FROM Student s LEFT JOIN Enrol en ON s.StudentID = en.StudentID LEFT JOIN SchCourse sc ON en.SchCourseID = sc.SchCourseID LEFT JOIN Course c ON sc.CourseID = c.CourseID LEFT JOIN FEnrol fe ON c.CourseID = fe.CourseID LEFT JOIN Address a ON s.Postcode = a.Postcode LEFT JOIN KidsStudent ks ON s.StudentID = ks.StudentID WHERE DateOfBirth = '0000-00-00' AND DateOfBirth BETWEEN 2001-01-01 AND 1995-12-31 GROUP BY FirstName ORDER BY FirstName ASC"; mysql_query($sql) or die(mysql_error());
-
need to change your while loop to while ($row = mysql_fetch_array($result)) Edit: mikesta gave you a good way to debug code for things like this.. if your code is outputting a blank screen, and you have error_reporting set to on.. there will more than likely be a few errors sent to your error log