473,503 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

isset not working

21 New Member
Undefined Index: I have used this but the user still gets a page of notices, (about 70 in total) can someone help me with the coding here that will somehow check the empty string and still send it without the browser displaying a page of notices.
I am at a serious loss this end and I can't learn this is mins what has taken some people years to understand.
I have 2 problems with my script in PHP as I have tried to piece together bits.
all i want it to do is take the field data and send it to an email and send a reply to the field that has the users email in it and display a page that says thank-you when they hit submit.
I am so desperate this end as I'm so new to php and this was needed hours ago.
Or have I to pay a developer to get this done?
please help, I know people have read my posts but i'm not good enough to understand all this yet.
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $to = ( isset ($_REQUEST['sendto']) ? $_REQUEST['sendto'] : "default 'to' email goes here" ); 
  3. $from = ( isset ($_REQUEST['Email']) ? $_REQUEST['sendto'] : "default 'from' email goes here" ) ; 
  4. $name = ( isset ($_REQUEST['Member_Name']) ? $_REQUEST['Member_Name'] : "Default member name goes here" ) ; 
  5. $headers = "From: $from"; 
  6. $subject = "Members Data From RedSquareFinance.com";
If someone who read my previous posts is working on my problem thank-you.
Dec 3 '08 #1
1 3069
dlite922
1,584 Recognized Expert Top Contributor
@stealthmode666
I can see you've attempted some code and are trying to understand. I can code this with you.

From what I see, you almost have the email variables complete. What you need to do is change the phrases like "default 'to' email goes here" , etc. to your own default value. If you don't have a default email value, just put "" (two double or single quotes with nothing in between) this means its an empty string.

What you need to do now is use the mail function to send the email. The mail function can be found at php.net/mail

Note, PHP must be configured with a mail server. That is the php.ini must know what to do with the mail command. Best thing for you to do is just execute a mail command like this at the top of your php page:

Expand|Select|Wrap|Line Numbers
  1. $result = mail("youremail@example.com","Testing Mail","Test Message","From: serveremail@example.com"); 
  2.  
  3. die("the result of the mail test is: " . var_dump($result)); 
  4.  
  5.  
That code will halt with that die statement and let you know if the mail worked, or it didn't. Make sure you replace the email with your actual email address. Please try that and post back the result and any errors (make sure error reporting and display errors are set).




Dan
Dec 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
11858
by: Dan | last post by:
I was trying to troubleshoot a login page that doesn't work - it keeps saying the login/password is missing - when my tracing discovered this peculiar behavior. register_globals is off, so at...
4
2664
by: Marcin Dobrucki | last post by:
I've been having some problems with a parse error that I can't figure out (PHP 4.3.11 on Solaris9). Sample code: <?php // getting strange parse errors on this class A { var $value; function...
25
2466
by: wd | last post by:
I want my server to send a 404 header if a URL with a query string is requested. So if a browser or spider requests something like www. my_site .com?p=chair they would get a 404... But if they...
9
9679
by: wouter | last post by:
hey hi..... I wanna make a switch wich does this: if pagid is set do A, if catid is set do B, if projectid is set do C, else do D. So i was thinking something like this:
3
4344
by: oggy | last post by:
Hello I try to answer this question for the Zend Certification PHP 5 : "What is the difference between isset() and other is_*() functions (is_alpha(), is_number(), etc.)?" Do you have a...
2
2563
by: yawnmoth | last post by:
<?php $var = 'test'; echo isset($var) ? 'true' : 'false'; echo '<br>'; echo isset($var) ? 'true' : 'false'; ?> Why does that result in this output?:
8
2368
by: Simon Dean | last post by:
Im taking Im doing something stupid here? I thought it was clever... just learned a little more about isset. $a = (isset($_GET)) ? $_GET : (isset($_POST)) ? $_POST : ""; I guess you can see...
10
2351
by: major | last post by:
The following code processes a blank field as though it has some value and proceeds as though it was set to some value. Apparently isset() is not working, because it thinks that a blank text...
5
6543
by: jjeanj1 | last post by:
hi i have this script that i am writing that runs perfectly on a linux server but it will not run on windows at work. I am not sure why. It seems like i(isset(post) does not work on the server. Is...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7074
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.