User Profile

Collapse

Profile Sidebar

Collapse
help4me
help4me
Last Activity: Feb 19 '09, 08:30 PM
Joined: Aug 28 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • help4me
    replied to Need to retrieve primary key
    I found the answer. I just need to insert the following right after I save the 1st data then replace passcode with ID.

    $_SESSION['ID']=mysql_insert_i d();
    See more | Go to post

    Leave a comment:


  • help4me
    started a topic Need to retrieve primary key

    Need to retrieve primary key

    I am doing a survey with many pages. Everyone is given the same password to get into the survey (bulk mailing) but since it is to be done anonymously, they have no unique id assigned to them. My problem is that I don't know how to save the data without it (and then select it again). I usually have the following (passcode is the unique number usually assigned to them):

    Code:
    // Update respondent info
    mysql_query("UPDATE TABLE
    ...
    See more | Go to post

  • Thanks for your help! I got it.
    See more | Go to post

    Leave a comment:


  • help4me
    replied to Multiple MySql dates
    For some reason it's working fine today.
    Thanks for looking at my post anyway. :)
    See more | Go to post

    Leave a comment:


  • If I put this . . .

    Code:
    parseInt (answerA)
    parseInt (answerB)
       
      if (answerB > answerA)
      	{
        alert("\"Please enter a smaller number.")
        FormQ2.Q2.focus(); 
        return false;
        }

    . . . the error comes up for any number entered. Do I need to do something other than just put in parseInt()?
    See more | Go to post

    Leave a comment:


  • help4me
    started a topic Need help with greater than if statement

    Need help with greater than if statement

    I'm trying to write an if statement to see if the answer I just entered is larger than the answer on the previous page.
    But let's say the 1st number is 50 and the 2nd is 9. The alert comes up because the "9" is bigger than the "5" in 50.
    How can I make this work?

    I have a hidden field that is bringing the answer from page 1 to page 2.
    [HTML]
    <input type="hidden" name="Q1"...
    See more | Go to post

  • help4me
    started a topic Multiple MySql dates

    Multiple MySql dates

    I need to have 3 different dates (with time) saved in a MySql database. I'm using the following:

    [PHP]
    $entered= Date("n-j-Y, g:i a");
    $began= Date("n-j-Y, g:i a");
    $complete= Date("n-j-Y, g:i a");
    [/PHP]

    They are each being saved from different php pages.
    My problem is that it only saves the first as MM-DD-YYYY, H:SS pm. The others only have MM-DD-YYYY....
    See more | Go to post

  • help4me
    replied to Need to tab through a form
    in PHP
    I am now!!! :) I forgot about using "\". Thanks so much!
    See more | Go to post

    Leave a comment:


  • help4me
    replied to Need to tab through a form
    in PHP
    I'm putting [HTML]tabindex="5"[/HTML]. This drop down is the 5th field in the tab order.
    See more | Go to post

    Leave a comment:


  • help4me
    started a topic Need to tab through a form
    in PHP

    Need to tab through a form

    Quick (and hopefully easy) question . . .
    I’m trying to figure out where in the following php code to place the tabindex number. What the code does is show the already selected answer that has been saved to a MySql table. I have other fields before and after and would like to be able to tab through them all.
    I’ve tried different places but keep getting this error - Parse error: syntax error, unexpected T_LNUMBER, expecting ','...
    See more | Go to post

  • help4me
    replied to Radio Buttons answers not going into MySQL
    in PHP
    I finally got it to work using this:

    [PHP]<input type="radio" name="QA" value="AA" <?php if($row[QA]=='AA')echo "checked"; ?> /> AA <br />[/PHP]
    Since I'm pulling it from a certain row in my database I guess I needed the $row[].

    Thanks for the help!
    See more | Go to post

    Leave a comment:


  • help4me
    replied to Radio Buttons answers not going into MySQL
    in PHP
    Hi Atli,
    I still can't get it. This is want I have now. (Just the 1st question)

    [PHP]switch($QA)
    {
    case "AA": $checkAA = "checked"; break;
    case "AB": $checkAB = "checked"; break;
    case "AC": $checkAC = "checked"; break;

    }[/PHP]

    [HTML]1st Question:
    <p><input type="radio"...
    See more | Go to post

    Leave a comment:


  • help4me
    replied to Radio Buttons answers not going into MySQL
    in PHP
    Thanks for responding. I've worked at it and now have the values going to my database. Now I need to pull them back into my form when I open it again. I tried the following but it isn't working.



    [PHP]
    switch($QA)
    {
    case "QA": $checkAA = "checked"; break;
    case "QA": $checkAB = "checked"; break;
    case "QA": $checkAC = "checked";...
    See more | Go to post

    Leave a comment:


  • help4me
    started a topic Radio Buttons answers not going into MySQL
    in PHP

    Radio Buttons answers not going into MySQL

    Hope someone can help me out with this.
    I'm having trouble getting my radio button values into a MySQL database. And after I do get them inserted I'm going to want to be able to show them back in the form again (if the respondent didn't finish the whole form the first time). My text and textarea fields are inserting just fine and I'm able to bring those back up too. It's just the radio buttons that aren't working. When I created the table...
    See more | Go to post

  • help4me
    replied to PHP code not updating MySQL table
    in PHP
    I'm jumping up and down, clapping! (Can you tell I'm a girl?)
    I got it to work!! Thanks for everyone's help.
    Now on to an email responder. I'll be sure to start a new thread if I need help with that. High 5s to everyone!
    See more | Go to post

    Leave a comment:


  • help4me
    replied to PHP code not updating MySQL table
    in PHP
    Thanks for the responses back! I’ve taken another look at using sessions. Still not working. But I think I’m on the right track.

    Atli, I checked out the article suggested. As a test, I’ve made 2 pages. I’m trying to get my name from a form on page one to show up on the next page. But I can’t get it to work.

    Here is page 1:

    [PHP]<?php
    // Start the session
    session_start() ;...
    See more | Go to post

    Leave a comment:


  • help4me
    replied to PHP code not updating MySQL table
    in PHP
    Sorry. Not sure why the ' wasn't around the passcode in my code above. That coding works, putting everything in the table fine. I think the problem is in the where directions. How do I bring the variable '$passcode' from the first page to the third page? I've tried sessions but I can't get that to work either.
    [PHP]$address = $_POST['address'];
    $city = $_POST['city'];
    $state = $_POST['state'];
    $zip = $_POST['zip'];...
    See more | Go to post

    Leave a comment:


  • help4me
    started a topic PHP code not updating MySQL table
    in PHP

    PHP code not updating MySQL table

    I am having trouble updating a table. The logic seems so simple but I just can’t get it to work. The table is named test. The column names are passcode, name, address, city, state, zip and email.

    First you have to sign into my site (name and passcode). This is a password protection page. The next php page holds the instructions to insert that data into the mysql table named test. At this time I am also inserting “fake data”...
    See more | Go to post
No activity results to display
Show More
Working...