jjmusicpro Posted March 26, 2008 Share Posted March 26, 2008 hey everyone im new at this... thanks again for the help i wanted to connect to my msql database and get team name, and team captain, and have it display it out, in an echo statment, however, im not sure how to do this, since i alreayd have an echo stament displaying the table. thanks again for the help. this is what i have so far. function DisplayInfo(){ global $sitename, $module_name; include_once("header.php"); include_once("conn.php"); include_once("open.php"); title("$sitename "._STATS.""); opentable(); echo "<br />"; echo "<center>"; echo "<table width=\"46%\" border=\"0\"> <tr> <td width=\"45%\" valign=\"top\"><strong>Teams Signed up</strong><P> <p> <form id=\"form1\" name=\"form1\" method=\"post\" action=\"\"> Sign up your team!<br /> Team Name: <label> <input type=\"text\" name=\"team_name\" /> </label> <br /> Team Captain: <label> <input type=\"text\" name=\"team_captain\" /> </label> <br /> Phone Number: <label> <input type=\"text\" name=\"phone_number\" /> </label> <br /> Email: <label> <input type=\"text\" name=\"email_address\" /> </label> <br /> <label> <input type=\"submit\" name=\"Submit\" value=\"Submit\" /> </label> </form> </strong></td> <td colspan=\"2\" rowspan=\"2\"> </td> <td width=\"51%\"><strong>Players (With no Teams) <br /> </strong>If you want to joing the fun, sign up here.<p> <form id=\"form1\" name=\"form1\" method=\"post\" action=\"\"> If you dont have a team, but want to play, sign up here!<br /> Player Name: <label> <input type=\"text\" name=\"player_name\" /> </label> <br /> Phone Number: <label> <input type=\"text\" name=\"phone_number\" /> </label> <br /> Player Email. <label> <input type=\"text\" name=\"player_email\" /> </label> <br /> <label> <input type=\"submit\" name=\"Submit\" value=\"Submit\" /> </label> </form> Quote Link to comment Share on other sites More sharing options...
jjmusicpro Posted March 26, 2008 Author Share Posted March 26, 2008 I wnated to add this but dont know where <?php $db = mysql_connect("localhost", "pump_user","xxxx") or die("Could not connect."); // Connection to DB if(!$db) die("no db"); if(!mysql_select_db("2008pump",$db)) die("No database selected."); $acc1="SELECT * from ID"; $acc2=mysql_query($acc1) or die("Could not select accounts."); // Error if nothing is selected $i = 1; while($acc3=mysql_fetch_assoc($acc2)) $teamname = $acc3[Team_Name]; $Captain_Name = $acc3[Captain_Name]; i++; echo =" $i . '$teamname' . ' ' . '$Captain_Name'"; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.