473,654 Members | 3,239 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 3074
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
11869
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 the top of my script I assign a few variables to incoming GET and POST values. $login = clean($_POST, 30); $passwd = clean($_POST, 30);
4
2672
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 A() { $this->value = 1; }
25
2485
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 request www. my_site .com/chair.htm everything would be normal.
9
9707
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
4354
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 solution ? Thanks
2
2576
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
2381
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 what try each successive one in turn as we can alternate between the two. But it doesn't seem to be working.
10
2367
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 field is set to something. Please let me know how to use isset() correctly. Thanks ahead.
5
6560
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 this a configuration issue. Please help i tried just about anything. Here is my code below. <?php if(isset($_POST)){ //$date_value=$_POST; echo 'Month is:lala'; } ?> <form method=post name=f1 action="<?php echo $_SERVER?>"> <table border="0"...
0
8379
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8494
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8596
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
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 we have to send another system
1
1924
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.