Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/70506-_get-issues/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354180
Share on other sites

<?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(" ");
   
?>

Link to comment
https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354227
Share on other sites

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.

 

Link to comment
https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354231
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354235
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354237
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354241
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/70506-_get-issues/#findComment-354249
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.