Valhalla Legends Archive

Programming => Web Development => Topic started by: ChroniX on February 21, 2008, 02:51 PM

Title: Using PHP to send data to an HTML table
Post by: ChroniX on February 21, 2008, 02:51 PM
Is there anyway to retrieve data from a page using $_GET and $_POST to insert a value into an HTML table?
Title: Re: Using PHP to send data to an HTML table
Post by: Barabajagal on February 21, 2008, 02:53 PM
Like...
<input type="text" value="
<?php echo $_GET['Q']; ?>
">
?
Title: Re: Using PHP to send data to an HTML table
Post by: ChroniX on February 21, 2008, 02:56 PM
I know this sounds really stupid, but what does the 'Q' represent?
Title: Re: Using PHP to send data to an HTML table
Post by: ChroniX on February 21, 2008, 03:00 PM
So under that column which I'm wanting to insert the data from another page I would use $_POST inside of the <td> </td> tags?
Title: Re: Using PHP to send data to an HTML table
Post by: Archangel. on March 23, 2008, 12:05 AM
Quote from: ChroniX on February 21, 2008, 02:56 PM
I know this sounds really stupid, but what does the 'Q' represent?

$_GET['Q']

Q = variable you request for example: site.com/?Q=blah

Q = 'blah'

Title: Re: Using PHP to send data to an HTML table
Post by: iago on March 23, 2008, 10:07 AM
Quote from: Andy on February 21, 2008, 02:53 PM
Like...
<input type="text" value="
<?php echo $_GET['Q']; ?>
">
?
No!

<input type="text" value="
<?php echo htmlentities($_GET['Q']); ?>
">