-
Posts
623 -
Joined
-
Last visited
Everything posted by TOA
-
I'm trying to figure out what you need. Are you trying to get file permissions? A part of a file? Just to see if a file exists? Can you clarify a little?
-
Have you looked into sessions?
-
This might be in the wrong section so I appologize if it is, I wasn't sure where this would fit in. My questions are regarding LMS's (learning management systems). I have been reading an exorbitant amount of info over the last few days and have learned things I never wanted to know , but it just lead to confusion. The main thing I hope to gain here is an insight into what is good and what isn't (like have you used them before, what was your opinion, etc.) A little history...I started writing a program to do this, then learned that there was such a thing and I'm not one to reinvent the wheel, so I started on my search. SCORM standards, LMS's, LCMS's, its been a whirlwind. Joomla has one as a component, and since we currently use they're CMS to manage another site by our company, I thought it might be the right way to go with this site too, although, this site is completely a seperate venture and I was planning to maintain it manually, without a CMS, but I could go either way. Moodle has one too, so does coggno, so does blackboard, so does..... see my issue? Opinions, thought, ideas, comments? Thanks, and I hope this wasn't too A.D.D Any help would be greatly appreciated.
-
new lines within strings \n and making them appear in phpmail()
TOA replied to ThisisForReal's topic in PHP Coding Help
If you have your server on a microsoft machine, it must include a carriage return (\r\n) to get a new line. Also, I think \r and \n must be used in double quotes, but I may be wrong :-\ -
Try telling it how to order by -- ASC or DESC
-
Thats the exact way ist's supposed to work, so echo your POST values to see that things are being populated correctly. What echoes for $body? And try taking it out of the if statement to see if it works without it
-
np. Glad it was simple Please mark it solved if your issue is resolved
-
I bet the error is a resource ID error. You're trying to access info that is an array. Cycle through it with a while or for statement like this $sql = "SELECT * FROM ...."; $query = ($sql); while ($row = mysql_fetch_array($query)) { echo $row[your_db_field_name_here]; } Since you're only matching one it will only print one. And another tip, you shouldn't use *...explicitly define what fields to pull, its alot safer Hope that helps.
-
Problem with 2 page based form validation assignment
TOA replied to nicholerdouglass's topic in PHP Coding Help
What is happening? And btw...function definitons must come before function calls -
What happens now? And whats with the open if at the end of the mail script??
-
AdRock beat me to it I think you have the idea of sessions right, but just to clarify one thing..sessions variables will be available to any page that has session_start() on it, not just any page after. I think thats what you meant, but the way it was worded was a little iffy
-
It's hard to read code like that (use code tags please) but I noticed you have the rest in single quotes and not the one causing an issue...
-
This might be what you need http://php.net/manual/en/function.header.php but I doubt it. If I understand your post, you need AJAX
-
LIMIT should work. What happens? Or doesn't? And change this line $query = mysql_query("SELECT * FROM table WHERE date >= '$now' ORDER BY max(date) desc"); to $sql = "SELECT * FROM table WHERE date >= '$now' ORDER BY max(date) desc"; $query = mysql_query($sql) or die(mysql_error()); while testing because the answer is never
-
how to break if something doesn't exist (This should be easy)
TOA replied to Lucky2710's topic in PHP Coding Help
Sweeeeeeeet Don't forget to mark it solved -
how to show the 5 latest vistors referer's site url on my site ?
TOA replied to runeveryday's topic in PHP Coding Help
It would depend on your database setup, but the first time you'd just insert, the rest of the time update -
Whats wrong with it? What does it do/not do?
-
how to show the 5 latest vistors referer's site url on my site ?
TOA replied to runeveryday's topic in PHP Coding Help
For sure...both php and mysql can get you the current date to compare against. If you're worried about size (which you shouldn't be, thats what databases do best) then write the script to overwrite so there will be only 5 entries at any time. I would avoid wiping out a full days worth of url's because if someone comes to the site right after you wipe out the list, there will be no url's to show (except their own referer of course). -
how to show the 5 latest vistors referer's site url on my site ?
TOA replied to runeveryday's topic in PHP Coding Help
My guess is you'll need to store them in a file or a database. I think referer only remembers one step back. -
how to break if something doesn't exist (This should be easy)
TOA replied to Lucky2710's topic in PHP Coding Help
http://dev.mysql.com/doc/refman/5.0/en/distinct-optimization.html Selects only distinct values. May or may not help your issue, but it's worth a try -
how to break if something doesn't exist (This should be easy)
TOA replied to Lucky2710's topic in PHP Coding Help
Did you try DISTINCT?