Reply to Re: Linking php to php

Your name:

Reply:


Posted by Alan Sipma on 12/18/05 04:25

so your idea is to run a loop to get the four member then have button
to get the details of thr members?


On 2005-12-03 08:25:17 -0500, "Bart Reijven" <headbanger@planet.nl> said:

> Hi there,
>
> (sorry if my english is bad, but don't blame me I'm Dutch and I've got
> a very bad englishteacher)
>
> I don't know how to put this in correct English but I'm gonna try it:
>
> I've got two pages.... one is called 'textmembers.php' the other one is
> 'textmembers_info.php'. I've got 4 pictures in textmembers.php that
> link to textmembers_info.php. But! every picture relates to another
> input in my table in my database.
>
> ---------------------------------------------------------'textmembers.php'
> -----------------------------------------------------------
> <?php
> Include("../db/db_connect.php");
> $query = "SELECT persoon_id FROM cookie_info";
> $result = mysql_query($query) or die (mysql_error());
> ?>
>
> <html>
> <head>
> <link rel="stylesheet" type="text/css" href="../css/style.css">
> </head>
> <body link="#000000" vlink="#000000" alink="#000000">
> <h1>INGREDIENTS</h1>
>
> <table border="0" width="100%" class='Transparent' cellspacing="0"
> cellpadding="0"><tr><td width="100%">
>
> <h2>
>
>
> <?php
>
> while (list($persoon_id) = mysql_fetch_row($result)){
> echo "<table border='0' width='100%' cellspacing='0' cellpadding='0'><tr>";
> echo "<td width='25%'><a href='textmembers_info.php?$persoon_id=1'><img
> src='../images/membersjord.jpg' width='105' height='220'></a></td>";
> echo "<td width='25%'><a href='textmembers_info.php?$persoon_id=2'><img
> src='../images/membersrick.jpg' width='105' height='220'></a></td>";
> echo "<td width='25%'><a href='textmembers_info.php?$persoon_id=3'><img
> src='../images/membersrobin.jpg' width='105' height='220'></a></td>";
> echo "<td width='25%'><a href='textmembers_info.php?$persoon_id=4'><img
> src='../images/membersbart.jpg' width='105' height='220'></a></td>";
> echo "</tr></table>";
>
> }
> Include("../db/db_disconnect.php");
> ?>
>
> </td></tr></table>
>
> </h2>
>
> </body>
> </html>
>
> ---------------------------------------------------------END OF
> 'textmembers.php'
> -----------------------------------------------------------
>
> ---------------------------------------------------------'textmembers_info.php'
> -----------------------------------------------------------
>
> <?php
> Include("../db/db_connect.php");
> $query = "SELECT persoon_id, voornaam, achternaam, woonplaats,
> geboortedatum, instrument, apparatuur,
> project, muzieksoort, favoriete_bands, idool,
> goede_eigenschappen, slechte_eigenschappen, houdt_van,
> hekel_aan, toekomst, motto, image1, image2 FROM cookie_info
> ORDER BY persoon_id";
> $result = mysql_query($query) or die (mysql_error());
> ?>
>
> <html>
> <head>
> <link rel="stylesheet" type="text/css" href="../css/style.css">
> </head>
> <body>
> <h1>PERSONAL COOKIEFILE</h1>
>
> <table border="0" width="100%" class='Transparent' cellspacing="0"
> cellpadding="0"><tr><td width="100%">
>
> <?php
> while (list($persoon_id, $voornaam, $achternaam, $woonplaats,
> $geboortedatum, $instrument, $apparatuur,
> $project, $muzieksoort, $favoriete_bands, $idool,
> $goede_eigenschappen, $slechte_eigenschappen, $houdt_van,
> $hekel_aan, $toekomst, $motto, $image1, $image2) =
> mysql_fetch_row($result)){
>
> echo "<table border='0' width='100%'><tr>";
> echo "<td width='50%'><img border='2' src=".$image1." width='210'
> height='150'></td>";
> echo "<td width='50%'><img border='2' src=".$image2." width='210'
> height='150'></td></tr></table><br>";
> echo "<table border='0' width='100%' cellspacing='4' cellpadding='0'><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Beter bekend
> als de</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$voornaam."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Fabrikant</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$achternaam."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Productiehal</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$woonplaats."</td></tr><tr>";
> echo "<td width='40%' valign='top'
> align='left'><h2><b>Productiedatum</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$geboortedatum."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Het
> lekkerste bij de</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$instrument."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Bijgevoegde
> saus</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$apparatuur."</td></tr><tr>";
> echo "<td width='40%' valign='top'
> align='left'><h2><b>Oude/alternatieve verpakking</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$project."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Favoriete
> koekjessoort</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$muzieksoort."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Favoriete
> Koekjessmaak</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$favoriete_bands."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Idoolkoekjes</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$idool."</td></tr></table>";
> echo "<table border='0' width='100%' cellspacing='4' cellpadding='0'><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Goede
> eigenschappen</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$goede_eigenschappen."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Slechte
> eigenschappen</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$slechte_eigenschappen."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Houdt van</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$houdt_van."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Heeft een
> hekel aan</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$hekel_aan."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Later als ik
> groot en wijs ben</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60%' valign='top'
> align='left'><h2>".$toekomst."</td></tr><tr>";
> echo "<td width='40%' valign='top' align='left'><h2><b>Motto</td>";
> echo "<td width='2%' valign='top' align='left'><h2>-</td>";
> echo "<td width='60% valign='top'
> align='left'><h2>".$motto."</td></tr></table>";
> echo "<BR>";
> }
> Include("../db/db_disconnect.php");
> ?>
>
> </h2>
> </td></tr></table>
> </body>
> </html>
>
> --------------------------------------------------------- END OF
> 'textmembers_info.php'
> -----------------------------------------------------------
>
> the problem is, I think in this row:
>
> echo "<td width='25%'><a href='textmembers_info.php?$persoon_id=1'><img
> src='../images/membersjord.jpg' width='105' height='220'></a></td>";
>
> I want to call the inputdata that is related to 'persoon_id' that has
> '1' as input. The other pictures have to relate to the inputs 2,3 and
> 4...
>
> Can you help me figure this out?
>
>
> Thnx,
>
> Bart

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация