:: Forum >>
Link Mysql PHP
Hello,
I have a web project made with php and mysql, and i would like to use activewidgets. The problem is that i´m having problems to make links with the data.
First of all, i have a table with the some names and with a id, and i want that name have the link (page?doc=something&idname) + the ID of that name.
Can anyone help me?
Thak´s in advance
Netpoint
Tuesday, December 7, 2004
php linke_to_page.php?id=<?php echo $row_Recordset1['id']; ?>- abowe - if you want to send ID link from your form.
<?php do { ?>
<a href="admin_update_application.php?id=<?php echo $row_Recordset1['id']; ?>"><?php echo $row_Recordset1['m_name']; ?></a></br>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<?php echo $row_Recordset1['apName']; ?>
- above if you want to loop your links dynamikli retrieved from a db table it will send id and apName in the link .
Andrew
Tuesday, December 7, 2004
Hello Adrew,
Thank´s for your reply.
I Know that the code is ( php linke_to_page.php?id=<?php echo $row_Recordset1['id']; ?> ) , but where i write your example code??
Is it in the widgets files or on the widget code( placed on my php page) to retreive data??
My code to get the table data on my the php page is:
<?php
// grid object name
$name = "obj";
// SQL query
$query = "SELECT Equipa, ID FROM taca_fslb";
// database connection
$connection = mysql_connect("whatever", "username", "password");
mysql_select_db("database");
// query results
$data = mysql_query($query, $connection);
// add grid to the page
echo activewidgets_grid($name, $data);
?>
Thank´s in advance
Netpoint
Wednesday, December 8, 2004
This topic is archived.
Back to support forum
Forum search