madshadow
08-14-2006, 06:39 AM
Hello everyone,
I have a document storage system that lets you type in a field, apply a function that produces dynamic pictures, then save your document.
the problem i have is that the viewing page works fine once the form has been submitted with a "preview button" (using isset($_POST['submitted']....but the problem is when you go to the page from another page using viewpage.php?document_id=10 for instance.
i tried using the following conditionals to make it so EITHER the form has been submitted OR the page has been accessed by being passed a GET variable but i'm having errors:
if (isset($_POST['submitted']) or isset($_GET['document_id'])) {
if (isset($_POST['submitted']) || isset($_GET['document_id'])) {
if (isset($_POST['submitted'])) or if (isset($_GET['document_id'])) {
what is the best way to have both a post and get in the same conditional?
Thanks to everyone for reading this and hopefully helping!
I have a document storage system that lets you type in a field, apply a function that produces dynamic pictures, then save your document.
the problem i have is that the viewing page works fine once the form has been submitted with a "preview button" (using isset($_POST['submitted']....but the problem is when you go to the page from another page using viewpage.php?document_id=10 for instance.
i tried using the following conditionals to make it so EITHER the form has been submitted OR the page has been accessed by being passed a GET variable but i'm having errors:
if (isset($_POST['submitted']) or isset($_GET['document_id'])) {
if (isset($_POST['submitted']) || isset($_GET['document_id'])) {
if (isset($_POST['submitted'])) or if (isset($_GET['document_id'])) {
what is the best way to have both a post and get in the same conditional?
Thanks to everyone for reading this and hopefully helping!