Computing.Net > Forums > Web Development > Login script and Shoutbox

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Login script and Shoutbox

Reply to Message Icon

Name: zancom (by ssjgl)
Date: June 23, 2005 at 22:12:31 Pacific
OS: Win XP
CPU/Ram: n/a
Comment:

I have a login script that i think keeps its usernames and passwords in a mysql database. I also have a shoutbox that you can type in your name and message and post it.

Is there a way that I could make it so when people log in the site, it will use the username they used to log in with as the name for the shoutbox?

http://www.iblob.info
http://www.infoshackdesigns.com



Sponsored Link
Ads by Google

Response Number 1
Name: FBI Agent
Date: June 24, 2005 at 11:50:54 Pacific
Reply:

make a query of the database then extract the name and put it on the site

$host = "localhost"; // SQL host
$user = "username"; // SQL username
$pass = "pw"; // usernames password
$db_name = "database_name"; // database

$conn = mysql_connect($host, $user, $pass)
or die(mysql_error());
$db = mysql_select_db($db_name, $conn)
or die(mysql_error());

$sqlU = "UPDATE `$table_names[$i]` SET `$table_entries[$i]` = $new_namesR[$i] WHERE `ID` = '$_GET[ID]' LIMIT 1 ;";

$sql_resultR = mysql_query($sqlR, $conn)
or die(mysql_error()); mysql_close($conn);

while ($row = mysql_fetch_array($sql_resultR)) {
$fname = $row['FIRST_NAME'];
}

something like that... well a lot like that.
all of that was part of code that i have in my recent project of an address book. so it's good

FBI Agent

AIM: EliteAssassin187


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Login script and Shoutbox

PHP Login Script www.computing.net/answers/webdevel/php-login-script/2720.html

Making a login script for my website help! www.computing.net/answers/webdevel/making-a-login-script-for-my-website-help/4185.html

PHP and Sockets www.computing.net/answers/webdevel/php-and-sockets/1655.html