|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
||||
|
||||
|
Post
Having a bit of a problem.
I have a form that my users fill out then it's e-mail back to me. Works fine in HTML, but not in WML. I'm using a form2mail php script that I found somewhere. It works great unless it's a WML form. In the mail generating script, this evaluates to false so the script doesn't run. PHP Code:
It's true when using HTML, but false when using WML. I honestly haven't messed around w/ $_SERVER so I'm not quite sure what the if statement is checking for. If it matters, everything is being run off of a sub domain. wap.pudlz.com $_SERVER["SERVER_NAME"] contains the value "wap.pudlz.com" while $_SERVER["HTTP_REFERER"] contains no value and I'm not sure why there's nothing there, obviously it must have something when working in HTML. Does WML not support this? Is there a way to force this? Any help would be most appreciative. |
|
#2
|
||||
|
||||
|
The script is checking to see if the host name is in the referer value. I haven't had a particular problem with this in the past. The first thing that sprung to mind was Registered Globals. One my host, registered globals is on. I have to switch it off. Now, since you have got a sub-domain, perhaps your RG settings has something to do with that. Does $_SERVER["SERVER_NAME"] really have a value?
To override this, though this kind of disbables the security precaution taken by the script, you could force the "$_SERVER["HTTP_REFERER"] " value yourself in the processing page. Then I thought of $_SERVER["HTTP_REFERER"] itself. It is not really a great solution to this, as, as you have found out, it can be switched off, or disabled by some devices or blocked by internal firewalls for example. I would perhaps recommend doctoring the script to elemintate the referer element and think of another security precaution instead. There are plenty of posts in the PHP forums about the use of $_SERVER["HTTP_REFERER"]. Quote:
__________________
Cheers, Jamie # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure # Any form of employment is strictly prohibited ...... __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. __________________ |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > Post |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|