Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

Connecting my script

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

russia5

New Member
Impact
0
Hello,

I am trying to install this code:

<?php
mysql_connect("localhost", "russia5_Greg", "pasadena1") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("russia5_profiles") or die(mysql_error());
or die(mysql_error());
$rows_per_page = 3;
$sql = "SELECT * FROM Profile_delivery";
$result = mysql_query($sql, $db);
$total_records = mysql_num_rows($result);
$pages = ceil($total_records / $rows_per_page);
mysql_free_result($result);
?>

and I am getting this error.


Parse error: parse error in /home/russia5/public_html/index_Greg6.php on line 107


Can someone tell me what my problem is?

Greg
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
*blush* You're showing up your username and password in that code!

It's hard to say, first off there seems to be an error on line 107 and your script obviously doesn't have as many lines of code. What I mean is, if this snippet is part of a script, the error might lie elsewher. Otherwise...

There's something wrong in this line

$result = mysql_query($sql, $db);

since you had not declared $db previously. In any case, this is optional so you should be fine with:

$result = mysql_query($sql);
 
0
•••
which line is 107 reason i ask is, usually the database connection is done at beginning, so that usually wouldnt be onl ine 107
 
0
•••
Another one I just spotted.

This is correct:

mysql_select_db("russia5_profiles") or die(mysql_error());

instead of

mysql_select_db("russia5_profiles") or die(mysql_error());
or die(mysql_error());

Note it was initially repeated.
 
0
•••
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

New in Parking: updated way to act on many domains or inquiries at once
Your domain list and inquiry list now have a bar above and below the list. Check the items you want, then choose an action in the bar...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back