How to provide a link to a class resultset variable?

I have a list of pairs name / id in a database using Mysqli table.

The PHP code that prints them out is as follows:

While ($row = mysqli_fetch_array ($resultset, MYSQLI_NUM))

{echo $row [0].} « - ». $row [1]. "\n < br / > ';

}

It works very well. There are up to 6000 items in this list, so that it uses a repeat (not shown) region.

I want to link to a page that uses the id to do things with him (such as edit or delete a folder).

I need to send the value of $row [0] at the next page, but use $row [1] as a link to a page called testlink.php.

The following code:

< a href = "testlink.php? ref = <?" PHP echo $row [0];? > "> <?" PHP echo $row [1];? > < / a >

seems to be a way to do it, but I can't understand how just insert this in the line echo without errors.

Can someone help with the php code to do this?

And is there a better way to access the various elements very large lists other than the use of what is in fact a menu drop down multi-page.

Howard Walker

> It produces what I need, but the index id is not printed before the linked name.

Do you mean that the id is not be inserted into the query string?

Looks like you have an extra quote mark in there. Try this

">
"; }? >

Tags: Dreamweaver

Similar Questions

Maybe you are looking for