how to process values from a form using PHP - php

I'm able to display the values but my problem is to get the values from the form... This block occurs 6 times (0-41) and they have the same name so i can access/validate them using javascript. ($weeks= $_POST['wt11'];)
<input class="chgcolor" type="text" name="wt10" value="1" disabled/> /*week 1*/
<input type="text" name="wt11" id="w01" onchange="CheckCols('0')" readonly maxlength="5" value="<?php echo $dayarray[0]; ?>" />
<input type="text" name="wt11" id="w01" onchange="CheckCols('1')" readonly maxlength="5" value="<?php echo $dayarray[1]; ?>" />
<input type="text" name="wt11" id="w01" onchange="CheckCols('2')" readonly maxlength="5" value="<?php echo $dayarray[2]; ?>" />
<input type="text" name="wt11" id="w01" onchange="CheckCols('3')" readonly maxlength="5" value="<?php echo $dayarray[3]; ?>" />
<input type="text" name="wt11" id="w01" onchange="CheckCols('4')" readonly maxlength="5" value="<?php echo $dayarray[4]; ?>" />
<input type="text" name="wt11" id="w01" onchange="CheckCols('5')" readonly maxlength="5" value="<?php echo $dayarray[5]; ?>" />
<input type="text" name="wt11" id="w01" onchange="CheckCols('6')" readonly maxlength="5" value="<?php echo $dayarray[6]; ?>" />
thanks.

Related

How to update all data in html at once?

I'm creating a form in html, I can update per data, but I want to update all data by one click?
<?php foreach($queryRecords as $res) :?>
<tr>
<form action="" method="POST" name="form" id="form">
<td>
<input name="id" type="hidden" class="normalinput" id="id" value="<?php echo $res["id"];?>">
<input name="gp_name" type="hidden" class="normalinput" id="gp_name" value="<?php echo $res["gp_name"];?>">
<input name="date" type="hidden" class="normalinput" id="date" size="10" value="<?php echo $res["date"];?>">
<input name="day" type="hidden" class="normalinput" id="day" size="1" value="<?php echo $res['day'];?>">
<input name="starting_time" type="hidden" class="normalinput" id="starting_time" size="9" value="<?php echo $res["starting_time"];?>">
<input name="type" type="hidden" class="normalinput" id="type" size="4" value="<?php echo $res["type"];?>">
<input name="duration" type="hidden" class="normalinput" id="duration" size="4" value="<?php echo $res["duration"];?>">
<input name="checkin" type="hidden" class="normalinput" id="checkin" size="8" value="<?php echo $res["checkin"];?>">
<input name="checkout" type="hidden" class="normalinput" id="checkout" size="8" value="<?php echo $res["checkout"];?>">
<input name="country" type="hidden" class="normalinput" id="country" size="7" value="<?php echo $res["country"];?>">
<input name="city" type="hidden" class="normalinput" id="city" size="6" value="<?php echo $res["city"];?>">
<input name="supplier" type="hidden" class="normalinput" id="supplier" size="8" value="<?php echo $res["supplier"];?>">
<input name="arrange" type="hidden" class="normalinput" id="arrange" size="10" value="<?php echo $res["arrange"];?>">
<input name="no_of_day" type="hidden" class="normalinput" id="no_of_day" size="1" value="<?php echo $res["no_of_day"];?>">
<input name="qua" type="hidden" class="normalinput" id="qua" size="1" value="<?php echo $res["qua"];?>">
<input name="cost" type="hidden" class="normalinput" id="cost" size="6" value="<?php echo $res["cost"];?>">
<input name="profit_rate" type="hidden" class="normalinput" id="profit_rate" size="4" value="<?php echo $res["profit_rate"];?>">
<input name="currency_rate" type="hidden" class="normalinput" id="currency_rate" size="4" value="<?php echo $res["currency_rate"];?>">
<input name="eurbuy" type="hidden" class="normalinput" id="eurbuy" size="4" value="<?php echo $res["eurbuy"];?>">
<input name="vat" type="hidden" class="normalinput" id="vat" size="4" value="<?php echo $res["vat"];?>">
<input name="pprice" type="hidden" class="normalinput" id="pprice" size="4" value="<?php echo round( $res["cost"] * $res["profit_rate"] * $res["currency_rate"] / $res["eurbuy"],0) ;?>">
<input name="total" type="hidden" class="normalinput" id="total" value="<?php echo round( $res["pprice"] * $res["no_of_day"] * $res["qua"] ,0) ;?>">
<input name="reference" type="hidden" class="normalinput" id="reference" size="10" value="<?php echo $res['reference'];?>">
<input name="supplement_rate" type="hidden" class="normalinput" id="supplement_rate" size="5" value="<?php echo $res["supplement_rate"];?>">
<input name="supplement" type="hidden" class="normalinput" id="supplement" size="5" value="<?php echo round( $res["supplement_rate"] * $res["profit_rate"] * $res["no_of_day"] * $res["currency_rate"] / $res["eurbuy"],0) ;?>">
<button class="btn btn-info" type="button" onClick="update(form); window.location.reload();"><i class="fas fa-edit"></i></button>
<button class="btn btn-danger" type="button" onClick="window.location.href='gp_delete.php?id=<?php echo $res['id'];?>'"><i class="fas fa-trash-alt"></i></button>
</td>
</form>
</tr><?php endforeach;?>
since I need to update per data, how do you create one button to update all data for the table?
document.querySelector('form').addEventListener('submit', (e) => {
const formData = new FormData(e.target);
// Now you can use formData.get('foo'), for example.
// Don't forget e.preventDefault() if you want to stop normal form .submission
});
This is a nitpicky answer, but let me explain why this is a better solution:
We're properly handling a form submit rather than a button press. Some people like to push enter on fields. Some people use alternative input devices such as speech input or other accessibility devices. Handle the form submit and you correctly solve it for everyone.
We're digging into the form data for the actual form that was submitted. If you change your form selector later, you don't have to change the selectors for all the fields. Furthermore, you might have several forms with the same input names. No need to disambiguate with excessive IDs and what not, just track the inputs based on the form that was submitted. This also enables you to use a single event handler for multiple forms if that is appropriate for your situation.
The FormData interface is fairly new, but is well supported by browsers. It's a great way to build that data collection to get the real values of what's in the form. Without it, you're going to have to loop through all the elements (such as with form.elements) and figure out what's checked, what isn't, what the values are, etc. Totally possible if you need old browser support, but the FormData interface is simpler.
I'm using ES6 here... not a requirement by any means, so change it back to be ES5 compatible if you need old browser support.

