Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 01-29-2012, 07:58 PM   #1
Join Date: Apr 2011
Posts: 5
Question PHP - HTML Build a Web page that simulates the sending of document pages to the printer.

I dont know about PHP, I`m taking a cours about that...but I`m really so stupid to do this...

I need help ...please


*Page 1 (index):

First Page (index), the user must enter the total number of pages is printed.

Once the user clicks the button, the data input is transferred to a page (TraitementPage.php).

<title>Pages Imprimees </title>

<form action="TraitementPage.php" method="post" >
Nombre de page de votre documents : <input type="text" size="15" name="nomPages">
<input type="submit" value="Valider" />
<input type="reset" value="Annuler" />


*Page 2 (TraitementPage.php) :

Validation Number of page:
* Confirm the presence of a value in the input field (From page index). In the event of an error, display a message "Please enter a value."
* Confirm the presence of a numeric value in the input field. In the event of an error, display an error message "Please enter a numeric value"

if ($nomPages=="")
{echo "Champ Vide !!";}
{echo " Entrez une valeur numerique, Merci";}
{echo " <html><body><form action =\"OptionDimpression.php\" method=\"post\" enctype=\"multipart/form-data\">";

echo " <h2 align=\"center\">Service d'impression<h2>
<p align=\"center\">
<table border=\"1\">
<tbody><tr><td align=\"center\">
<br>Vous désirez imprimer :".$nomPages." Page(s) <br></td></tr>
<input type=\"hidden\" name=\"champ_cache\" value=\"nomPages\" />
<tr><td><input name=\"typeImpression\" value=\"All\" type=\"radio\" checked=\"checked\">
Toutes les pages<br></td></tr>
<tr><td><input name=\"typeImpression\" type=\"radio\" value=\"select\">
<input size=\"2\" id=\"pageDebut\" name=\"pageDebut\" type=\"text\">
<input size=\"2\" id=\"pageFin\" name=\"pageFin\" type=\"text\"></td></tr>
<tr><td align=\"center\">
<input value=\"Imprimer\" type=\"submit\"></td></tr>


I need help here ....3th Page


if (isset($validation))

echo" Impression des pages : ".$choix."<br>";
echo"Nombre des pages imprimées : ".$validation;


1- Method 1 (all pages):

If the user decides to view all pages and click on the PRINT button, it is directed to a third page (OptionDimpression.php) that displays the number of pages printed, the number of each page.

Printing pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Number of printed pages : 24

2- Method 2 (a range of pages):

If the user specifies a page range (the second radio button), you must do the following validations:
1. The page number of beginning can not be less than 1,
2. The page number at the end can not be greater than the total number of pages of the document,
3. The page number of beginning can not be greater than the page number at the end.
- In case any of the previous validation does not show you the user an error message.

Printing pages: 12 13 14 15 (rand)
Number of printed pages: 4


claroquetengo is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:34 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com