0

Hi guys,

I am working on something that is driving me crazy, I'm just trying to get my php skills better and so the help with this or guide in the right direction will be a greatly appreciated.


the script for this looks like this

<html>
<head>
</head>



<body>
<table width="100%" border="1">
<th>Add Person</th>
<th>Edit / Delete person</th>
<tr valign="top">
<td width="50%">
<table>
<tr>
<td colspan="2">

&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;
</td>
</tr>
<tr>

<td>
Last Name:
</td>
<td>
<input type="text"/>
</td>
</tr>
<tr>
<td>

First Name:
</td>
<td>
<input type="text"/>
</td>
</tr>
<tr>
<td>
Birth Date:
</td>

<td>
<select>
<option>Month</option>
</select>
<select>
<option>Day</option>
</select>
<select>

<option>Year</option>
</select>
</td>
</tr>
<tr>
<td>
Picture
</td>
<td>

<input type="file"/>
</td>
</tr>
<tr>
<td>
email
</td>
<td>
<input type="text"/>

</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" value="add person"/>
<input type="button" value="clear form"/>
</td>
</tr>
</table>
				
				
				
<br />
	
<td width="50%">
<table>

<tr>
<td>
Select a person:
</td>
<td>
<select>
<option>Choose person</option>
</select>
</td>

</tr>
<tr>
<td colspan="2" align="center">
	OR
</td>
<tr>
<td>
Search:
</td>
<td>

<input type="text"/>
</td>
</tr>
</tr>
<tr>
<td>
Enable Editing:
</td>
<td>

<input type="checkbox"/>
</td>
</tr>
<tr>
<td>
Last Name:
</td>
<td>
<input type="text"/>

</td>
</tr>
<tr>
<td>
First Name:
</td>
<td>
<input type="text"/>
</td>

</tr>
<tr>
<td>
Birth Date:
</td>
<td>
<select>
<option>Month</option>
</select>

<select>
<option>Day</option>
</select>
<select>
<option>Year</option>
</select>
</td>
</tr>

<tr>
<td>
age:
</td>
<td>
<input type="text" size="2" readonly="readonly"/>(always read only)
</td>
</tr>
<tr>
<td>

Current Picture<br/>(150px x 150px)
</td>
<td>
<div style="width:150px;height:150px;border-style:solid;border-width:1px;text-align:center;">
<span style="font-size:24pt;">current<br />image<br />will go<br />here</span>
</div><br/>
</td>

</tr>
<tr>
<td>
New Picture
</td>
<td>
<input type="file"/>
</td>
</tr>

<tr>
<td>
email
</td>
<td>
<input type="text"/>
</td>
</tr>
<tr>

<td colspan="2" align="center">
<input type="button" value="update person"/>
<input type="button" value="delete person"/>
</td>
</tr>
</table>
				
				
</body>
</html>

its pretty much a form (created with php) where you enter your information and upload a picture..

then you select a persons name and the information is shown with the picture..

the help for this will be a HUGE help!

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by cereal
0

You are missing form tags:

<form action="do_upload.php" method="post" enctype="multipart/form-data">
# your input fields here
</form>

bye

0

What I am trying to say is that I need the users to fill in the information here

<html>
<head>
</head>



<body>
<table width="100%" border="1">
<th>Add Person</th>
<th>Edit / Delete person</th>
<tr valign="top">
<td width="50%">
<table>
<tr>
<td colspan="2">

&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;
</td>
</tr>
<tr>

<td>
Last Name:
</td>
<td>
<input type="text"/>
</td>
</tr>
<tr>
<td>

First Name:
</td>
<td>
<input type="text"/>
</td>
</tr>
<tr>
<td>
Birth Date:
</td>

<td>
<select>
<option>Month</option>
</select>
<select>
<option>Day</option>
</select>
<select>

<option>Year</option>
</select>
</td>
</tr>
<tr>
<td>
Picture
</td>
<td>

<input type="file"/>
</td>
</tr>
<tr>
<td>
email
</td>
<td>
<input type="text"/>

</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" value="add person"/>
<input type="button" value="clear form"/>
</td>
</tr>
</table>

and it sends it to a database and stores it..

then I need it to go into the drop down menu here

<td width="50%">
<table>

<tr>
<td>
Select a person:
</td>
<td>
<select>
<option>Choose person</option>
</select>
</td>

</tr>
<tr>
<td colspan="2" align="center">
	OR
</td>
<tr>
<td>
Search:
</td>
<td>

<input type="text"/>
</td>
</tr>
</tr>
<tr>
<td>
Enable Editing:
</td>
<td>

<input type="checkbox"/>
</td>
</tr>
<tr>
<td>
Last Name:
</td>
<td>
<input type="text"/>

</td>
</tr>
<tr>
<td>
First Name:
</td>
<td>
<input type="text"/>
</td>

</tr>
<tr>
<td>
Birth Date:
</td>
<td>
<select>
<option>Month</option>
</select>

<select>
<option>Day</option>
</select>
<select>
<option>Year</option>
</select>
</td>
</tr>

<tr>
<td>
age:
</td>
<td>
<input type="text" size="2" readonly="readonly"/>(always read only)
</td>
</tr>
<tr>
<td>

Current Picture<br/>(150px x 150px)
</td>
<td>
<div style="width:150px;height:150px;border-style:solid;border-width:1px;text-align:center;">
<span style="font-size:24pt;">current<br />image<br />will go<br />here</span>
</div><br/>
</td>

</tr>
<tr>
<td>
New Picture
</td>
<td>
<input type="file"/>
</td>
</tr>

<tr>
<td>
email
</td>
<td>
<input type="text"/>
</td>
</tr>
<tr>

<td colspan="2" align="center">
<input type="button" value="update person"/>
<input type="button" value="delete person"/>
</td>
</tr>
</table>

so whenever someone adds there info it goes into the drop down menu, they then choose there name, after that, there last name, first name, age and picture shows up with there picture. they should be able to update there name as well as deleting it and being able to upload to change there picture..

I am new to php and no expert so the help with this is very appreciated..

1

Ok, but lets try to simplify the problem, in your example code there are no form tags, so you can't send data to the server. In the code you wrote here the problem is not PHP (which is not included) but the HTML part. You need something like this:

<form method="post" action="page.php">
<input type="text" name="first_name" />
<input type="submit" name="button" value="send data" />
</form>

And basically in page.php you need:

<?php
echo $_POST['first_name'];
?>

So: you need to give name or id to input fields, and you need to enclose all your input fields between form tags.

Edited by cereal: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.