FORM-TAG not work

i try to send this form-tag to my page customer.php but it doesn´t send a post to customer.php
in customer.php $_POST is always NULL
<form action="customer.php" method="POST">
<span id="MyCustomerDataHeader">MEINE KONTAKTDATEN</span><br><br><br>
<label class="MyCustomerDataLabel">Nachname:</label><input type="text" name="secondname" class="MyCustomerData" value="<?php print_r($query->getCustomerData()->secondname);?>"/><br>
<label class="MyCustomerDataLabel">Vorname:</label><input type="text" name="firstname" style="margin-left:15px;" class="MyCustomerData" value="<?php echo $query->getCustomerData()->firstname;?>"/><br>
<label class="MyCustomerDataLabel">E-mail:</label><input type="text" name="email" style="margin-left:30px;" class="MyCustomerData" value="<?php echo $query->getCustomerData()->email;?>" /><br>
<label class="MyCustomerDataLabel">Geburtstag:</label><input type="birthday" name="birthday" style="margin-left:-10px;" class="MyCustomerData" value="<?php echo $query->getCustomerData()->birthday;?>" /><br>
<label class="MyCustomerDataLabel">Handynummer:</label><input type="text" name="mobilephone" style="margin-left:-40px;" class="MyCustomerData" value="<?php echo $query->getCustomerData()->mobilephone;?>" /><br>
<label class="MyCustomerDataLabel">Stra&szlige:</label><input type="text" name="street" style="margin-left:15px;" class="MyCustomerData" value="<?php echo $query->getCustomerData()->street;?>" /><br>
<label class="MyCustomerDataLabel">Stadt:</label><input type="text" name="city" style="margin-left:30px;" class="MyCustomerData" value="<?php echo $query->getCustomerData()->city;?>" /><br>
<label class="MyCustomerDataLabel">Bundesland:</label><input type="text" name="federalestate" style="margin-left:-25px;" class="MyCustomerData" value="<?php echo $query->getCustomerData()->federalestate;?>"/><br>
<label class="MyCustomerDataLabel">Land:</label><input type="text" name="country" style="margin-left:30px;" class="MyCustomerData" value="<?php echo $query->getCustomerData()->country;?>"/><br>
<input type="submit" id="myCustomerDataButton" name="deleCustomer" style="font-size:14pt;margin-top:-5px;" value="ACCOUNT LÖSCHEN" />
</form>

