close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Create links in a repeat region

Thread began 3/28/2013 11:00 pm by zackdacre445052 | Last modified 3/31/2013 12:34 pm by Jason Byrnes | 1368 views | 5 replies |

zackdacre445052

Create links in a repeat region

Hi Jason,

Hope all is well with you and yours. I am getting the following message in live view after clicking on a record retrieved from a database using a record set in a repeated region. This particular one involves a conditional statement.

Notice: Undefined index: CV_name in C:\xampp\htdocs\PC_Services\Teacher.php on line 108

</div>
<div id="advertisement">
<p>Applicants Details</p>
<?php do { ?>
<p>Name: <?php echo $row_Applicants_details['name']; ?></p>
<p>Gender: <?php echo $row_Applicants_details['Gender']; ?></p>
<p>Address: <?php echo $row_Applicants_details['address']; ?></p>
<p>NIC#: <?php echo $row_Applicants_details['NIC']; ?></p>
<p>Highest Education: <?php echo $row_Applicants_details['Highest_Qualification']; ?></p>
(108) <p>Download CV: <a href="<?php echo $row_Applicants_details['CV_name']; ?>"><?php echo $row_Applicants_details['CV_name']; ?></a></p>
<p>&nbsp;</p>
<?php } while ($row_Applicants_details = mysql_fetch_assoc($Applicants_details)); ?>
<p>&nbsp;</p>
</div>

This is the conditional statement:
$var1_Applicants_details3 = "-1";
if (isset( $_GET['id'])) {
$var1_Applicants_details3 = $_GET['id'];
$query_Applicants_details = sprintf("SELECT namelist.name, namelist.Gender, namelist.address, namelist.NIC, namelist.`Highest_Qualification` FROM namelist WHERE namelist.id = %s ORDER BY namelist.name", GetSQLValueString($var1_Applicants_details3, "int"));
}else
{
$query_Applicants_details = "SELECT namelist.name, namelist.Gender, namelist.address, namelist.NIC, namelist.`Highest_Qualification`, namelist.`CV_name`, namelist.id FROM namelist WHERE namelist.Occupation = 'teacher' ORDER BY namelist.name LIMIT 2";
}
$Applicants_details = mysql_query($query_Applicants_details, $pc_services) or die(mysql_error());
$row_Applicants_details = mysql_fetch_assoc($Applicants_details);
$totalRows_Applicants_details = mysql_num_rows($Applicants_details);
?>

Thanks much for your assistance.

Sign in to reply to this post

Jason ByrnesWebAssist

My guess is that the CV_name column is not included as part of the select statement for the Applicants_details recordset.

Sign in to reply to this post

zackdacre445052

links in repeat region

You were right. Thanks.

One more thing. Is it possible for the record set in the repeated region to display a picture for each person. Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

if the image name is returned in one of the columns, you can use that in an image tag:

<img src="image/path/<?php echo($row_recordsetName['imageColumn']); ?> />

Sign in to reply to this post

zackdacre445052

Creating links to documents

I was getting some problems with your image tag so I used the following :

<img src="<?php echo $row_Applicants_details['Picture']; ?>" alt="pic" /><br />

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

Well, mine was just an example of how to do it, you need to use your own recordset and column name for the code to work.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...