/    Sign up×
Community /Pin to ProfileBookmark

website won’t access mysql

Hi,

I have ported my website to this address and used the same login /password for mysql as previous websites on the same host.

I am getting a session error which you can’t see unless you highlight.

It works on my pc but what do i do here?

I access my sql with a script like this
..
//connect to the db
$link = mysql_connect(“localhost”, “jagguy_root”, “”)or die(“Could not connect: ” . mysql_error());
// select our database
mysql_select_db(“jagguy_formdata”) or die(mysql_error());
..

[url]http://jagguy.ej.am/school/test/home.php[/url]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@jagguyauthorJul 09.2007 — I am just trying to get every page password protected so i use sessions. If someone types in an url without logging in they get redirected.

Now what i did do was simple set the

session_start() at the start of every script then send html headers.

I use

<?php session_start(); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html >....

What is ob_start?

q)Also with my footer I get

Notice: Use of undefined constant HTTP_HOST - assumed 'HTTP_HOST' in /home/jagguy/public_html/school/test/footer.php on line 5


$urlh = getenv(HTTP_HOST);

$url = $urlh;

What is wrong with this as I don't get an error here on my pc?
×

Success!

Help @jagguy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...