nko
01-03-2004, 06:40 AM
I know I'm just doing something wrong. I'm trying to select data and print it out to the screen. Here's what I've got:
<?php
session_start();
include_once('include/header');
mysql_connect('localhost', $_SESSION[user_name], $_SESSION[password]);
mysql_select_db('records');
$query="select insert_date from jobs where job_num=\"$_POST[job_num]\"";
$result=mysql_query($query);
$output=mysql_fetch_array($result);
print("Result: $result<br>Output: $output<br>SQL Query: $query");
include_once('include/footer');
?>
This ends up trying to tell me that $result==Resource id #3 and $output==Array.
What I want to do is pull a date from a table and print it out to the screen, just like that. I know it's just some syntax thing I'm getting wrong, being new to this and all. Thanks!
<?php
session_start();
include_once('include/header');
mysql_connect('localhost', $_SESSION[user_name], $_SESSION[password]);
mysql_select_db('records');
$query="select insert_date from jobs where job_num=\"$_POST[job_num]\"";
$result=mysql_query($query);
$output=mysql_fetch_array($result);
print("Result: $result<br>Output: $output<br>SQL Query: $query");
include_once('include/footer');
?>
This ends up trying to tell me that $result==Resource id #3 and $output==Array.
What I want to do is pull a date from a table and print it out to the screen, just like that. I know it's just some syntax thing I'm getting wrong, being new to this and all. Thanks!