Jump to content

brownbrod

Members
  • Posts

    23
  • Joined

  • Last visited

brownbrod's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you!! That's what was wrong!!! I greatly appreciate your help. Have a wonderful day!!!
  2. Yes, I have this first: session_start(); $_SESSION['name'] = $_POST['name']; $_SESSION['cslogin'] = $_POST['cslogin']; $_SESSION['domain'] = $_POST['domain']; $_SESSION['project'] = $_POST['project']; $_SESSION['ODM'] = $_POST['ODM']; $_SESSION['hwphase'] = $_POST['hwphase']; $_SESSION['ppmid'] = $_POST['ppmid']; $_SESSION['survey'] = $_POST['survey']; $_SESSION['month'] = $_POST['month']; Then it is directed to this: session_start(); $_SESSION['name'] = $_POST['name']; $_SESSION['cslogin'] = $_POST['cslogin']; $_SESSION['domain'] = $_POST['domain']; $_SESSION['project'] = $_POST['project']; $_SESSION['ODM'] = $_POST['ODM']; $_SESSION['hwphase'] = $_POST['hwphase']; $_SESSION['ppmid'] = $_POST['ppmid']; $_SESSION['survey'] = $_POST['survey']; $_SESSION['month'] = $_POST['month']; $_SESSION['Q1'] = $_POST['Q1']; $_SESSION['comment1'] = $_POST['comment1']; The for the question 2 start I have this: session_start(); $name = $_SESSION['name']; $cslogin = $_SESSION['cslogin']; $domain = $_SESSION['domain']; $project = $_SESSION['project']; $ODM = $_SESSION['ODM']; $hwphase = $_SESSION['hwphase']; $ppmid = $_SESSION['ppmid']; $survey = $_SESSION['survey']; $month = $_SESSION['month']; $Q1 = $_SESSION['Q1']; $comment1 = $_SESSION['comment1']; So I should eliminate question 2 start and leave it as is?
  3. The next page after the POST data page is this: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Question 2</title> </head> <body> <?php session_start(); $name = $_SESSION['name']; $cslogin = $_SESSION['cslogin']; $domain = $_SESSION['domain']; $project = $_SESSION['project']; $ODM = $_SESSION['ODM']; $hwphase = $_SESSION['hwphase']; $ppmid = $_SESSION['ppmid']; $survey = $_SESSION['survey']; $month = $_SESSION['month']; $Q1 = $_SESSION['Q1']; $comment1 = $_SESSION['comment1']; ?> Name: <?php echo $_SESSION['name'];?><br> Q1: <?php echo $_SESSION['Q1'];?><br> Comments: <?php echo $_SESSION['comment1'];?><br> Is this where I am loosing the data? How would I re-send the POST data? I greatly appreciate it. Thanks
  4. What I am doing is pulling the name and login stored in one table and trying to copy it to another along with additional information I need to collect. Is there a way to do this?
  5. Hi, I am doing a survey and need a little guidance. I have data being selected from one table and I am trying to store it in another. I have no problem selecting the data and displaying it, I just can't get it to continue on with the new survey. Here is the file showing the data collected: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Question 1</title> </head> <body> <?php session_start(); $_SESSION['name'] = $_POST['name']; $_SESSION['cslogin'] = $_POST['cslogin']; $_SESSION['domain'] = $_POST['domain']; $_SESSION['project'] = $_POST['project']; $_SESSION['ODM'] = $_POST['ODM']; $_SESSION['hwphase'] = $_POST['hwphase']; $_SESSION['ppmid'] = $_POST['ppmid']; $_SESSION['survey'] = $_POST['survey']; $_SESSION['month'] = $_POST['month']; ?> Name: <?php echo $_POST['name'];?><br> CS Login: <?php echo $_POST['cslogin'];?><br> Domain: <?php echo $_POST['domain'];?><br> Project: <?php echo $_POST['project'];?><br> ODM: <?php echo $_POST['ODM'];?><br> HW Phase: <?php echo $_POST['hwphase'];?><br> PPM ID: <?php echo $_POST['ppmid'];?><br> Survey: <?php echo $_POST['survey'];?><br> Month: <?php echo $_POST['month'];?><br> Everything from table 1 is displayed above. No problem. Here is the next page after this. Question #1 has already been answered: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Question 2</title> </head> <body> <?php session_start(); $name = $_SESSION['name']; $cslogin = $_SESSION['cslogin']; $domain = $_SESSION['domain']; $project = $_SESSION['project']; $ODM = $_SESSION['ODM']; $hwphase = $_SESSION['hwphase']; $ppmid = $_SESSION['ppmid']; $survey = $_SESSION['survey']; $month = $_SESSION['month']; $Q1 = $_SESSION['Q1']; $comment1 = $_SESSION['comment1']; ?> Name: <?php echo $_SESSION['name'];?><br> Q1: <?php echo $_SESSION['Q1'];?><br> Comments: <?php echo $_SESSION['comment1'];?><br> It displays question 1 and comments with no problem. This is where the "name - month" is lost. How would I have name - month continue on to be store in a new table? I greatly appreciate your help. Thanks!! Note: based on the question for #1, the user is redirected to question 2 or question 3. Here is the file that is between Q1 and Q2 <?php session_start(); $_SESSION['name'] = $_POST['name']; $_SESSION['cslogin'] = $_POST['cslogin']; $_SESSION['domain'] = $_POST['domain']; $_SESSION['project'] = $_POST['project']; $_SESSION['ODM'] = $_POST['ODM']; $_SESSION['hwphase'] = $_POST['hwphase']; $_SESSION['ppmid'] = $_POST['ppmid']; $_SESSION['survey'] = $_POST['survey']; $_SESSION['month'] = $_POST['month']; $_SESSION['Q1'] = $_POST['Q1']; $_SESSION['comment1'] = $_POST['comment1']; switch ($_POST['Q1']) { case "No": $url = "filename"; break; case "Yes": $url = "http://odmQ3_a.php"; break; case "Supplier Assessment is ongoing and issues still being worked": $url = "odmQ3_a.php"; } header("Location: $url"); ?>
  6. I have a update query that should be updating the timestamp when a "month" field is changed. I have the following code: $month_update->bindParam(':timestamp', strtotime (date("Y-m-d H:i:s")), PDO::PARAM_INT); The result that is returned is 1403198033. I need it to look like this 2014-03-26 07:09:06. I know I am missing something and I would greatly appreciate your help. Thank you so much!
  7. As always!! Thank you for your help. You are awesome!!
  8. One more question. Using this formula can I update two fields in one submit? For example: //update firstname, since it was updated. $firstname_update = $dbh->prepare('UPDATE contacts SET ' . 'first=:first WHERE ' . 'id=:id '); $firstname_update->bindParam(':firstname', $_POST['first']); $firstname_update->bindParam(':id', $_POST['id'], PDO::PARAM_INT); $firstname_update->execute(); //update lastname, since it was updated. $lastname_update = $dbh->prepare('UPDATE contacts SET ' . last=:lastWHERE ' . 'id=:id '); $lastname_update->bindParam(':lastname, $_POST[last]); $lastname_update->bindParam(':id', $_POST['id'], PDO::PARAM_INT); $lastname_update->execute(); So when I click "SUBMIT" it updates both? This is just an example. I greatly appreciate your feedback. Thanks so much!!!
  9. This is what I needed. Thanks for your guidance. I really appreciate it. Have a great day!
  10. I need to update the Name using the "ID" that is associated with the name. So what I was wondering is can I view what is already in the "first" field before it is changed?
  11. This worked perfectly. Now. is there a way to show what the old value is before you udpate it? What I have seen looks to be very complexed. For example: Let's say I am updating ID 5 and I want to make sure it belongs to Catherine ('first'). How would I do that? Thanks so much for your help.
  12. I have created a form to update records using the ID primary key. I am unable to use the Drop Down menu to select the record to update. I believe I have everything else correct. I would greatly appreciate your feedback. Thanks, <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head> <body> <?php $connect=mysql_connect('us70tudbs001.zam.alcatel-lucent.com:3306','norab','norab') or die("Unable to Connect"); @mysql_select_db('rightfirst') or die("Could not open the db"); $query="SELECT * FROM contacts"; $result=mysql_query($query) or die("Query Failed : ".mysql_error()); $i=0; while($rows=mysql_fetch_array($result)) { $roll[$i]=$rows['id']; $i++; } $total_elmt=count($roll); ?> <form method="post" action=""> Select the ID No. to Update: <select name="sel"> <option>Select</option> <?php for($j=0;$j<$total_elmt;$j++) { ?></option><?php echo $roll[$j]; ?></option><?php } ?> </select><br /> First Name: <input name="first" type="text" /><br /> Last Name: <input name="last" type="text" /><br /> Phone: <input name="phone" type="text" /><br /> <input name="submit" type="submit" value="Updated"/><br /> <input name="reset" type="reset" value="Reset" /> </form> <?php if(isset($_POST['submit'])) { $value=$_POST['sel']; $first=$_POST['first']; $last=$_POST['last']; $phone=$_POST['phone']; $query2 = "UPDATE contacts SET first='$first',last='$last',phone='$phone' WHERE id='$value'"; $result2=mysql_query($query2) or die("Query Failed : ".mysql_error()); echo "Successfully Updated"; } ?> <p align=right><a href="view.php">VIEW RECORDS</a></p> </body> </html>
  13. Hi. Just a quick question. I have the following: <input type="radio" name="q3" value="The Preliminary Reliability Prediction indicates that the Failure Rate Requirement can be achieved, there are no known blocking issues in the Prime’s DFR Dashboard, and the team has a plan to get to “green” on all DFR deliverables in the Prime’s DFR Dashboard " > When transferring to SQL I receive erros because of the special characters within the VALUE. I have seen a lot of PHP codes that has a "/" before the ">" . Example: <input type="radio" name="q3" value="Resources and funding to address all Reliability efforts (e.g. HALT/ALT testing) approved and in place" /> What does the "/" do? Does this allow for special characters? Is there an easy way to fix this error I receive or should I just remove the "" and () from the value? Thanks.
  14. Hi. Just a quick question. If you browse the web, I see that there are several form validations out there but they required JAVASCRIPT. I have serveral forms with CHECKBOX for survey questions. Several of the questions only allow you to pick one box. This is my form for one of the questions: <form method="post" action="hasq3.php"> <table border="0" width="100%"> <tr> <td width="2%" height="30"> <input type="checkbox" name="q2" value="Quality Plan Does Not Exist" tabindex="1"></td> <td width="103%" height="30">Quality Plan Does Not Exist</td> </tr> <tr> <td width="2%" height="30"> <input type="checkbox" name="q2" value="Draft Quality Plan Exists" tabindex="2"></td> <td width="103%" height="30">Draft Quality Plan Exists</td> </tr> <tr> <td width="2%" height="30"> <input type="checkbox" name="q2" value="Draft Quality Plan Following HW Quality Plan Template" tabindex="3"></td> <td width="103%" height="30">Draft Quality Plan Following HW Quality Plan Template</td> </tr> </tr> <td width="71%"> <button type="submit">Next Page</button> </form> Is there a way to instruct the PHP to only select one checkbox? On another form I have an input box for "NAME". Is there a way to say that this field is required? If I use JAVA do I have to save the file as a .jsp file or can this be imbedded in the <Head></HEAD>. I am not familiar with JAVA. I greatly appreciate any help you can provide. Thanks,
×
×
  • 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.