Script into a function in the same script

Hey guys, i have two variables, one from a form the user enters in and one that already exists in the script.

I need to get both of these into a function in the same script or to another page, any reccomendations?

DocStly: $_SESSION
Chambrln, how do i load variables from a form into session?
I'm having a lot of trouble with that on post you set them
the form posts to your script
and the session will stay in the whole time throughout the scripts?
you check to see if the post is set then $_SESSION['formfield'] = $_POST['formfield'];
until you unset it or kill the session or they close their browser or or or.
well do you know how to load a variable from a form into the current page?
because if i could do that it would be much easier
you can't load them until you actually post the form
once you post though you can post to the same page
ehhehe
Well i want it in the same script im ean
yea you can do that
i want to be able to get it from the form and then 10 lines down use it in a function

and then how do i retrieve the variable?
syc, I have it redirecting back to the form.php page if data is good, but if they user clicks back the browser asks to resend post data
like lets say theres an
how would i retrieve the name as a variable
session_start(); if (isset($_POST['formfield'])) { $_SESSION['fieldname'] = $_POST['fieldname']; }
replace fieldname with name
that goes at the top of your page before the form
how can I make it so that when someone clicks a button, a script starts executing, but they don't have to wait for it to finish running
then when they submit the page upon refresh the php sees the form field and saves it
:-\ but if it has to refresh it might as well go to a different page
DocStly: then use ajax
well i dont care if the user sees it reload
i'm just wanting it all on one page but there doesn't seem to be any support for that between html and php
anyone know of a webhost that supports cron jobs and also subdomains? i.e. subdomain.mysite.com ? (to be created on the fly)
ajax is too complicated
javascript is hellish
is there a way to popup a window if a variable is set to true?
Use and if then a js

 Web Hosting | Hosting

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Leave a Comment

You must be logged in to post a comment.


Blog Tags:

Similar posts: