2
Contributors
3
Replies
14
Views
3 Years
Discussion Span
Last Post by joshl_1995
0

You could use something like Javascript using something like the code below:

<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js" /></script>
    </head>
    <body>
        <p>
            Name: <input type="text" id="contactName"/>
            <input type="button" value="Click Me" onClick="$('#contactName').val('Contacts Name');" />
        </p>
    </body>
</html>

So what you can do is replace echo "<td align='left'> " . $row["name"]. "</td>"; with echo "<td align='left'><a onClick="$('#contactName').val('Contacts Name');"> " . $row["name"]. "</a></td>"; and it should do what you want.

Hope this helps.

Edited by joshl_1995

0

sir there is error in your following codes

echo "<td align='left'><a onClick="$('#contactName').val('Contacts Name');"> " . $row["name"]. "</a></td>";

Please modify

Edited by tqmd1

0

What is the error?

Also where is says "Contacts Name" put "$row['name']" as it will be what is displayed in the textbox.

Edited by joshl_1995

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.