logo-dw

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

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

Hello,
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).

<html>
<head>
<title>Pages Imprimees </title>
<body>

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

===================

*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"

<?php
$nomPages=$_POST["nomPages"];
if ($nomPages=="")
{echo "Champ Vide !!";}
elseif(is_numeric($nomPages)!=true)
{echo " Entrez une valeur numerique, Merci";}
else
{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\">
Pages
<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>
</tbody></table>
<br>
</p>
</form>
</body>
</html>";}
?>

==========================

I need help here ....3th Page


<?php
$validation=$_POST["champ_cache"];
$choix=array();

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.

(example)
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


HELP ME PLEASE....

Thx
claroquetengo is offline   Reply With Quote
Reply


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 05:22 PM.


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