-
Posts
2,965 -
Joined
-
Last visited
Everything posted by mikesta707
-
if it ran correctly before, and you didn't change it, then did you change any of your local server's settings?
-
when you show the error message, just exit the script. if($flag <>"OK"){ echo "<center>$msg <br> <input type='button' value='Retry' onClick='history.go(-1)'></center>"; exit(); } [/code] I would use a boolean value for the $flag variable. instead of $flag = "ok" if there are no errors, set $flag = false. and if there are errors, do $flag = true. then you can just do if ($flag){ but thats just personal preference
-
[SOLVED] Make users delete their OWN posts ONLY
mikesta707 replied to 3raser's topic in PHP Coding Help
do you ever create a $_SESSION['id'] variable? and is owner the correct column you should be referencing? -
[SOLVED by "yourNamehere"]
mikesta707 replied to Modernvox's topic in PHPFreaks.com Website Feedback
It sounds like your trying to sell us something. I'm starting to distrust you... -
this if(isset($_POST['submit'])) { $new_student = new Student; $new_student->add($fname); } doesn't echo anything, so no you shouldn't be getting any output on the screen. By the way, instead of creating an add function that will set the $fname attribute, I would just create a constructor that does that (since naming the student should be done when the object creation. THere is nothing stopping someone from creating a nameless student)
-
if you use a timestamp format for your date column, something like $time = "9:15 AM"; $timestamp = strtotime($time); //insert into database might work. Untested though, so it may need some tweaking
-
[SOLVED] Quick question - Need help with $id
mikesta707 replied to 3raser's topic in PHP Coding Help
write print_r($_GET) at the top of your page. Are you sure you are passing the value correctly in your link? The URL should look like report.php?id=5 -
[SOLVED] Quick question - Need help with $id
mikesta707 replied to 3raser's topic in PHP Coding Help
the url should look like report.php?id=5 (5 being an example id) and then on report.php you can access it by $id = $_GET['id']; variables posted through the URL are in the GET array -
I would suggest putting each class (or groups of related classes) in their own include files.
-
have you tried strtotime()
-
I've seen worse, but an OOP style may help you. I would start with a student class (controls the students attributes, like grades and such, and updates them), and maybe a class (as in school class) class (that has an array of the students and stuff).
-
you can send an AJAX request in the function that shows the text (IE the onClick function) that will send the value of the vote, and save it into a database
-
Maybe if you post your code we can help a little better?
-
Well to be able to steer you in the right direction, I would have to see some code, but if you are going the OOP route (which is a good idea, in my opinion) remember that OOP works best with multiple classes interacting with each other, instead of one big class that does everything
-
have you tried array merge?
-
You have to set the mime and content type to support html emails. $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
-
firstly, just use numbers, not numbers inside quotes. so instead of this if ($highlevel>='50'){ do this if ($highlevel>=50){ for all the line that are like that. you may want to try using intval() on the variable also, IE if (intval($highlevel)>=50){ Hope that helps
-
alert once submit button clicked and checkbox is empty
mikesta707 replied to robert_gsfame's topic in PHP Coding Help
create a javascript function that will check if the check box is checked and call that function in the onSubmit attribute of your submit button -
[SOLVED] passing content of $_GET['variable'] to $variable
mikesta707 replied to mckcd's topic in PHP Coding Help
I noticed that was an html page. If your server isn't configured to parse PHP in html pages (.html or .htm pages) then than may be causing the problem. However, if you can successfully echo the $_GET variable, then i'm not so sure. Is there no other code that could be impacting things? Do you have error reporting on? try adding error_reporting(E_ALL); ini_set('error_reporting', E_ALL); at the top of your script so you can see if there are any errors being output -
Well excuse me for not playing a point and click adventure. what real men don't appreciate point and click adventures
-
Attitudes toward foreign programmers
mikesta707 replied to foreignprogrammer's topic in Miscellaneous
Oh and by the way, life has more expenses than water, food, shelter, and electricity. You also need clothes, need to fix stuff, keep yourself clean, health/life insurance. home insurance if you want that. medicine if you need it. cable and internet if you want it. In New York City, a homeless person can average MORE than minimum wage just begging. You MAY be able to scrape by, if you are very lucky, on minimum wage in a suburban town, but forget about it if you live in a city, or urban environment -
http://www.webcheatsheet.com/php/send_email_text_html_attachment.php scroll down a little
-
How would you, create a timed survey or quiz.
mikesta707 replied to k21chrono's topic in PHP Coding Help
Alternatively you could use javascript, but it may be better to go with the session idea as javascript can be turned off, and changed and all that stuff -
just tested select drop downs in IE and it works fine for me. In IE6 of all things too. what version of IE are you using?
-
Attitudes toward foreign programmers
mikesta707 replied to foreignprogrammer's topic in Miscellaneous
48$ a month? are you daft? you are forgetting about your refrigerator, lighting, televsion/other electronics? your crazy 2000 gallons is also a lot less than you think it is. its about 2 gallons per minute in a shower (sauce: http://wiki.answers.com/Q/How_many_gallons_of_water_does_that_average_shower_use) so if you take a 20 minute shower, thats 40 gallons. a flush of a toilet wastes 2-4 gallons of water. so if you go to the bathroom 5 times a day, thats another 10-20 gallons. another 1-2 gallons of water brushing your teeth. If you brush your teeth twice a day thats another 2-4 gallons. In total thats 51-64 gallons a day. Not including washing the dishes/washing your hands/ using water for anything else at all. Lets assume we use another 10-20 gallons doing those things. Thats 60-80 gallons a day. This is assuming you NEVER have anyone else over that might want to use the bathroom, or have a drink of water. for all intents and purposes, if you define a meal as having all the nutrients you need, none of these qualify as a meal. For your information, beans can cost from 33c-50c per can (yeah pretty cheap). Rice can cost ~ 1 dollar per pound (again cheep). you also didn't mention gas/heating. and "You can live in a warm environment!" is a cop out. While you can live without air conditioning, in any place but the south heat is pretty much a must. do you actually live alone or pay bills?