Welcome to Gaia! ::

My Design :: Web and Graphic Design [HTML CSS PHP]

Back to Guilds

XHTML, CSS, jQuery, Javascript, PHP, mySQL, MORE! 

Tags: design, graphics, html, jquery, javascript 

Reply Server Side Programming
damn IT DAMN IT ****** Ive been trying to fix this code for.

Quick Reply

Enter both words below, separated by a space:

Can't read the text? Click here

Submit

Kanashio Koroshi

PostPosted: Thu Jun 28, 2007 9:03 am


this code is drivng me crazy plz help





$db = mysql_connect() or die ' could not connect';
mysql_select_db('secondlife') or die 'could not select';
$query = mysql_query('SELECT * FROM users') or die 'could nt query';
$row = mysql_fetch_array($query, MYSQL_ASSOC) or die 'could not get array';
echo ($row[$_POST['user']]) or die 'could not echo';

?>


Its supposed get data from a form and get the seccond row in its colum
PostPosted: Thu Jun 28, 2007 9:04 am


Oh and the form is kinda odd for its post data that comes from a game called secondlife.

Kanashio Koroshi


renlok

PostPosted: Sun Jul 08, 2007 4:49 am


i dont understand what is the $_POST['user'] for? plus why have or die 'could not echo' on an echo its just not needed

Buts here an attemp to understnad what you need






$db = mysql_connect('localhost', 'mysql_user', 'mysql_password') or die('cant connect')
mysql_select_db('secondlife', $db) or die('could not select')
$query = mysql_query('SELECT * FROM users') or die('could nt query')
$row = mysql_fetch_array($query) or die('could not get array')
echo $row[$_POST['user']]

?>


Reply
Server Side Programming

 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum