new to php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

cr-isp
Forum Newbie
Posts: 17
Joined: Thu May 26, 2005 8:25 am
Location: manchester

Post by cr-isp »

done that, still white screen and no error checking
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Code: Select all

error_reporting(E_ALL);        
$cfgProgDir = "crispsession/"; 
include($cfgProgDir . "secure.php");
Note the quotes around "secure.php"
User avatar
artexercise
Forum Commoner
Posts: 33
Joined: Thu Nov 20, 2003 9:38 am
Location: Raleigh, NC

Post by artexercise »

Is there a problem in the secure.php file? When I commented out all the stuff that wouldn't have done me any good I got a page with a table displaying the static information. Estenially All I used was the echo statement. Have you tried building backwards from what works until you get the error?

JOE--
cr-isp
Forum Newbie
Posts: 17
Joined: Thu May 26, 2005 8:25 am
Location: manchester

Post by cr-isp »

Joe,

if i just use this it works fine

Code: Select all

<?PHP 
$cfgProgDir = 'session/'; 
include($cfgProgDir . "secure.php");
?>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Database account</title>
</head>

<body>

<font size="2" face="Tahoma">

<?
    
mysql_connect("localhost","database","password");

$query1 = "SELECT * FROM table WHERE username='$login' and password='$password'";
$result1 = mysql_db_query(database,$query1);
while($row = mysql_fetch_object($result1)) {

echo("

$row->first_name $row->last_name<br>
<br>
$row->address_line_1<br>
$row->address_line_2<br>
$row->address_line_3<br>
$row->post_code<br>
$row->phone<br>
$row->email<br>
$row->wireless_adapter<br>
$row->radial_ref<br>
$row->speed<br>

	");
          
}
          
?>

</font>

</body>

</html>
its when i introduce a html table is where it starts going wrong
is there an easier way to do what i am trying to do. all i want to do is echo out lines from ym data base but out them in to a html table

have done all that has been suggested and still no luck

very impressed with this forum, dedicated ppl

Alan
cr-isp
Forum Newbie
Posts: 17
Joined: Thu May 26, 2005 8:25 am
Location: manchester

Post by cr-isp »

am i echoing the right statements

is thsi the way to echo them out, taking in to consideration hoe i have structured my php.

Code: Select all

<td height=13><font face=Tahoma size=2>$row->first_name</font></td>
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

i dunno if php likes $row->first_name inside double quotes (just a guess)

so try this
<table stuff>".$row->first_name."</table stuff>
cr-isp
Forum Newbie
Posts: 17
Joined: Thu May 26, 2005 8:25 am
Location: manchester

Post by cr-isp »

would the speech marks not make the script void, was told that the intial reason i was having som much is i hadnt striped out the " marks in the html table. is this correct and should i put them in as per your suggestion

Alan
cr-isp
Forum Newbie
Posts: 17
Joined: Thu May 26, 2005 8:25 am
Location: manchester

Post by cr-isp »

shiznatix


you are F**king Genius, i can not thank you enough, i can sleep again.

thanks ever so much, make no mistake "ill be back";?>

lol at php bit

any way thanks so much

Alan
Last edited by cr-isp on Thu May 26, 2005 10:26 am, edited 1 time in total.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

my pleasure
Post Reply