PDA

View Full Version : PHP Problems



coolblu
April 16th, 2002, 13:25
Hi there :)

Im a little stuck with some customisation I'm trying to make to the dt:links (X-Links) script (http://xfactor.dtfusion.com/scripts.php), and I wonder if anyone can help.
I am trying to place a new field in the admin section and the install script, which I have done for the affiliate description, but I would not like to be able to list the first 10 affiliates in the database.
SO far I have

<?php
$incfilelocation = "http://www.mylocation.com/directory/to/connect/file";

include('$incfilelocation/connect.inc');
?>
<?php
$query = "select * from affiliates where affilid = $affil";
$result = mysql_query($query) or die( mysql_error() );
$number_cols = mysql_num_fields($result);
while ($row = mysql_fetch_array($result))
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>

<body>



</body>
</html>


In a file called show.php. Ideally I would like to be able to extract the name (
$row["affilname"]) and the description (
$row["affdescr"]) to format the first ten affiliate links in a mySQL database like follows:


<a href="out.php?id=ID_NUMBER_HERE">$row["affilname"]</a><br>$row["affdescr"]

Any help you can give with this would be very much appreciated.

Thanks :)

Blu (Coolblu)

coolblu
April 17th, 2002, 14:43
anyone have any help?

spec
April 17th, 2002, 16:26
your while loop isn't doing anything
you have to have {}