accessing mysql database from php code
Posted by: kasim (59.103.90.---)
Date: July 05, 2009 06:38AM

what is user id and password for mysqli_connect() command .

please tell me a code that can guide me how to insert values into a database by using php

thanks!

Options: ReplyQuote
Re: accessing mysql database from php code
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: July 05, 2009 11:50AM

When wamp is installed it sets up a default user called root with no password set.

Options: ReplyQuote
Re: accessing mysql database from php code
Posted by: helloNL (---.adsl-surfen.hetnet.nl)
Date: July 05, 2009 12:49PM

yes and you can change it but idk how

Options: ReplyQuote
Re: accessing mysql database from php code
Posted by: yfastud (Moderator)
Date: July 05, 2009 03:44PM

well, you need to setup db account first, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: accessing mysql database from php code
Posted by: freedom (202.65.168.---)
Date: July 09, 2009 08:46AM

<?php
$host="localhost";
$user="root";
$pass="";
$database="studentinfo";
mysql_connect($host,$user,$pass);
@mysql_select_db($database)or die("Unable to select database"winking smiley;
$query="insert into student values(023014,'iqbal','8th','cse')";
mysql_query($query);
mysql_close();
?>

Options: ReplyQuote
Re: accessing mysql database from php code
Posted by: toumimi (---.237.115-78.rev.gaoland.net)
Date: July 09, 2009 03:42PM

@freedom: can you stop posting everywhere for the same question please....

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote


Sorry, only registered users may post in this forum.