Display Page Breaks in Browser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jdmfontz
Forum Newbie
Posts: 17
Joined: Wed Apr 15, 2009 12:38 pm

Display Page Breaks in Browser

Post by jdmfontz »

I have a form and would like to be able to display the variables in a second page on Submit rather than displaying then at bottom of screen on same page. Have tried css stylesheets but those does not seem to work in the browser. I heard that there is no such thing as page breaks in html. Wondering if someone has been able to code this with php.

Code: Select all

 
<P> This is page 1: </p> 
<form name="newsAdd" method="post" action="">
  <label>Title: <input type="text" name="title"></label><br />
  <label>Article:<br /><textarea name="article" cols="100" rows="20"></textarea></label><br />
  <label>Publish: <input type="checkbox" name="publish"></label><br />
  <input type="submit" value="Submit"><input type="reset" value="Reset">
</form>
 
 

Code: Select all

 
<?php
//This is page 2:
//Define variables
$title = $_REQUEST["title"];
$article = $_REQUEST["article"];
$publish = $_REQUEST["publish"];
//Display variables
echo "This is page 2: " . <br />;
echo "Title: " . $title . "<br />";
echo "Article: " . $article . "<br />";
?>
 
Last edited by Benjamin on Fri May 15, 2009 9:46 am, edited 1 time in total.
Reason: Added [code=html], [code=php] tags.
divito
Forum Commoner
Posts: 89
Joined: Sun Feb 22, 2009 7:29 am

Re: Display Page Breaks in Browser

Post by divito »

Code: Select all

<form name="newsAdd" method="post" action="page2.php">
crazycoders
Forum Contributor
Posts: 260
Joined: Tue Oct 28, 2008 7:48 am
Location: Montreal, Qc, Canada

Re: Display Page Breaks in Browser

Post by crazycoders »

Not as a solution but more as an explanation, the concept of page exists in the web but it is the same as a document such as a word document or a pdf document. The page concept that you are talking about applies to printing where you have a physical limitation of the information you can display on the media whilst on the web, you have no limit except maybe on the RAM of the user but that is not a fixed physical problem like the size of a sheet of paper.
jdmfontz
Forum Newbie
Posts: 17
Joined: Wed Apr 15, 2009 12:38 pm

Re: Display Page Breaks in Browser

Post by jdmfontz »

Thank you. <form name="newsAdd" method="post" action="page2.php"> works nicely.
Post Reply