PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > Advice on creating data driven site
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Advice on creating data driven site

Réponse
 
LinkBack Outils de la discussion
Vieux 26/02/2008, 21h02   #1
vncntj
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Advice on creating data driven site

I have a id, fname, last and other personal information with a
database..
I'd like to create a left-sided menu with the lname, fname diplaying
with the id being passed with the <a href> link. but the values will
be passed back to the same page. I'd like to place the personal
information in the middle of the page. my question is, what would be
the best approach? I'm trying something like:

<body>
<?php
while ($row=$db->get_row($r, 'MYSQL_ASSOC'))
{
echo "<a href=\"index.php?id=".$row['ApplicationId']."\">" .
$row['LastName']."," .$row['FirstName']. "</a><br>" ;
}

?>
<div id="content" style="width: 105px; text-align: left; position:
absolute; top: 10px; left: 250px;">
<?php
if(isset($_REQUEST['id']))
{
"PERSONAL INFORMATION HERE"
}
else
{
echo "Nothing passed";
}
?>
</div>
</body>

I'm just trying to apply the most effective approach. Should I try
AJAX??

Thanks,
  Réponse avec citation
Vieux 27/02/2008, 18h07   #2
Mason Barge
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Advice on creating data driven site


"vncntj" <vncntj@hotmail.com> wrote in message
news:44fabe24-7961-4495-878c-65377b287c55@64g2000hsw.googlegroups.com...
>I have a id, fname, last and other personal information with a
> database..
> I'd like to create a left-sided menu with the lname, fname diplaying
> with the id being passed with the <a href> link. but the values will
> be passed back to the same page. I'd like to place the personal
> information in the middle of the page. my question is, what would be
> the best approach? I'm trying something like:
>
> <body>
> <?php
> while ($row=$db->get_row($r, 'MYSQL_ASSOC'))
> {
> echo "<a href=\"index.php?id=".$row['ApplicationId']."\">" .
> $row['LastName']."," .$row['FirstName']. "</a><br>" ;
> }
>
> ?>
> <div id="content" style="width: 105px; text-align: left; position:
> absolute; top: 10px; left: 250px;">
> <?php
> if(isset($_REQUEST['id']))
> {
> "PERSONAL INFORMATION HERE"
> }
> else
> {
> echo "Nothing passed";
> }
> ?>
> </div>
> </body>
>
> I'm just trying to apply the most effective approach. Should I try
> AJAX??
>
> Thanks,


I'm not an expert, but I can't get exactly what you are trying to accomplish
here. What's the larger intention?

At any rate, unless I'm completely misunderstanding what you want, here's a
snippet that will make your life simpler:

while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) {
foreach( $row AS $key => $val ){
$$key = stripslashes($val);
}
}


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 04h50.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07638 seconds with 10 queries