05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example 7-1. The chunkify form (chunkify.html) (continued)<br />

<br />

<br />

Enter a word: <br />

How long should the chunks be?<br />

<br />

<br />

<br />

<br />

<br />

Example 7-2 lists the <strong>PHP</strong> script, chunkify.php, to which the form in Example 7-1 submits.<br />

The script copies the parameter values into variables and uses them. Although<br />

the register_globals option in php.ini would automatically create variables from the<br />

parameter values, we don’t use it because it complicates writing secure <strong>PHP</strong> programs.<br />

Example 7-2. The chunkify script (chunkify.php)<br />

<br />

Chunked Word<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!