0

Hey guys,

I was just installing the PHP on my laptop. And, on one of the windows, it is asking me if I want the wizard to setup a web server. Do I need one? There is a list: IIS FastCGI, Other CGI, or Do not setup a Web Server.
Which one should I choose? And why?
Could someone help me out on this?

Thanks!

3
Contributors
9
Replies
14
Views
5 Years
Discussion Span
Last Post by diafol
0

Are you just installing PHP or a stack (e.g. XAMPP)?
XAMPP (my preference) should take care of most of it for you - setup an Apache web server. I run it on Win7

Edited by diafol: n/a

0

i was downloading and installing PHP, APACHE, and MYSQL separately. Or should I redo it and do it with XAMPP or WampServer?

0

Using a stack is certainly easier. I couldn't advise you on separate installations as I've never had to do that.

0

ardav, I installed the XAMPP, too. It was way more easier. Thanks.

I am a bit new to this PHP and MySql stuff. I want to learn more about them.
Right now, I am trying to create one simple web window with a simple form (address, city, name). I created a database with a table that has all the fields. But, I am having trouble connecting my PHP with MySql database.
What are the steps that I need to take after creating the database? I think I got myself confused.

0

It's usually set up ready to go (from the manual):

$link = mysql_connect('localhost', 'root', '');
if (!$link) {
    die('Not connected : ' . mysql_error());
}

// select your db name (foo in this example) 
$db_selected = mysql_select_db('foo', $link);
if (!$db_selected) {
    die ('Can\'t use foo : ' . mysql_error());
}

now you can access the db data:

$query = "SELECT ...";
$result = mysql_query($query);
if(mysql_num_rows($result)){
   while($data = mysql_fetch_array($result)){
      echo $data['somefield'] . "< br />";
   }
}

Edited by diafol: n/a

0

just saw your comment, ardav. Thank you for the help.
for future references, do I need to save my .php file within that XAMPP folder always?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.