[SOLVED] In need of a lot of help

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
jdizzle
Forum Newbie
Posts: 5
Joined: Fri Jun 18, 2004 12:06 am

In need of a lot of help

Post by jdizzle »

My server recently changed it's security settings (register_globals is now off and I don't know what else it changed).

Basically, my main problem is that I use a form to make news posts on my site (I didn't code it). It doesn't use MySql whatsoever. Basically, the form has a dropdown list and three text boxes. The dropdown list is for selecting the user that is making the post. The text boxes are for the password, title of the news post and the news post itself. I would then click on the submit button.

What it would do is basically refresh the page while remembering the password, title and news post. The code would verify the password and then create a news file in PHP using fopen and fwrite.

Due to the new security problems, the variables are not remembered after I click the submit button. Basically, clicking that button has become the same as clicking the refresh button. As a result, my news posts aren't made.

Is there a way I can get past these security problems so that the variables continue to get passed on?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

your variables are stored in either $_POST or $_GET for post and get methods respectively, alternately you can use $_REQUEST, which will take from both as well as $_COOKIE..
jdizzle
Forum Newbie
Posts: 5
Joined: Fri Jun 18, 2004 12:06 am

Post by jdizzle »

The variables that I need passed on are called.

$password
$postTitle
$postText
$poster (that's from the dropdown menu).

Do I basically put:

$password = $_GET['password'];
$postTitle = $_GET['postTitle'];
$postText = $_GET['postText'];
$poster = $_GET['poster'];

?

EDIT - I tried it and $_GET doesn't work. Which kinds of functions do I use for which variables? $password is in a password textbox (obviously).
jdizzle
Forum Newbie
Posts: 5
Joined: Fri Jun 18, 2004 12:06 am

Post by jdizzle »

I got it work with request! I love you guys!
Post Reply