View Full Version : Hard to say in one line !!
07-07-2007, 06:59 PM
Good day to you all,
I'm in a situation where I have 12 pages (month page)
where the user can add to the page on demand.
This is very simple, no problem to do, but I need more then that.
There is 3 way of adding to the file, 3 different template.
- with image
- Without image
- With a country flag, as image
Each template is in 2 step :
My problem is that depending on which month the user wants to add to, the "action-page.php" should add to this one.
I mean the fopen within the "action-page.php" should have the month page to open and add to.
Can someone please point me or help me with this !
If you need more info or see my code let me know !
07-07-2007, 10:59 PM
Your form will be something like this:
<form action="action-page.php" method="post">
<input type="submit" name="submit" value="submit">
Your PHP script will start out like this :
// read the month value from the form
//now that you have the month, you can build a
//variable to define the directory or file.
//you didn't specify how you are naming your files,
//buy I assume the month is part of the filename:
//open it and do what you want with it.
Other than that ... not enough information to provide anything else.
07-07-2007, 11:09 PM
I need to pass the value posted on a 3rd page, that's my problem.
My files are named by months yes, but they are numbered, which is not a problem here.
But that code would work if it would a been posted on a 3rd page where I can save it, cause my editor is another file I have another file that save to file.
You just need to ask what you want to know, you never loose to ask...
07-08-2007, 04:11 AM
If you're entering the 3rd page from a form,
use a hidden value on the form that you then
read on the 3rd page.
You can pass a variable from a form, or from a URL.
You can read the variable with:
It all depends on how you are transferring it ...
We don't know how you are getting from page 2 to page 3.
"You just need to know what you're asking for, you lose by not asking ..."
07-08-2007, 04:44 AM
yes from a form.
07-08-2007, 09:33 PM
On the 2nd page, use <input type="hidden" name="var1" ... > and populate
that form with the variables you need to pass onto the 3rd page.
On the 3rd page, grab those hidden variables along with the other ones.
(or whatever you call your hidden variables).
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.