Jump to content

passing variables from one page to another without db


kimeee

Recommended Posts

Howdy

I have a form that shoots out an autorespond message. I have then set up a link in that message to a php file that will send me back a verifying message that they were indeed the one who filled out the form in the first place.

What I need to do is pass some of the variables (ie: name and email) from form.php to verify.php.

I don't think I can use _GET or _POST because I haven't set any of this up with a db. And don't think I can use SESSION cuz they will only be able to access verify.php via a link in the autorespond message. They may have closed their browser by then and that will make SESSION void.

Any help would be appreciated. Hopefully I posted this in the correct forum.

Thanks!
Link to comment
Share on other sites

I can't understand your problem, but you can use $_GET and $_POST to pass data across scripts; that's the point of using them. Inserting it to a database is just a "next level" thing.

But you don't need a db if you're just passing it. Like:

form.php
[code]<form action="verify.php" method="post">
<input type="text" name="hello">
<input type="submit">
</form>[/code]

verify.php
[code]<?php
echo $_POST['hello'];
?>[/code]

If you write "hello there", verify php will echo out "hello there".
Link to comment
Share on other sites

i'm not sure i fully understand the situation either.. Let me rephrase it a bit and you can clarify: by message do you mean email? as in, an email verification system, for a registration script?

unfortunately you are going to have to store the information somewhere, in order for it to be varified. If you cannot use a database, then you can make a flatfile. If this is a registration script (overall), where are you storing the information anyways?
Link to comment
Share on other sites

would the same apply if my form was html? (ie: form.html, submit.php (processes form data & sends autorespond message) & verify.php (activated when link in autorespond message is sent. verifies user)?

thanks!!!

[!--quoteo(post=381425:date=Jun 8 2006, 11:00 AM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Jun 8 2006, 11:00 AM) [snapback]381425[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I can't understand your problem, but you can use $_GET and $_POST to pass data across scripts; that's the point of using them. Inserting it to a database is just a "next level" thing.

But you don't need a db if you're just passing it. Like:

form.php
[code]<form action="verify.php" method="post">
<input type="text" name="hello">
<input type="submit">
</form>[/code]

verify.php
[code]<?php
echo $_POST['hello'];
?>[/code]

If you write "hello there", verify php will echo out "hello there".
[/quote]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.