Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Need to have a grid for input form with php!!

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Need to have a grid for input form with php!!

Postby saravanataee » Wed Dec 26, 2012 11:58 pm

Dear members,
Greetings,
I am new bie to php and having a requirement to make a php form which will have fields and inputs arranged in a grid..

Example!

Label1 Label2 Label3 Label4
textboxfor texboxfor textboxfor textboxfor
label1 label2 label3 label4


button1 button2



How can i have such grid table in my form. i can develop a table and have rows and coloums but something like this i dont know. As well button1 and 2 for inserting data's into sql and retrieving!
saravanataee
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed Dec 26, 2012 11:51 pm

Re: Need to have a grid for input form with php!!

Postby Snaek » Tue Jan 01, 2013 9:19 pm

Hello, here is a code outputting basically what you have made with text in your post.
Code: Select all
<?php
   echo "<table border='1'>";
   echo "<tr><td>Label1</td><td>Label2</td><td>Label3</td><td>Label4</td></tr>";
   echo "<tr><td><input type='text' /></td><td><input type='text' /></td><td><input type='text' /></td><td><input type='text' /></td></tr>";
   echo "<tr><td>Label1</td><td>Label2</td><td>Label3</td><td>Label4</td></tr>";
   echo "<tr><td><input type='submit' value='button1' /></td><td><input type='submit' value='button2' />";
   echo "</table>";
?>


You can edit this and remove the border as well if you like.
Happy PHPing!
Snaek
New php-forum User
New php-forum User
 
Posts: 11
Joined: Sat Dec 29, 2012 6:02 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron