misslilbit02 Posted September 24, 2007 Share Posted September 24, 2007 This is the problem...I give out this link that passes information along the browser it's something like this http://domainname.com?counselor=counselorname&email=counseloremail In order to get the information of course I use $_GET The problem I keep having with this is that sometimes the information is sent and nothing is ever received. Some days this solution works great and other days this solution is a nightmare. Could someone please tell why is that the information sent is not being received? Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/ Share on other sites More sharing options...
frost Posted September 24, 2007 Share Posted September 24, 2007 can you post the actuall code you are using? Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354176 Share on other sites More sharing options...
freakstyle Posted September 24, 2007 Share Posted September 24, 2007 Hi there, here's some questions for you: is the data going to that page only via a url with the vars? are you validating that the vars contain data before your page does anything with them? are you trying to post data to this page? posting your code in question is the best way to have more pointed help. good luck Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354180 Share on other sites More sharing options...
misslilbit02 Posted September 24, 2007 Author Share Posted September 24, 2007 <?php $to = $_GET['email']; $subject="Demographics Form"; $from =$_GET['email']; $counselor=$_GET['counselor']; $body="Hello $counselor, The user reponses are as follows: Race/National Origin: $_POST[Race1] $_POST[Consideration_upon_disability] I wish to request special consideration based upon disability Explanation: $_POST[Disability_explanation] US Verteran: $_POST[uS_Military]"; mail($to, $subject, $body, "From: $from"); header(" "); ?> Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354227 Share on other sites More sharing options...
misslilbit02 Posted September 24, 2007 Author Share Posted September 24, 2007 This is also on a Windows IIS server. That might have something to do with it who knows. I was also thinking maybe it the specs on the users computers I don't know but it's just weird how sometimes this work and sometimes it doesn't. There are some cases where I have the email emailed to the counselor and myself and it will come to me with none of the information pulled from the broswer it won't have the counselor's name or email address and since that information isn't grabbed it never gets to the counselor. Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354231 Share on other sites More sharing options...
cooldude832 Posted September 24, 2007 Share Posted September 24, 2007 Your passing a lot of data with GET you shouldn't, Read up on Get vs Post and you'll realize that Get by design is not for this. Today about the out usefulness of Get is Search engines because otherwise post is 100x better, safer and easier to program Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354232 Share on other sites More sharing options...
BlueSkyIS Posted September 24, 2007 Share Posted September 24, 2007 You're also using both POST and GET variables in your code. Not good. Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354233 Share on other sites More sharing options...
cooldude832 Posted September 24, 2007 Share Posted September 24, 2007 You're also using both POST and GET variables in your code. Not good. That isn't considered "bad" you can use them together a lot of times, just you have to know what each is for. Get = repeatable results such as a search query, or a article view like me.com?article=5 where you want 1 page as a viewer. Post = data, lots of data, and data that doesn't need to or shouldn't be repeated Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354235 Share on other sites More sharing options...
misslilbit02 Posted September 24, 2007 Author Share Posted September 24, 2007 ok well this is the issue with that I have let's say 50 admission counselors who have three forms that has to come to them. The issue is that most of the students don't know who their counselor is so we pass the counselor's email and name across the browser so that they can get the information in the forms. What would be a better way of handling this being that 99% of the time the student does not know who their counselor is. Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354237 Share on other sites More sharing options...
BlueSkyIS Posted September 24, 2007 Share Posted September 24, 2007 i understand what you're saying and i agree. by "bad", i meant that my expectation was that the developer would use a single method (get or post) all the time. thus some values would be set while others weren't when the developer expected all to be set. Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354239 Share on other sites More sharing options...
BlueSkyIS Posted September 24, 2007 Share Posted September 24, 2007 ok well this is the issue with that I have let's say 50 admission counselors who have three forms that has to come to them. The issue is that most of the students don't know who their counselor is so we pass the counselor's email and name across the browser so that they can get the information in the forms. What would be a better way of handling this being that 99% of the time the student does not know who their counselor is. I'd consider using hidden form variables with POST. Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354241 Share on other sites More sharing options...
misslilbit02 Posted September 24, 2007 Author Share Posted September 24, 2007 I'm only passing two variables email and counselor name how is that too much being sent across the browser I've seen a whole lot mre being sent across a browser. Secondly, if I send this hidden value I would still have to send things across the browser because there is a mini site with about 4 links that lead to each form and some how it has to be stated which counselor this information is for how do you advise I do that. Like I said before each counselor has a link with their information in it. Now what do I have pass a number in the browser, hide email addresses in code, and pass them along via post. Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354249 Share on other sites More sharing options...
cooldude832 Posted September 24, 2007 Share Posted September 24, 2007 your passing private info (names, emails with get) t hat is the problem Quote Link to comment https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354259 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.