If page_id =”” do not display form
-
I am attempting to display or not display a form based on the current page.
I am attempting to not display the form if the current page is my affiliate page. The form links to the affiliate page so if the reader is on the page I don’t need the form displayed.
The form now displays on every page.
Any help would be appreciated.
Current Code:
`<?php
if($post_id != “affiliate-center”){
print “<div id=\”cbsidebar\” style=\”width:175px;margin:10px auto 10px;display:block;text-align:center\”><form action=\”https://www.mysite.com/affiliate-center/\” method=\”post\” accept-charset=\”UTF-8\”><p style=\”font-size:x-small\”>75% Commisions Great Affiliate Tools</p>
<label for=\”CB_ID\”>Affiliate ID :</label>
<input id=\”hop\” name=\”hop\” type=\”text\” value=\”\” /><input type=\”submit\” value=\”Go To The Affiliate Center\”/></form></div>”;
}
else {
print “”;
}
?>`Thank you
- The topic ‘If page_id =”” do not display form’ is closed to new replies.