Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by phppup

  1. 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)

  2. 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.

  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 = 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. 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.

  5. 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.


  6. 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?

  7. 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?


    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')";





    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 **

  9. 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)

  10. 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.



  11. 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

  • 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.