Update query not working in php

there are already values inside the texboxes which i filtered inside the table(score) but i wanna update it by changing the values inside on it and click update.
Can anyone help with my code..i wanna update the values inside the (texboxes) but my code wont work can anyone help me locate the code that messing with the program?
php code:
<?php
if(isset($_POST['update'])){
//1
$u1id = $_POST['id1'];
$u1name = $_POST['name1'];
$u1score1 = $_POST['optA1'];
$u1score2 = $_POST['optB1'];
$u1other_qual = $_POST['other_qual1'];
$u1interview = $_POST['interview1'];
$u1total = $_POST['total1'];
//2
$u2id = $_POST['id2'];
$u2name = $_POST['name2'];
$u2score1 = $_POST['optA2'];
$u2score2 = $_POST['optB2'];
$u2other_qual = $_POST['other_qual2'];
$u2interview = $_POST['interview2'];
$u2total = $_POST['total2'];
//1
mysql_query("UPDATE score SET score1='$u1score1', score2='$u1score2', total='$u1total' WHERE id='$u2id'");
//2
mysql_query("UPDATE score SET score1='$u2score1', score2='$u2score2', total='$u2total' WHERE id='$u2id'");
}
?>
html code:
<form method="post" id="frm" name="frm" action="" />
<table>
<tr>
<td>
ID: <br />
<input type="text" name="id1" value="<?php if(empty($id[0])){$id[0] = array(NULL);}else{echo $id[0];} ?>" readonly /> <br />
<input type="text" name="id2" value="<?php if(empty($id[1])){$id[1] = array(NULL);}else{echo $id[1];} ?>" readonly /> <br />
</td>
<td>
Name: <br />
<input type="text" name="name1" value="<?php if(empty($name[0])){$name[0] = array(NULL);}else{echo $name[0];} ?>" readonly /> <br />
<input type="text" name="name2" value="<?php if(empty($name[1])){$name[1] = array(NULL);}else{echo $name[1];} ?>" readonly /> <br />
</td>
<td>
Score 1: <br />
<input type="text" name="optA1" value="<?php if(empty($score1[0])){$score1[0] = array(NULL);}else{echo $score1[0];} ?>" onchange="optTotal1()" /> <br />
<input type="text" name="optA2" value="<?php if(empty($score1[1])){$score1[1] = array(NULL);}else{echo $score1[1];} ?>" onchange="optTotal2()" /> <br />
</td>
<td>
Score 2: <br />
<input type="text" name="optB1" value="<?php if(empty($score2[0])){$score2[0] = array(NULL);}else{echo $score2[0];} ?>" onchange="optTotal1()" /> <br />
<input type="text" name="optB2" value="<?php if(empty($score2[1])){$score2[1] = array(NULL);}else{echo $score2[1];} ?>" onchange="optTotal2()" /> <br />
</td>
<td>
Other Qualification: <br />
<input type="text" name="other_qual1" value="<?php if(empty($other_qual[0])){$other_qual[0] = array(NULL);}else{echo $other_qual[0];} ?>" readonly /> <br />
<input type="text" name="other_qual2" value="<?php if(empty($other_qual[1])){$other_qual[1] = array(NULL);}else{echo $other_qual[1];} ?>" readonly /> <br />
</td>
<td>
Interview: <br />
<input type="text" name="interview1" value="<?php if(empty($interview[0])){$interview[0] = array(NULL);}else{echo $interview[0];} ?>" readonly /> <br />
<input type="text" name="interview2" value="<?php if(empty($interview[1])){$interview[1] = array(NULL);}else{echo $interview[1];} ?>" readonly /> <br />
</td>
<td>
Total: <br />
<input type="text" name="total1" value="<?php if(empty($total[0])){$total[0] = array(NULL);}else{echo $total[0];} ?>" readonly onKeyUp="optTotal1()" /> <br />
<input type="text" name="total2" value="<?php if(empty($total[1])){$total[1] = array(NULL);}else{echo $total[1];} ?>" readonly onKeyUp="optTotal2()" /> <br />
</td>
</tr>
</table>
<input type="submit" value="update" />
</form>
It's in your submit button:
<input type="submit" value="update" />
You have given it a value, but not a name. If you change it to:
<input type="submit" name="update" value="yespleasedososir" />
it will end up in your post var
A few thoughts: 1. Have you echoed out your sql statements to see what you are getting? 2. Try add the tilde symbol before and after each column name...like score1 = 'whatever'. 3. You should really be using the mysqli statemnts.

