Jump to content

phppup

Members
  • Posts

    892
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by phppup

  1. 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.
  2. 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)?
  3. 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.
  4. Even the code from David provided me with: Fatal error: Call to undefined function: date_default_timezone_get()
  5. 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.
  6. Thanks DAVID. So there really is no way to just stick NY time into a database? Or does this set the timezone perminently?
  7. Plenty of times, and it JUSt won't function for me.
  8. see above... need proper syntax
  9. 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?
  10. 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?
  11. 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.
  12. 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.
  13. Is there a limit to the number of columns a table can have? 100? 200?? some crazy large number not to be concerned with?
  14. 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?
  15. 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?
  16. 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 **
  17. 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)
  18. 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?
  19. 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
  20. okay. still got similar message. There is no success message so I have to assume I'm connecting. Gonna need to check the database directly, but got same messages twice (only variations were from order number and item quantitieis.)
  21. Still runnning your code and I got: Array ( [record_id] => 2 [roastturkey] => 4.00 [broccoli] => 0.00 [brisket] => 0.00 [carrots] => 0.00 [submitpass] => Submit Order )
  22. Drum: I used your code in place of mine (with commented areas remaining commented) and got a BLANK screen response. Pikachu: How shall i do that? (please be specific as to where to place code if you provide any)
  23. I only get messages from "echo MySQL" when there is success, so I have to assume that there are no messages on failure because there is NO DATA being transferred. The $id_record connection is not being made. :-(
  24. It did NOT work. I commented OUT these lines, and hardcoded the third, and DID get a SUCCESS message: #$pass = array();foreach($_POST as $indexName => $value) { $pass[] = "$indexName = \"$value\"";} #$fields = implode(",", $pass); $sql=("UPDATE pass SET carrots ='6' WHERE id = '5' "); So now what??
  25. Am i adding anyplace specific, because when I put it where I thought it should go, I still get the same failure ERROR.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.