/    Sign up×
Community /Pin to ProfileBookmark

Can a page $_POST to itself?

Basically I want, or think I want, an unframed mainPage.php to open a second page with a sidebar. The secondMainPage will have a button that returns the user to mainPage.php. If mainPage.php is split then the split is inherited downstream and gets itself nested and creates other complications.

This script below gives me an error message that says there’s an illegal ‘$’ dollarbill sign on a line where there is no such symbol. The only $ on the page is the one accompanying _Post. Do I have this set up right?

<?php
if(isset($_Post[‘searchTerm’])){
echo “<FRAMESET COLS=”10%,*”>”;
echo “<FRAME SRC=”sidepage.html” NAME=SIDEBAR>”;
echo “<FRAME SRC=”secondMainPage.php” NAME=secondMainPage>”;
echo “</FRAMESET>”;
}else{
?>
<HTML>
<body>
<form method =”POST” action=”mainPage.php” >
<center><input name=”searchTerm” type=”text”></center>
<br>
<center><input type=”submit” value=”Search”></center>
</form>
</body>
<?php
};
?>
</HTML>

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @tonyB spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...