my question is, how would I write the PHP/PDO/MYSQLI code to enable the final search result/record
clickable. as HREF= #Blank or something similar.
I.e employee: David < Click and open David’s file/profile etc.
I am struggling understanding how to add this into ajax/jquery or json. I know it can be achieved but it may be beyond my current skills. it seems no tutorial ive ever seen has this as a possibility, yet it seems quite normal when using any online profile/database searching etc.
To be fair, the tutorial is pretty old and in need of an update. It would (for example) be better to use some kind of template to display the results on the client, or just return the necessary HTML from the server.
That said, the part you’d need to look at is here:
Thanks. Ill try that and see how i go.
Yeah i noticed that, the net has moved so fast the last 2 yrs that so many tutorials are deprecated. Plenty of mysql but limited pdo, ajax etc.
Can be a struggle for beginners.
Does the code you suggest indicate 1 value in the row or the whole row?
Hey, i tried as you suggested. it worked to a degree, however it made the whole “Name” column clickable as 1 URL, however I am unsure what the next step would be to make “peter” clickable, as opposed “peter, paul, simon, frank” all being the same URL link. (I used just an example webpage.)
function makeTable(data){
var tbl_body = "";
$.each(data, function() {
var tbl_row = "";
$.each(this, function(k , v) {
if(k==="name"){
tbl_row += ""+v+"";
} else {
tbl_row += ""+v+"";
In a previous search script with PDO/PHP i did it this way;
while ($results = $query->fetch()) {
echo “<td style="border-style:solid;border-width:1px;border-color:#98bf21;">”;
echo “
Ok. For example
Name/qualification/location/resume
Simon/engineer/berlin/yes
Peter/teacher/paris/yes
Micheal/doctor/madrid/yes
With the current code i can click on the name column. However that name column is the same url regardless of how far youve filtered. I am wonder how you can make the database value valid as the url.
Hence my previous example of $results [url]. I have seen a couple others but im still lost.