fireslug Posted July 8, 2006 Share Posted July 8, 2006 I'm brand new and totaly green to php/mysql and need a little bit of help to get started. If anyone out there is patient and condierate enough to help, I would be eternally gratefulI have at last managed to install Xxamp which allows me to play with mysql and php before uploading to the server. I have created tables in mysql but have no idea of how to access the new DB or indeed, add data to it. Several DB were included with xxamp. I thought that I could make a few changes to one of the existing php pages so I could access the new DB that I created, but I simply can't get it to work I can add and change data on the server, but can't do it on my PC. I have screenshot the folder and subfolders to send to anyone who can help by looking at the structure and advising the code to enter into the pgp page. Ric Quote Link to comment https://forums.phpfreaks.com/topic/14036-what-php-script-to-access-and-input-data-to-mysql/ Share on other sites More sharing options...
wildteen88 Posted July 8, 2006 Share Posted July 8, 2006 If you want to use a database. You'll first want to connect to the database and then select the database like so:[code=php:0]mysql_connect("localhost", "user", "pass");mysql_select_db("db_name");[/code]First change user to your mysql username and change pass to the password for the username. Now cahnge db_name to the database you want to useYou have now connected to the database. [url=http://www.php-mysql-tutorial.com/]This site here[/url] provides tutorials on using PHP with MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/14036-what-php-script-to-access-and-input-data-to-mysql/#findComment-54849 Share on other sites More sharing options...
Kurt Posted July 8, 2006 Share Posted July 8, 2006 Also try [url=http://php.net/mysql]here[/url] for other mysql functions. Quote Link to comment https://forums.phpfreaks.com/topic/14036-what-php-script-to-access-and-input-data-to-mysql/#findComment-54852 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.