Jump to content

ericjw316

Members
  • Content Count

    23
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ericjw316

  • Rank
    Member

Profile Information

  • Gender
    Not Telling
  1. Hey i have tried to do the code and i am not getting a return of data. here is the form and mysql. Can you let me know what i am doing wrong or just point me in the right direction. <form name="form1" method="post" action=""> <?php $con=mysqli_connect("localhost","username","password","database"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $water_purveyor = $_POST['water_purveyor']; $meter_num = $_POST['meter_num']; $permit_num = $_POST['permit_num']; $manufacturer = $_POST['manufacturer']; $met
  2. Thank you all for your help. I will be testing these out tomorrow and i will update you if they work. If the do work i will put the working code up in case someone has the same question. E
  3. To answer your question the form i showed was my get area. The posting of the form is working just fine. If i can use post i can change that. What i need to know is the echo for the text boxes and for the check boxes to display the data in the form. I have the posting done to where i have the data in the database done. So if the check box is set to 1 or 0 like this in my sending info to the database $v1-na = isset($_POST['v1-na']) ? 1 : 0; If the isset is used how can i set it to have the check box check or unchecked? 1 is checked 0 is unchecked.
  4. I would like to thank everyone helping me on my previous question. This is the last question i have. Currently i have my program running but i just need to figure out how to use the get function on check boxes and text boxes. Here is the code i am using for the php mysql part of it. <?php $con=mysqli_connect("localhost","username","password","dbase"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql="SELECT * from table where id = '".$_GET["id"]."' "; $rs=mysql_query($sql,$conn) or die(mysql_error()); ?> I know
  5. What i need to do is show the check box and text box as it is a document i want to print out later. If there is another way to show everything i would be happy to have that shown to me. I am doing this for a potential client.
  6. What i am trying to do is something like this: <input type='checkbox' name='chkbox1' id='chkbox1' value='<?php echo $_GET["chkbox1"]; ?>' > the select statement would be: select * from table where id = :id
  7. Thank you everyone for your help. I have got my insert into working. Now i was just wondering how to display the checkbox on a get. Can you possible help me out with any of that code. Thank you.
  8. Here is what i need. I have a form with a bunch of text boxes and check box's that i need to submit to mysql database. I know how to submit the text boxes just fine with the insert statment. I have not used check boxes and i need some help on how to insert them into the database. I need them to be enterened in as a 0 or 1. Here is the form <form action="submit.php" method="post"> <table width="1000" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="1400" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr
×
×
  • 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.