Hi:
I created my php file the code goes something like this:
<?php
// Connecting, selecting database
$link = mysql_connect('mysql2.jodoshared.com', 'xxxxx', 'xxxxx')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('xxxxx') or die('Could not select database');
// Performing SQL query
$query = 'SELECT * FROM PEOPLE';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
mysql_query("INSERT INTO PEOPLE (EMAIL) values ('email')");
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
From my index.htm file the code looks like this:
<HTML>
<TITLE>test</TITLE>
<BODY background="spotlightmontage.jpg">
<form method=POST action="/hello2.php">
<strong>Subscribe to our mailing list:</strong><br>
<input type=text name="email" size=24 maxlength=60>
<input type=radio name="action" value="sub" checked>subscribe
<input type=radio name="action" value="unsub">unsubscribe
<input type="hidden" name="op" value="ds">
<input type=submit name="submit" value="Submit">
</form>
<p>
<img src="coollogo_com_11337343.gif" align="center"</p>
<P>test COMING SOON..LAUNCH IN AUGUST 2005</p>
</BODY>
</HTML>
What am I doing wrong...All I want to do is place in from the textbox to the table and then redirect them back to the index.htm page...
HELP
Please
Z
I created my php file the code goes something like this:
<?php
// Connecting, selecting database
$link = mysql_connect('mysql2.jodoshared.com', 'xxxxx', 'xxxxx')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('xxxxx') or die('Could not select database');
// Performing SQL query
$query = 'SELECT * FROM PEOPLE';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
mysql_query("INSERT INTO PEOPLE (EMAIL) values ('email')");
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
From my index.htm file the code looks like this:
<HTML>
<TITLE>test</TITLE>
<BODY background="spotlightmontage.jpg">
<form method=POST action="/hello2.php">
<strong>Subscribe to our mailing list:</strong><br>
<input type=text name="email" size=24 maxlength=60>
<input type=radio name="action" value="sub" checked>subscribe
<input type=radio name="action" value="unsub">unsubscribe
<input type="hidden" name="op" value="ds">
<input type=submit name="submit" value="Submit">
</form>
<p>
<img src="coollogo_com_11337343.gif" align="center"</p>
<P>test COMING SOON..LAUNCH IN AUGUST 2005</p>
</BODY>
</HTML>
What am I doing wrong...All I want to do is place in from the textbox to the table and then redirect them back to the index.htm page...
HELP
Please
Z