View Single Post
  #4  
Old 06-28-2008, 07:01 AM
navaldesign's Avatar
navaldesign navaldesign is offline
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,348
Default Re: MYSQL Connection Problem - Please help

The page is always saved simply as "pagename" WITHOUT any extension. The extension is generated by BV when it publishes the page. If the page contains php code, you need to publish it as php page. This is done setting, in Page Properties, the page extension ( when published) to be php instead of the standard html.

Now, your test4 page is html, so it can never execute the php code embedded in the page.

A further issue: your code (which i can see because the page is html, and not php):

<?php
echo("Success 1");
$db_host= "localhost";
$db_username = "tuwipwa_?????????";
$db_password = "Krishna 1965"
$dbname ="tuwipwa_Study???????????";
echo("Success 2");
$conn = mysql_connect($db_host,$db_username,$db_password);
mysql_select_db($dbname);
echo("Success 3");
close($conn);
echo("Success 4");
?>

will do nothing (when executed). I mean, it opens a DB connection and then it closes it, without doing anything at all.
The only output will be those echoes "Success 1" ..... to "Success 4" but nothing more.

Usually, after you open the connection, you query a specific table in the database, to retrieve some info (or add, or edit) and display it in your page. In this case you do nothing of the above.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Reply With Quote