Hi everybody,
I have this problem:
I have a list of employees their name, address, and date of birth.
Emp. ID Emp. Name Address Date of Birth
001 Ricky Puno Angeles City, Phil 1985-08-01 edit delete
002 Jim Gomez Quezon City, Phil 1980-05-08 edit delete
My problem is that when I try to edit a data, for example employee 001, only the first word is displayed in the Employee Name field and Address Field:
Emp. ID: 001
Emp. Name: Ricky
Address: Angeles
Date of Birth: 1985-08-01
I don’t know what is wrong with my code. Deleting and saving data in the database(MySQL) is OK.
This is my code when editing or deleting a data is:
echo "<TD>
<A HREF='addeditemp.php?process=edit&empID=
$row->employeeID&empname=$row->employeename=
$row->employeeID&address=$row->Address=
$row->employeeID&bday=$row->Birthday'>edit
</A>
</TD>";
echo "<TD>
<A HREF='Procemp.php?process=del&empID= $row->employeeID&empname=$row->employeename'>delete
</A>
</TD>";
This is my addeditemp.php code:
<HTML>
<?php
include("Opendb.php");
?>
<HEAD>
<TITLE>Add Employee</TITLE>
</HEAD>
<BODY>
<BR>
<BOLD>Add Employee </BOLD>
<BR>
<FORM ACTION="Procemp.php?" method="post">
<input type=hidden name="process" value=<?php echo $process; ?>>
ID:<input type ="text" name="empID" value=<?php if (isset($empID)) { echo $empID; } ?>><BR>
Name:<input type ="text" name="empname" value=<?php if (isset($empname)) { echo $empname; } ?>><BR>
Address:<textarea name="address" cols="50" rows="3" value=<?php if (isset($address)) { echo $address; } ?>></textarea><BR>
Date of Birth:<input type ="text" name="bday" value=<?php if (isset($bday)) { echo $bday; } ?>><BR>
<input type ="submit"><input type="reset">
</FORM>
</BODY>
</HTML>
All of your comments and suggestions will be much appreciated.
Thanks a lot,
Jozin.