View Full Version : Totally Flummoxed ...

08-16-2007, 03:09 PM
Hello everyone,

I'm going (more) insane... I'm no developer, more of a designer, but I can manage JavaScript and Actionscript, so thought I'd try and get my head around PHP for a project I'm working on. After several days of trawling google and your sticky threads here, I'm even more confused.

I am working on a wedding website which allows visitors to search by a particular wedding style. The results come back with an image, photographer name and venue. I've set all of these up on a mySQL database. I need it to bring back records from a particular column with a value of 1, showing the elements I described above. I then want to link from the image to a detail page which isn't database driven, so it's a simple link to a url.

I think the problem is that I'm working with old script from a form search... I decided to start with where I'd like the results from the database to go and work backwards, analysing what links to what in the code. So I have a div with what I think is php corresponding to field names in my database:

<div id="details"><a href="http://rlwtest.co.uk/images/$txtURL"><img src="<?=$pathPictureFileName?>" width="100" alt="<?=$fldName?>" title="<?=$fldName?>" /></a>

I'm now trying to look at a huge piece of php which I've tailored to this:

// fetch the row data
$fldPicture_Id = $sql->data[1];
$fldName = $sql->data[2];
$txtURL = $sql->data[3];
$fldVenue = $sql->data[4];
$fldPhotographer = $sql->data[5];

<div id="details"><a href="http://rlwtest.co.uk/images/$txtURL"><img src="<?=$pathPictureFileName?>" width="165" alt="<?=$fldName?>" title="<?=$fldName?>" /></a>

Now I'm lost ... I know there's more php needed, and I thought I could code that from the tutorials, but I'm stuck. I know how I'd do it as a recordset, but past designers of the site have used php.

Not looking for someone to give me a complete solution, just some pointers on what to do (barr finding a developer somewhere who can and paying them!) ... thanks muchly, Lins :)

08-16-2007, 03:29 PM
thats illegal in php

<?php echo "<div id=\"details\"><a href=\"http://rlwtest.co.uk/images/$txtURL\"><img src=\"$pathPictureFileName\" width=\"165\" alt=\"$fldName\" title=\"$fldName\" /></a>
</div> ";
//or try multi-lining it into more than one echo statement.

08-16-2007, 03:49 PM
Ahhh cool,

I remember reading about multilining echo statements,

thanks for that, will change that bit :) :thumbsup: