InvestorsHub Logo
Followers 0
Posts 1734
Boards Moderated 0
Alias Born 06/18/2007

Re: opeum post# 39877

Wednesday, 11/28/2007 12:36:06 AM

Wednesday, November 28, 2007 12:36:06 AM

Post# of 76909
call/set database:

<?php
$db_host = "localhost";
$db_user = "root";
$db_pwd = "1234";
$db_name = "ECFLShares";
mysql_connect($db_host, $db_user, $db_pwd);
mysql_select_db($db_name);
?>

write to database via form/post:

<?php
if (!isset($_POST['submit'])) {
?>
<form action="" method="post">
Name: <input type="text" name="name"><br>
Shares Held: <input type="text" name="shares"><br>
<input type="submit" name="submit" value="Submit!">
</form>
<?php
} else {
$name = $_POST[‘name’];
$shares = $_POST[‘shares’];
mysql_query("INSERT INTO `shares` (name, sharesHeld) VALUES ('$name', ‘$shares’)");
}
?>

then echo results on page, or use mysql query.

Thats a REALLY simple/easy method, you could probably use captcha to prevent multiple entries, and user logins so people could change their shares held in the case that they buy/sell more. =)

good luck ecfl'ers you got a hell of a company and 3 great execs.


Join the InvestorsHub Community

Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.