Jump to content


Photo

passing variables from one page to another without db


  • Please log in to reply
4 replies to this topic

#1 kimeee

kimeee
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 08 June 2006 - 02:53 PM

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!

#2 cmgmyr

cmgmyr
  • Members
  • PipPipPip
  • Advanced Member
  • 1,278 posts
  • LocationUSA

Posted 08 June 2006 - 02:58 PM

You can use _POST without having a db set up.

Can you include any code?

#3 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 08 June 2006 - 03:00 PM

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
<form action="verify.php" method="post">
<input type="text" name="hello">
<input type="submit">
</form>

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

If you write "hello there", verify php will echo out "hello there".
~ D Kuang

#4 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 08 June 2006 - 03:04 PM

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?
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#5 kimeee

kimeee
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 08 June 2006 - 07:57 PM

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) View Post[/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
<form action="verify.php" method="post">
<input type="text" name="hello">
<input type="submit">
</form>

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

If you write "hello there", verify php will echo out "hello there".
[/quote]





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users