multiple form redirect only on first form's action

I have used multiple form in single page bcz i have to work my page without javascript enable in my browser..but problem is that all form redirect on single page..i.e all forms goes to first forms's action..if u can change 1st form action then all form goes to that link...i know there is silly mistake but i failed to figure it out..plz help me...thnks in advance..
//html code
<div id="propertymenu">
<table cellspacing="20">
<tr>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="mainainancebills.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="PROPERTY DETAILS">
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="inspectionreport.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="INSPECTION REPORTS">
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="downloaddocument.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="DOWNLOAD DOCUMENTS">
</font>
</td>
</tr>
<tr>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="downloaddocument.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="STATEMENT OF ACCOUNT">
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="electricitybills.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="ELECTICITY BILLS">
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="downloaddocument.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="OTHERS">
</font></td>
</tr>
<tr>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="expensestracker.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="DETAIL OF EXPENSES">
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="mainainancebills.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="MAINTENANCE BILLS">
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="ownerhome.php">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="submit" value="BACK">
</form></td>
</tr>
</table>
</div>
You have
</font>
instead of
</form>
in there a bit.
Some thing is wrong in this code. because for every form there is not ending form is wriiten meant form is not close at every form start.
Your right code is
<div id="propertymenu">
<table cellspacing="20">
<tr>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="mainainancebills.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="PROPERTY DETAILS">
</form>
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="inspectionreport.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="INSPECTION REPORTS">
</form>
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="downloaddocument.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="DOWNLOAD DOCUMENTS">
</form>
</font>
</td>
</tr>
<tr>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="downloaddocument.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="STATEMENT OF ACCOUNT">
</form>
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="electricitybills.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="ELECTICITY BILLS">
</form>
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="downloaddocument.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="OTHERS">
</form>
</font></td>
</tr>
<tr>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="expensestracker.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="DETAIL OF EXPENSES">
</form>
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="mainainancebills.php">
<input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
<input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
<input type="hidden" value="<?PHP echo $area; ?>" name="area">
<input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
<input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
<input type="hidden" value="<?PHP echo $email; ?>" name="email">
<input type="submit" value="MAINTENANCE BILLS">
</form>
</font></td>
<td style="background-color:#94EEF2;">
<form method="post" class='propertylist' action="ownerhome.php">
<input type="hidden" value="<?PHP echo $property; ?>" name="pid">
<input type="submit" value="BACK">
</form></td>
</tr>
</table>
</div>
Please close form 1 by 1
<form name="Your_firstform">
//Your code here
</form>
<form name="Your_secondform">
//Your code here
</form>
<form name="Your_thirdform">
//Your code here
</form>

textbox = php variable?

I want to get value from php variable to review it in textbox
what I have to write in "value":
<input type="text" name="name3" size="25" maxlength="50" value=""> name:
<input type="text"
name="name3"
size="25"
maxlength="50"
value="<?php echo htmlspecialchars($variable); ?>">
<input type="text" name="name3" size="25" maxlength="50" value="<?php echo $variable; ?>">

Categories