|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#21
|
||
|
k, if i'm understanding you correctly, you want the person to be sent to a new page, based on a hidden form field, right??
Do you want information displayed before they are redirected? |
#22
|
||
|
Ok, to avoid confusion I will post it according to the basics in my mind of how it is going to work.
What is going to happen is I am going to have a search page on my tutorial section. The search page will search our tutorial script for matches and will have a check box that you can check if you want it to search our forums too. What I need to do is either: 1. Find something in Javascript that can interpret the form before it is submitted. When the box is checked it will change the action URL to the search page for the forum. If not then it will go to our search script. 2. Make a page that will forward you to the appropriate place after the form is submitted.
__________________
|
#23
|
||
|
ok, so lets try number 2:
PHP Code:
Haven't tried it, but in theory it should work:/ note: the header() function will fail if any thing has been outputted before it was called IcI |
#24
|
||
|
Alright, I will see if I can pull all the info tonight.
__________________
|
#25
|
||
|
if that doesn't work just do a refer.php page: and go if($_POST['whatever'] == "this"){ echo'<meta refresh>';}?>
just an idea |
#26
|
||
|
The problem with the meta refresh is that it has to be in the header. So he will have to out put a header, and use an if - else statement to determine wether or not to add the meta refresh stuff to the header.
|
#27
|
||
|
Ack you guys are confusing me.
I will post the stuff and you can tell me what is the best way. I have one more class today and when it is over I will post what I have so far!
__________________
|
#28
|
||
|
lol
|
#29
|
||
|
Hey panther,
I just read this about using the extract() function: Quoted from php.net from their Warning Box "Do not use extract() on untrusted data, like user-input ($_GET, ...). If you do, for example, if you want to run old code that relies on register_globals temporarily, make sure you use one of the non-overwriting extract_type values such as EXTR_SKIP and be aware that you should extract $_SERVER, $_SESSION, $_COOKIE, $_POST and $_GET in that order." You ever run into any thing like that? IcI |
#30
|
||
|
Over my head...but you already know that.
Right now I am trying to work the different sections out. This script is going to rock...I think I will make it availible if anyone wants it....or wants to mod what I screwed up on.
__________________
|
#31
|
||
|
Yes, I actually use EXTR skip anywhere that I am extracting data that a user could possibly modify.. Like on $_POST i would use EXTR_SKIP, extract($_POST,EXTR_SKIP);
all it does it makes sure values that are already set cannot be overwritten... $table_name="tbl_name"; extract($_POST); well now if someone posts a form, and makes up there own field name of table_name, it will be over written with whatever data the user chooses.. EXTR_SKIP will disallow that to happen, because $table_name was set before the extract.. suck at explaining but that's what I get outa it..
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#32
|
||
|
Well you guys, I have the viewing and submission part done. All I have to do is make the admin panel and user thing.
What is the best thing to use in a login script? Sessions or cookies and do you know a good place that explains it since I have not been able to find one.
__________________
|
#33
|
||
|
why not use both?
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#34
|
||
|
Ok, how do I use em both? I have no idea. You know of a good site that explains them? I don't really care for php.org.
__________________
|
#35
|
||
|
i.e. like have a check box that says save logiin, set_cookie("loggedin","char",time()+3600"); ... if it isn't checked $_SESSION['loggeidn'] = $username; or whatever
|
#36
|
|||
|
Quote:
|
#37
|
||
|
Ok, what is the main differences between the two. That is something I never really got. I know how to pull the user information out of the database but I don't know how to make it so once the password matches the one in SQL to set a cookie or use the cookie for other user variables.
__________________
|
#38
|
||
|
I got a tutorial on it @ www.wghq.net/php/ in the tutorials section check it out ... all though it doesn't go into cookies much you should figure it out fast
|
#39
|
||
|
Alright, I will big yah when I get on later.
__________________
|
#40
|
||
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|