using two colonms in detail page
i have record set with two db tables galleries and images
i have url editGallery.php?id=2 working
how do i get the information to show on the detail page
also some insight on using sesion would that be esier
i have record set with two db tables galleries and images
i have url editGallery.php?id=2 working
how do i get the information to show on the detail page
also some insight on using sesion would that be esier
on the edit gallery page, create a hidden form element that will capture the id url variable:
<input type="hidden" name="id" id="id" value="<?php echo(isset($_GET['id'])?$_GET['id']:""); ?>
then in the Update record behavior, set the redirect URL to the details page and pass the id variable:
details.php?id=<?php echo(isset($_POST['id'])?$_POST['id']:""); ?>
on the details page, you can use the id URL variable to filter the recordset.
i did this editGallery.php?=<?php echo(isset($_POST['id'])?$_POST['id']:""); ?>
no id goes to the url
then on the edit page i did this
input type="hidden" name="id" id="id" value="<?php echo(isset($_GET['id'])?$_GET['id']:""); ?>
record set on the edit page looks like this
ELECT pg1_gallery.* , count(pg1_gallery_images.imgsrc) AS `number of images` , pg1_gallery_images.* , pg1_gallery_images.photoComment , pg1_gallery_images.created , pg1_gallery_images.watermark_text , pg1_gallery_images.upDated , pg1_gallery.updated , pg1_gallery.id , pg1_gallery.created , pg1_gallery.GalleryName , pg1_gallery_images.gallery_id
FROM pg1_gallery LEFT OUTER JOIN pg1_gallery_images ON pg1_gallery.id = pg1_gallery_images.gallery_id
WHERE id = Paramid OR ( -1= Paramid2 AND id= ParamSessionid)
ORDER BY pg1_gallery.id
paramid looks like this $_GET['id']
i did not say to use a post variable going to the edit page, that wasn't something i said you should change.
you had it correct before.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.