Where do PHP files go?
Posted by: ecolodge (---.hsd1.mi.comcast.net)
Date: August 25, 2006 09:36PM

Okay, PHPmy Admin works, Database works, when i type [localhost] it works. But, If I make a .php file, where do I store it so I can test in browser!? I am kinda new to this.

Options: ReplyQuote
Re: Where do PHP files go?
Posted by: CyberSpatium (67.170.181.---)
Date: August 26, 2006 02:05AM

your apache document root is c:\wamp\www. put all your website html, php, images, ccs, etc in that folder. if you do not place all your php scripts there, when you try to access them using http://localhost they will not get parced by apache.



Post Edited (08-27-06 02:51)

CyberSpatium
----------------------
WAMP Forum Admin

Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Options: ReplyQuote
Re: Where do PHP files go?
Posted by: ecolodge (---.hsd1.mi.comcast.net)
Date: August 26, 2006 06:50PM

Perfect, thats exactly what I was looking for. Now of course another problem. And I think its easy. I get this error message and it appears its looking for the username and password for mysql.

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'webmaster'@'localhost' (using password: YES) in C:\wamp\www\create.php on line 6
Could not connect to mysql because Access denied for user 'webmaster'@'localhost' (using password: YES)

where is says "webmaster" it used it instead of "myusername." I saw "webmaster" listed on the phpinfo file but still doesnt work. the reason I got Wamp is so I can start designing right away, rather than installing each service and figuring each thing out. Any help again? Thank so much in advance.



Post Edited (08-26-06 18:51)

Options: ReplyQuote
Re: Where do PHP files go?
Posted by: CyberSpatium (67.170.181.---)
Date: August 26, 2006 06:55PM

wamp comes with the root mysql user set with no password, so to connect to mysql use

mysql_connect ('localhost', 'root, null);

Options: ReplyQuote
Re: Where do PHP files go?
Posted by: ecolodge (---.hsd1.mi.comcast.net)
Date: August 26, 2006 07:58PM

so how would i change this to act properly?

<?php
$server = "localhost"; // server to connect to.
$database = "mysql"; // the name of the database.
$db_user = "webmaster"; // mysql username to access the database with.
$db_pass = "mypassword"; // mysql password to access the database with.
$table = "usertryout"; // the table that this script will set up and use.
?>

this is a script called config.php which the first of many scripts i am using to create eventually a login system for members.

here is a snippet of the other script that uses config.php

<?php

include ("config.php"winking smiley;

// connect to the mysql server
$link = mysql_connect($server, $db_user, $db_pass)
or die ("Could not connect to mysql because ".mysql_error());



Post Edited (08-26-06 20:05)

Options: ReplyQuote
Re: Where do PHP files go?
Posted by: CyberSpatium (67.170.181.---)
Date: August 26, 2006 08:24PM

$db_user = "root"; // mysql username to access the database with.
$db_pass = ""; // mysql password to access the database with.

Options: ReplyQuote
Re: Where do PHP files go?
Posted by: ecolodge (---.hsd1.mi.comcast.net)
Date: August 26, 2006 08:43PM

Thank you very much!

Options: ReplyQuote
Re: Where do PHP files go?
Posted by: CyberSpatium (67.170.181.---)
Date: August 27, 2006 02:52AM

no prob, glad I could help smiling smiley

Options: ReplyQuote


Sorry, only registered users may post in this forum.