Results 1 to 2 of 2

Thread: Help In Html Textbox And Saving Data

  1. #1
    Join Date
    Dec 2011
    Posts
    1

    Help In Html Textbox And Saving Data

    Hi Friends,
    I Have A Simple Project In Which I Am Supposed To Project Data Onto A Webpage And Then Make The Data In It Editable For The Users.
    I Am Thinking Of Using Textboxes In Which Data Can Be Entered And Upon A Click Of A Button Be Saved To That Area........
    Is It Possible Using Only Html And Javascript Or Is There Any Other Way......
    Plz Help Me Asap
    Thanks In Advance

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291

    Re: Help In Html Textbox And Saving Data

    You can check some working examples given below, it is an SQL database lends itself to querying, sorting, and all types of useful functions:

    Code:
    <?php
    
    session_start();
    
    $usertechno = $_SESSION['techno'];
    $usertechname = $_SESSION['techname'];
    if( $usertechno == "" ) {
    	include 'logout.php';
    	exit(1);
    }
    
    
    
    echo "<html>";
    echo "<head>";
    echo "<title>Add Customer</title>";
    echo "</head>";
    
    echo "<body background=\"./images/precisionhvac.jpg\">";
    /*
                Begin input form
    */
    echo "<form method=\"POST\" action=\"savecustomer.php\">";
    echo "<font color=\"black\">";
    
    echo "<br /><p align=\"center\"><font color=\"black\"><strong>Adding to $usertechname's customers.</font></p>";
    
    //                          First Name
    echo "<table><tr>";
    echo "<td valign=\"center\">";
    echo "<font color=\"black\"><strong>First</strong> ";
    echo "<input type=\"text\" size=\"30\" name=\"fname\">";
    echo "</td>";
    
    //						Last Name
    echo "<td  valign=\"center\">";
    echo "&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"black\"><strong>Last</strong> ";
    echo "<input type=\"text\" size=\"30\" name=\"lname\">";
    echo "</td>";
    echo "</tr></table><br>";
    
    //                          Street
    echo "<strong>Street</strong> ";
    echo "<input type=\"text\" size=\"30\" name=\"street\"><br><br>";
    
    //                          City
    echo "<table>";
    echo "<tr>";
    echo "<td valign=\"center\">";
    echo "<font color=\"black\"><strong>City</strong> ";
    echo "<input type=\"text\" size=\"30\" name=\"city\">";
    echo "</TD>";
    
    //                          State
    echo "<td valign=\"center\">";
    echo "&nbsp;&nbsp;<font color=\"black\"><strong>State</strong> ";
    echo "<input type=\"text\" size=\"2\" name=\"state\">";
    echo "</td>";
    
    //                          Zip
    echo "<td valign=\"center\">";
    echo "&nbsp;&nbsp;<font color=\"black\"><strong>Zip</strong> ";
    echo "<input type=\"text\" size=\"10\" name=\"zip\">";
    echo "</td></tr></table><br>";
    
    //                          hPhone
    echo "<strong>hPhone</strong> ";
    echo "<input type=\"text\" size=\"12\" name=\"hphone\">&nbsp;&nbsp;";
    
    //                          cPhone
    echo "<strong>cPhone</strong> ";
    echo "<input type=\"text\" size=\"12\" name=\"cphone\"><br><br>";
    
    //						Email
    echo "<strong>Email</strong> ";
    echo "<input type=\"text\" size=\"30\" name=\"email\"><br><br>";
    
    //						Notes
    echo "<strong>Notes</strong> ";
    echo "<textarea rows=\"2\" name=\"notes\" cols=\"80\"></textarea><br><br>";
    
    //						Location
    echo "<strong>Location</strong> ";
    echo "<input type=\"text\" size=\"10\" name=\"unitlocation\">";
    
    //						Type
    echo "&nbsp;&nbsp;&nbsp;&nbsp;<strong>Type</strong> ";
    echo "<input type=\"text\" size=\"10\" name=\"unittype\">";
    
    //						Qty
    echo "&nbsp;&nbsp;<strong>Quantity</strong> ";
    echo "<input type=\"text\" size=\"2\" name=\"qty\">";
    
    //                                              Manager
    echo "&nbsp;&nbsp;<strong>&nbsp;&nbsp;&nbsp;Property Manager 1=yes / 0=no</strong> ";
    echo "<input type=\"text\" size=\"2\" name=\"mgr\">";
    
    //						Techno
    //echo "&nbsp;&nbsp;&nbsp;&nbsp;<strong>Your Tech. No.</strong> ";
    //echo "<input type=\"text\" size=\"3\" name=\"techno\">";
    
    //						Buttons
    //							Submit
    echo "<p align=\"center\"><table><tr>";
    echo "<td><input type=\"submit\" name=\"Submit\"
    value=\"Submit\"></td>";
    
    //							Clear Form
    echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
    echo "<td><input type=\"reset\" name=\"Reset\" value=\"Clear
    Form\"></td>";
    
    //                                                      Done
    echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
    echo "<td><input type=\"button\" value=\"Done\" onclick=\"window.location='./index-go.php'\"/></td>";
    echo "</tr></table></p>";
    
    //							End of input form
    echo "</form>";
    echo "</body>";
    echo "</html>";
    
    ?>

Similar Threads

  1. Replies: 10
    Last Post: 18-09-2011, 07:54 AM
  2. Replies: 2
    Last Post: 20-08-2010, 01:23 AM
  3. Display data in textbox
    By AngelCV in forum Software Development
    Replies: 1
    Last Post: 04-08-2009, 04:32 PM
  4. Need help in saving MS Publisher files to html
    By Pabloa in forum Windows Software
    Replies: 3
    Last Post: 06-06-2009, 08:10 PM
  5. Project 2003 SP2. Operation failed saving as HTML
    By Dakshi in forum Microsoft Project
    Replies: 3
    Last Post: 25-08-2008, 09:41 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,046,366.73912 seconds with 17 queries