User Profile

Collapse

Profile Sidebar

Collapse
LugNut29
LugNut29
Last Activity: Aug 15 '13, 09:24 PM
Joined: Jul 31 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • LugNut29
    replied to Order Processing Page
    in PHP
    Ok, I just tried the code above and it still doesn't show the name and age in replace of the text fields after the I go back to my catalog page. This is what I have:

    Code:
    <?php 
        if(isset($_POST['submit'])) {
    $_SESSION['fname']=$_POST['fname'];
    $_SESSION['age']=$_POST['age'];
    echo $_SESSION['fname'].' '.$_SESSION['age'];}
        else {
    echo '<form id="frm1" name="myForm" onsubmit="return
    ...
    See more | Go to post

    Leave a comment:


  • LugNut29
    replied to Order Processing Page
    in PHP
    So from what you said above, it should look like this?

    Code:
    <?php 
        if(isset($_POST['submit'])) {
    $_SESSION['fname']=$_POST['fname'];
    $_SESSION['age']=$_POST['age'];
    //header('Location: catalog.php');
    echo $_SESSION['fname'].' '.$_SESSION['age'];}
        else {
    <form id="frm1" name="myForm" onsubmit="return (validateForm() && checkRadios())" action="thankyou.php"
    ...
    See more | Go to post

    Leave a comment:


  • LugNut29
    replied to Order Processing Page
    in PHP
    Ok, so what am I doing wrong? Please remember I trying to learn this. I very green when it comes to programming. Should it look like this:

    Code:
    <?php 
        if(isset($_POST['submit'])) {
    
    $_SESSION['fname']=$_POST['fname'];
    $_SESSION['age']=$_POST['age'];
         
        if(isset($_SESSION['fname'])) {
          //header('Location: catalog.php');
          echo $_SESSION['fname'].' '.$_SESSION['age'];}
    ...
    See more | Go to post

    Leave a comment:


  • LugNut29
    replied to Order Processing Page
    in PHP
    I tried this:

    Code:
    <form id="frm1" name="myForm" onsubmit="return (validateForm() && checkRadios())" action="thankyou.php" method="post">
    <?php 
        if(isset($_POST['submit'])) {
    
    $_SESSION['fname']=$_POST['fname'];
    $_SESSION['age']=$_POST['age'];
         
        if(isset($_SESSION['fname'])) {
          //header('Location: catalog.php');
    ...
    See more | Go to post

    Leave a comment:


  • LugNut29
    replied to Order Processing Page
    in PHP
    If there's a session started, I need to have their name (fname) and age (age) displayed where the input text fields should be. If the session is not started, then the whole form should display with text fields for the user's input. Would it look something like this:

    Code:
    <?php 
        if(isset($_POST['submit']))
        {
            $_SESSION['fname']=$_POST['fname'];
            $_SESSION['age']=$_POST['age'];
    ...
    See more | Go to post

    Leave a comment:


  • LugNut29
    started a topic Writing input fields to a .txt file not working
    in PHP

    Writing input fields to a .txt file not working

    Hi All,

    I am trying to write the name="fname" & name="age" to a .txt file, but it's not writing those two things to the file.


    Code:
    <?php echo '<?xml version="1.0" encoding="IUTF-8"?>'; ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ...
    See more | Go to post

  • LugNut29
    replied to Order Processing Page
    in PHP
    Hi Exequiel,

    Thank you for the reply. I tried the code you suggested and it still doesn't work. Here's what I have:

    Code:
    <?php 
    session_start();
    ob_start();
    ?>
    
    <?php echo '<?xml version="1.0" encoding="IUTF-8"?>'; ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ...
    See more | Go to post

    Leave a comment:


  • LugNut29
    started a topic Order Processing Page
    in PHP

    Order Processing Page

    Hi All,

    I have an assignment to complete and I just can't get it and I was hoping someone could help me out. What I need to do is:

    Call the session_start function.

    Code:
    <?php
    session_start();
    ?>
    Detect whether or not the name session variable has a value; if so, display name and age as text; if not, display the name and age input fields.

    Code:
    First name: <input
    ...
    See more | Go to post

  • LugNut29
    replied to Help with validation.
    Thanks for those examples. The I think I have everything working except one thing. When I submit the form with out selecting a radio button, it checks it and says that I need to select a radio button, but it also submits and still takes it to the complete page. I'm not sure where in the function getCheckedValue () or function validateForm() it letting the form move past to the thank you page? I need it to stop everything if the name, age, and a radio...
    See more | Go to post
    Last edited by Dormilich; Aug 8 '13, 06:37 AM.

    Leave a comment:


  • Thanks for the help. I think I got it. It all seems to work, so I'm going with it. :) This is what I have come up with:

    Code:
    [B]table.class[/B]
    
    <?php
            $pay = round(calculatePayment($balance,$rate,$term),2);
            echo "<tr><th colspan='2' align='center'>Here's Your Estimated Monthly Payment</th></tr>";
    	echo "<tr><td class='res'> Monthly Payments </td><td>
    ...
    See more | Go to post

    Leave a comment:


  • Well, I want to have the tables created dynamically, so that's why there are so many document.write. I know php uses the print function, so would I just replace the document.write with the print function? What I want to do is have the table with the calculations appear after the button is pressed. Does that make since? I'm just not sure where to start. Would you be able to give an example of how to do some of this?
    See more | Go to post

    Leave a comment:


  • LugNut29
    started a topic How to convert HTML/JavaScript page to a PHP page?
    in PHP

    How to convert HTML/JavaScript page to a PHP page?

    Hi,

    I am new to programming and PHP and need some help converting this client side page to a server side PHP page. Here's what I have to convert:

    Script to be executed

    Code:
    document.write ("<table ><table class=ctable width=50% border='0'>");
    	document.write ("<tr>","<td>");
    		document.write ("<form name=first>");
    		document.write
    ...
    See more | Go to post
    Last edited by Rabbit; Aug 6 '13, 03:58 PM. Reason: Please use code tags when posting code.

  • LugNut29
    replied to Help with validation.
    OK, so how do I do that? I don't understand what u mean by not testing a form value for null and returning true somewhere? Can you give me examples?
    See more | Go to post

    Leave a comment:


  • LugNut29
    replied to Help with validation.
    Hi Dormilich,

    Thanks for the update. I did find the bracket issue, but I am not sure how to resolve the other issues? I'm not a programmer by any means, but I'm trying to learn. Where can I get help on the other two issues?

    T
    See more | Go to post

    Leave a comment:


  • LugNut29
    started a topic Help with validation.

    Help with validation.

    Hello,

    I have to validate that there is information and radio buttons have been selected. Also, I need to be able to reset the text boxes. When I click the submit button, it does not do the validation and when I click the reset button, it does nothing. Here's what I have, but it doesn't seem to work? Please help me with this.

    Thanks,
    Tom

    Code:
    <?php echo '<?xml version="1.0" encoding="IUTF-8"?>';
    ...
    See more | Go to post
    Last edited by Rabbit; Aug 4 '13, 07:19 PM. Reason: Please use code tags when posting code or formatted data.

  • Make an image visible/hidden and move around while hidden

    Hi All,

    How do I create two JavaScript functions, one that will change the image's visibility to hidden and one that will make it to visible. I want to set the image's onclick attribute to call the hide function. This way, the image will vanish whenever the user clicks on it. Also modify this function so that it calls the other function after a two-second delay. Next, I want make the image change its position while it is invisible. I...
    See more | Go to post
    Last edited by Rabbit; Aug 1 '13, 02:14 AM. Reason: Please use code tags when posting code.
No activity results to display
Show More
Working...