importing data into label

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ritu
Forum Newbie
Posts: 2
Joined: Fri Sep 26, 2008 4:41 am

importing data into label

Post by ritu »

Hello guys,

i need ur help.....please tell me that how can i import form data into label and that label should be add in combobox automatically....after that when i click on that label....form details should be desplayed....

i hope....i have completely explained my query...

my coding is here:

<?php
$name=$_POST['name'];
$ad=$_POST['ad'];
$md=$_POST['md'];
$ed=$_POST['ed'];
$ref=$_POST['ref'];
mysql_connect("localhost","root","");
mysql_select_db("net1");
$sql="insert into netsoft values('$name','$ad','$md','$ed','$ref')";
mysql_query($sql);
?>
<body>
<div>
<select><option>Combo</option></select><br /><br />
<label style style="border:medium">Ritu Co.</label>
</div>
<form method="post">
<table align="center" width="50" border="1">
<tr><td>Name</td>
<td><input type="text" name="name" size="40" /></td>
</tr>
<tr><td>AD</td>
<td><input type="text" name="ad" size="40" /></td>
</tr>
<tr><td>MD</td>
<td><input type="text" name="md" size="40" /></td>
</tr>
<tr><td>ED</td>
<td><input type="text" name="ed" size="40" /></td>
</tr>
<tr><td>Ref</td>
<td><input type="text" name="ref" size="40" /></td>
</tr>
<tr><td colspan="2"><input type="submit" value="submit" name="submit" /></td></tr>
</table></form>
</body>
</html>
User avatar
pcoder
Forum Contributor
Posts: 230
Joined: Fri Nov 03, 2006 5:19 am

Re: importing data into label

Post by pcoder »

You mean to say, first of all you want to add the form record to the database and list out these records from the database??
ritu
Forum Newbie
Posts: 2
Joined: Fri Sep 26, 2008 4:41 am

Re: importing data into label

Post by ritu »

i mean 2 say...

first...i have one combo box and one label with name company...ok..
second....that label or company has one form...
now when user fills all the required fields in the form and click on the submit button....
that label or company should add in the combo box....and form should be blank...
and when i go to combobox and click on that company......that form should be display...

i think....i have cleared my query...
Post Reply