php/html spreadsheet style form?

Hey...so I am making a form in php/html to add data to my sql database... Right now it is just in columnar view...but i would like it to be in rows so that you can enter like 10 entries (days) at the same time...

Is this possible? so far my code for the form is just like:

<form action="<?php echo($php_self); ?>" method="post">
<table border="0">
<tr><td align="right" >Name: </td><td colspan="2"><select name="Name"><option value=""></option><option value="Paul">Paul</option><option value="Ed">Ed</option></select></td></tr>
<tr><td align="right" width="20%">Date: </td><td colspan="2"><input type="text" name="Date"/></td></tr>
<tr><td align="right" >Hours: </td><td colspan="2"><input type="text" name="Hours"/></td></tr>
<tr><td align="right" >Phase: </td><td colspan="2"><input type="text" name="Phase"/></td></tr>
<tr><td align="right" >Type: </td><td colspan="2"><input type="text" name="Type"/></td></tr>

<tr><td align="right">Submit:</td><td colspan="2"><input type="submit" name="submit" value="new" /></td></tr>
</table>
</form>


Something like that....How do i change it to a table view with headings and such?

Also...how can I make it go so that once someone selects a project number, it automatically fills the project name box? do i have to use javascript or something for that...i was looking on google, but didnt understand (i am new to this database junk)

and finally ... lol ... can I make it so that a person just enters their name once, and it populates their name in the rest of them?

Thanks!
btw, i know how to make them all appear on the same line...but that isnt really that great...its ugly...im talkin a nice table :) hehe
thats good advice!! :D thanks hehe

too bad i dont know javascript...i know java, but not JS :(

What do you mean by add a line? (in response to my idea of having a bunch of rows >.<) like they just see one line at a time?
 
If I understand correctly, you want 10 of these forms on one page? That would not be good design. Rather, do something more efficient such as add a line to allow the user to select the day to put it on.

Table headings can be added using a <th> tag.

To have the form auto-fill with the user's information, you would need to run a MySQL query when the page loads, and use Javascript to fill in the fields with the corresponding information.

You are going to have to use 4 languages to complete all of this: HTML, PHP, MySQL, and Javascript. I'm not sure of the context the form is used in, and Yahoo Answers makes it difficult to troubleshoot things - therefore I think this is the best advice I can give you.
 
Back
Top