kfordham281 Posted December 12, 2006 Share Posted December 12, 2006 I was wondering if someone could point me in the right direction to a tutorial or something along those lines. Basically I want to be able to pull data from a mysql db into a form and edit the information in that form and then send the updated data back to the db. Got any links? Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted December 12, 2006 Share Posted December 12, 2006 Here is one tutorial and you can find many others with a Google search. Quote Link to comment Share on other sites More sharing options...
kfordham281 Posted December 13, 2006 Author Share Posted December 13, 2006 I did a few google searches and didn't find anything that was close to what I was looking for. Thanks for the link but unfortunately it's not exactly what I'm looking for. Thank you for looking though. Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted December 14, 2006 Share Posted December 14, 2006 (edited) Maybe this'll get you started: ><?php $username = "username"; $password = "password"; $database = "database"; $table = "table"; // Connecting, selecting database $link = mysql_connect("localhost", "$username", "$password") or die('Could not connect: ' . mysql_error()); echo 'Connected successfully'; mysql_select_db("$database") or die('Could not select database'); // Performing SQL query $query = "SELECT * FROM $table"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); // Printing results in HTML // echo "<table>\n"; echo "<html><body>"; echo "<p>"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { foreach($line as $key => $value) { echo "\$$key == $value"; echo "<br>"; } echo "<p>"; } echo "</body></html>"; // Free resultset mysql_free_result($result); // Closing connection mysql_close($link); ?> When I have more time, if you still haven't figured the rest out, I might be able to look deeper into it. Although, you could just use phpmyAdmin in your controlpanel: http://yoursite.com:2082/3rdparty/phpMyAdmin/index.php Edited December 14, 2006 by Steve Scrimpshire 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.