-
Posts
895 -
Joined
-
Last visited
-
Days Won
1
Everything posted by phppup
-
I recognize the code (i was on that website TOO). And what I got needed to be tinkered with before it would work. Try re-reading the webpages before it to make sure any files or code that was used in a tutorial PRIOR to this one, are written properly and in your pocession. Check to make sure all the file names and field names follow the same structure. Good luck!
-
And why would someone want the redundancy of the statement the way I had originally copied it?
-
But what's the benefit of having it versus not using anything??
-
I'm stillnot exactly sure that I understand EXACTLY what that first line is COMMANDING. (as a newbie, some code just ends up in my script because a resource SAID it SHOULD be there, and NOT because i FULLY understand WHY i would WANT it there)
-
Why do you say that? And if you READ the ABOVE comments, this is just basic information!
-
Read the link, thanks! Is there a way to confirm a table or row SIZE so that this is known BEFORE adding additional columns or running into trouble?
-
Never used AJAX (except in the sink!) It's not THAT important, was just thinking out loud. There's probably something burried in my Javascripting that'd do it too, but I'm trying to learn/experiment with PHP and database usage.
-
So what happens if you go over? Does it just drop the last 115 columns (200 intended -85 suggested max)? Is there some sort of warning message triggered when the table is created (or surpassing the limits)?
-
OK, so I thought it was as simple as just slapping it in there and having it echo the time on my page. So I tried: date_default_timezone_set('America/New_York'); $date = date('Y-m-d H:m'); echo "It is now $date"; and got the same error as above: Fatal error: Call to undefined function: date_default_timezone_set() but when I took out the top line: date_default_timezone_set('America/New_York'); I got a time posting, but it is Californian. I suppose there are two different things I have in mind. Fist, just to have the time display as an ECHO message. Second, if I can get it to run, I would add it to my table so I could get the NYtime that a record was added.
-
Even the code from David provided me with: Fatal error: Call to undefined function: date_default_timezone_get()
-
code you've written: echo "it is now $date_default_timezone_set('America/New_York')"; $NOW() comprehensive explanation of the problem: It won't provide the time.
-
Thanks DAVID. So there really is no way to just stick NY time into a database? Or does this set the timezone perminently?
-
Plenty of times, and it JUSt won't function for me.
-
see above... need proper syntax
-
I've tried it several times, but it never seems to work for me. How scan i simply echo: it is now xxxx in New York?
-
That's probably suffiecient. Now I see why it might be advantages to using TINYINT's instead of VARCHARs. Nonetheless, a row with 150 or 200 VARCHAR columns shouldn't be a problem, should it?
-
Does time zone change have to occur in an INI file, or can I place it as a value. I've tried using default_time_zone ('America/New York') but had no success with it, even to just ECHO a statement that says: It is now 3:50PM in New York.
-
Along the same lines as a "Thank you for you submission" message, is there a simple way to echo the CHANGES made to a record AFTER it has been UPDATED. For example: You have added 2 skirts and 1 shirt to your order OR You're order has been reduced by 2 pair of socks. This would compare what was stored with the change. Alternately, is there a way to show a message that ONLY addresses the values that have CHANGED as a result of the UPDATE. Example: You have altered the quantity of the following items: dresses, hats, gloves.
-
Is there a limit to the number of columns a table can have? 100? 200?? some crazy large number not to be concerned with?
-
WOW! found the same line of code in my UPDATE script. Took it out and I'm working fine now. Thanks a TON! (i think i'll quit while ahead... LOL) So what EXACTLY is that line saying? And is it necessary in one way or another as a double-check process of the form?
-
It worked prviously with it (i think!), but i took it out and it seems to have repaired the problem. So what EXACTLY is that line saying? And is it necessary in one way or another as a double-check process of the form?
-
CONNECT if(isset($_POST['action']) && $_POST['action'] == 'submitform') { $roastturkey = $_POST['roastturkey']; $broccoli = $_POST['broccoli']; $brisket = $_POST['brisket']; $carrots = $_POST['carrots']; } $sql = "INSERT INTO pass (roastturkey,broccoli,brisket,carrots) VALUES ('$roastturkey','$broccoli','$brisket','$carrots')"; $result=mysql_query($sql); if($result){ echo "Successful"; }else { echo "ERROR"; } Fairly simple, I think, and it used to work. ** Disclaimer: Not responsible if this code causes hunger or urges to snack **
-
I will start posting code if I have to, but first, the only "adjustment" made to the actual database was that I may have added to columns (at various locations between others) and then I later deleted them. I have since replaced them as a troubleshooting technique, but their NAMES are NOT receiving any values (which is why I removed them in the first place). Does this sort of manuever affect the tables?? (I'm a newbie, so maybe I just messed it up... LOL)
-
My database was working fine (for test purposes) a week ago. Now, it will not record data input from my forms. If I add a new record, it adds the record, but none of the data. If I update a record, it erases the values. The forms and attached scripts have NOT undergone any changes, and they DO provide SUCCESS messages. Ideas?
-
I may be on my way to a solution. Question: If the code below will scan ALL fields of my form, how can I add to the code to eliminate just one or two of the inputs, while leaving the remaining 30? $myUpdateList = array();foreach($_POST as $indexName => $value) { $myUpdateList[] = "$indexName = \"$value