0

hello Dear friend of Daniweb
i'm new in this site i just discovered yesterday, i find here fine.
i create my website in Dreamweaver i created shopping cart and on local server in wamp it work fine but when i upluad on my hosting server i get this error:

<?php
Fatal error: in /homepages/0/d461548742/htdocs/zunaphone.com/myspace/order-line.php on line 94 // this is the error on server 

if (isset ($_SESSION['MM_Username'])) {
    $hostname_marketbase = "hostname";
$database_marketbase = "database";
$username_marketbase = "username";
$password_marketbase = "password";
$marketbase = mysql_pconnect($hostname_marketbase="hostname", $database_marketbase = "database", $username_marketbase = "username", $password_marketbase = "password") or trigger_error(mysql_error(),E_USER_ERROR); //line 94
?>

Edited by chrisschristou: mistake in code now is fine

2
Contributors
4
Replies
16
Views
3 Years
Discussion Span
Last Post by chrisschristou
0

hi thank you to reply me i say in navigator i get this error

Fatal error: in /homepages/0/d461548742/htdocs/zunaphone.com/myspace/order-line.php on line 94

and this is my php code i let comment to show the line 94

$hostname_marketbase = "hostname";
$database_marketbase = "database name";
$username_marketbase = "username";
$password_marketbase = "password";
$marketbase = mysql_pconnect($hostname_marketbase="hostname", $database_marketbase = "database", $username_marketbase = "username", $password_marketbase = "password") or trigger_error(mysql_error(),E_USER_ERROR); // this is the line 94
0

SOrry I missed that in your original post.

Firstly I need to suugest that you immediately start ysing mysqli or PDO instead of just mysql as it is now depricated and much less secure than the other two (See Here).
Secondly, you only need to use hostname='', database_name='' etc if using PDO, if just using mysql (or mysqli - just change to mysqli) your database connection should just be:

$marketbase = mysql_connect("hostname","username","password","database") or die("Error " . mysql_error($marketbase));
This question has already been answered. 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.