Is it possible to code a web page to allow a browser to print a hardcopy directly from a form using HTML and/or JavaScript/php, or does the user have to go through File -> Print to do it? I've been unable to find any article, book or FAQ which gives any guidance, so perhaps it is not possible.
Any help would be appreciated.
(this was originally posted in the HTML Forum.)
User Profile
Collapse
-
Hardcopy is a paper copy of the web page. I realise that it can be done via File -> Print but I am looking for a rather more elegant solution.... -
HTML to Hardcopy
Is it possible to code a web page to allow a browser to print a hardcopy directly from a form using HTML and/or JavaScript/php, or does the user have to go through File -> Print to do it? I've been unable to find any article, book or FAQ which gives any guidance, so perhaps it is not possible.
Any help would be appreciated. -
I've been struggling with this also having entered a time with NOW() into a field called place_date and then been unable to format it.
The answer I have found which may not be the best but it works is as follows:
[code=php]
$mysqli = mysqli_connect( "localhost" , "user", "password", "db")
$get = SELECT DATE_FORMAT(pla ce_date,' %b %e %Y ' ) AS fmt_place_date
...Leave a comment:
-
Many thanks for your help - it has taken me till now to discover how to read my threads! - My problem turned out to be that, due to some incompetent programming, I was returning a "" password which was duly given a 40 character string!...Leave a comment:
-
Apache22\logs\error messages
I am writing programs in php on an XP machine.
Each time I access any php file, the following message is recorded twice:
File does not exist: C:/www/webroot/favicon.ico
Can anyone tell me why this is happening and how to prevent it? It does not prevent the program working but rapidly clogs the error file. -
sha1 entry disparity
Registering hibiscus as a password produces a totally different 40-character string to the one I get when I enter it at login. Both programs are consistent with their differing strings. Can anyone tell me why this is and suggest a solution? -
I saved your program as display_query.p hp. When I ran it I got a blank screen and an error message in Apache22\log\er ror:parse error, unexpected ';' in C:\\www\\webroo t\\display_quer y.php on line 27. It looks alright to me!
Also I do not understand the '.' s which are inserted in the echo line; I have not found an explanation of their relevance anywhere....Leave a comment:
-
I didn't! Here it is:
<html>
<head><title> How to Grab your MySQL Data </title></head>
<body bgcolor="#FFFFF F">
<?php
/* declare some relevant variables */
$DBhost = "localhost" ;
$DBuser = "root";
$DBpass = "";
$DBName = "mail";
$table = "info";
mysql_connect($ DBhost,$DBuser, $DBpass)...Leave a comment:
-
Many thanks for your prompt reply; you were right about the echo additions. The tags aroung the HTML do not seem to make a difference.
Also I was using mysqli_ functions which did not produce an error but there was no output. Changing them to mysql_ functions produced a result.
I am appending the working script in case it is helpful....Leave a comment:
-
tutorial problem
I am having trouble printing out results using your tutorial php format. I can't see any errors of copying but they must be there somewhere! The database 'mail' has only one table: 'info' with four entries, one of which has 'good' in the 'opinion' field.
My php file is:
<html>
<head><title> How to Grab your MySQL Data </title></head>
<body bgcolor="#FFFFF F">...
No activity results to display
Show More
Leave a comment: