|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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, |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
"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); } } |
|
![]() |
| Outils de la discussion | |
|
|