0

how can i print the search result using php???

sorry, i dont have any reference code and i dont know how to start the print process using php....

any help, please??? and thanks for your time...

2
Contributors
4
Replies
6
Views
5 Years
Discussion Span
Last Post by fika
0

Hi,

I don't intend to sound like as if I am really dumb or stupid, I mean nothing like that :). You mean "print" as in "echo" in php? Or print as executing the viewer's printer attached to its desktop?

Edited by veedeoo: n/a

0

my mistake.. i'm sorry.. the second one.. print as executing the viewer's printer attached to its desktop..

0

Hi,

Thanks for clearing that out. :) I was only joking of course. :).

To print the current page where the browser is on, we need javascript function something like window.print()

So, my example would be like this..

<?php

echo "Hello I am written by way of php echo function, but I will definitely get printed by way of javascript function";

?>
<!-- we do it by form -->
<form>
<input type="button" value="Print Me" onClick="window.print()" />
</form>
<br/>
<!-- or do it by text link -->
<a href="#" onClick="window.print()"/>Print Me</a><br/>

Edited by veedeoo: n/a

0

oh my... thanks...
that's very big help....
thank you....

This question has already been answered. 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.