PHP Mail with session variables

Here is the code for an email to collect page, which sends two session variables (email and postal code) to an email_sub.php page (data are inserted in MySQL). After submitting the form, I get the email_sub.php? page where this code works normally

<? PHP echo $_SESSION ['email'];? >

<? PHP echo $_SESSION ['postal code'];? >

However, when the email is sent, the "subject" and the "To" is successfully sent, but not the variables $email and $zipcode.

From:
Zip code:

If I hard code for values of and Zip, they appear in the email. It seems therefore that session variables are not available at the email_sub.php page.

If anyone can point me in the right direction for a fix, I'd be very happy to suggestions.

email_collect.php

<? php require_once('Connections/connMan.php');? >
<? PHP
session_start();
function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (! get_magic_quotes_gpc())? addslashes ($TheValue): $theValue;

Switch ($theType) {}
case 'text ':
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "long":
case "int":
$theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';
break;
case "double":
$theValue = ($theValue! = "")? « " ». doubleVal ($TheValue). "" "": "NULL";
break;
case "date":
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "set":
$theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
break;
}
Return $theValue;
}

$editFormAction = $_SERVER ['PHP_SELF'];
If (isset {}
$editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);
}

If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "form1")) {}
$email = $HTTP_POST_VARS ['email'];
session_register ("email");
$zipcode = $HTTP_POST_VARS ["zipcode"];
session_register ("zipcode");
$insertSQL = sprintf ("INSERT INTO email_list (e-mail, postal code) VALUES (%s, %s)," ")
GetSQLValueString ($_POST ['email'], "text").
GetSQLValueString ($_POST ['PostalCode'], "int"));

@mysql_select_db ($database_connMan, $connMan);
$Result1 = mysql_query ($insertSQL, $connMan) or die (mysql_error ());

$insertGoTo = "email_sub.php";
If (isset {}
$insertGoTo. = (strpos ($insertGoTo, '?'))? « & » : « ? » ;
$insertGoTo. = $_SERVER ['QUERY_STRING'];
}
header (sprintf ("location: %s", $insertGoTo));
}

@mysql_select_db ($database_connMan, $connMan);
$query_rsEmailer = "SELECT * from email_list";
$rsEmailer = mysql_query ($query_rsEmailer, $connMan) or die (mysql_error ());
$row_rsEmailer = mysql_fetch_assoc ($rsEmailer);
$totalRows_rsEmailer = mysql_num_rows ($rsEmailer);
? >
< ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""
< html >
< head >
< title > em touch all the Camps of Baseball < /title >
< meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 ">"
< link href = "assets/taylor.css" rel = "stylesheet" type = "text/css" > "
< script type = "text/JavaScript" >
<!--
function MM_findObj (n, d) {//v4.01
var p, i, x;  if(!d) d = document; If ((p = n.IndexOf ("?")) > 0 & & parent.frames.length) {}
d = parent.frames [n.Substring(p+1)] .document; n = n.Substring (0, p) ;}
If (!) () x = d [n]) & & copyrights) x = d.all [n]; for (i = 0;! x & & i < d.forms.length; i ++) x = d.forms [i] [n];
for (i = 0;! x & & d.layers & & I < d.layers.length; i ++) x = MM_findObj (n, d.layers [i] .document);
If (! x & & d.getElementById) x = d.getElementById (n); Return x;
}

function MM_validateForm() {//v4.0
var i, p, q, n, test, num, min, max, errors = ", args = MM_validateForm.arguments;
for (i = 0; I <(args.length-2); I += 3) {test = args [i + 2]; val = MM_findObj(args[i]);
If (val) {n = val.name; if ((val=val.value)! = "") {}}
If (test.indexOf ('isEmail')! =-1) {p = val.indexOf (' @');}
If (p < 1 | p ==(val.length-1)) errors +='-' + nm + "must contain an e-mail address. \n » ;
} Else if (test! = 'R') {num = parseFloat (val);
If (isNaN (val)) errors +='-' + nm + 'must contain a number. \n » ;
If (test.indexOf ('inRange')! = - 1) {p = test.indexOf (': ');}
min = test. Substring(8,p); Max = test. Substring (p + 1);
If (num < min | max < num) errors +='-' + nm + must contain a number between "+ min +" and "+ max +".. " \n " ;
}} ElseIf (test.charAt (0) == 'R') errors += '-' + nm + ' is required. \n " ; }
} If (errors) alert ("the following error occurred: \n'+errors");
document. MM_returnValue = (error == ");
}
->
< /script >
< / head >

< body >
< are method = "post" name = "form1" action = "<?" PHP echo $editFormAction;? > ">"
< table width = "325" align = "center" >
< tr valign = 'of basic">
< td colspan = "2" align = "left" >
< h1 class = "subtitle" > join our Email list < / h1 >
< p > please fill in boxes and click on & quot; Send. & quot; This information is kept secret and is intended for the exclusive touch of < strong > Hank Manning em all Camps of Baseball < facilities > in order to send you the latest happenings on our calendar.
< /p >

< p > < / p >
< table >
< /tr >
< tr valign = 'of basic">
< td align = "right" valign = "middle" nowrap > < p > E-mail: < /p > < table >
< td align = "left" valign = "middle" > < input name = "email" type = "text" onBlur = "MM_validateForm ('email',", 'RisEmail'); " return document. MM_returnValue"size ="32"value ="Email address"> < table >
< /tr >
< tr valign = 'of basic">
< td align = "right" valign = "middle" nowrap > < p > code postal: < /p > < table >
< td align = "left" valign = "middle" > < input name = "PostalCode" type = "text" onBlur = "MM_validateForm ('postcode',", 'RisNum'); " return document. MM_returnValue' size = '32' value = 'postal Code' > < table >
< /tr >
< tr valign = 'of basic">
< td align = "right" > < input type = "reset" name = "Reset2" value = "Reset" > < br >
< input type = "submit" value = "send" > < table > ' "
< td > < table >
< /tr >
< /table >
< input type = "hidden" name = "MM_insert" value = "form1" >
< / make >
< p > < / p >
< / body >
< / html >
<? PHP
mysql_free_result() will free all memory associated with the result identifier result.

mysql_free_result() only needs to be called if you are concerned about how much memory is used for queries that return large result sets. All associated result memory is automatically freed when the script is completed.
mysql_free_result ($rsEmailer);
? >

email_sub.php

<? PHP session_start(); It connects to the existing session

email sent

/ / [email protected] , [email protected]
mail (' [email protected], [email protected]', "Join Email List", "from: $email\r\n Zip: $zipcode");
? >
< ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""
< html >
< head >
< title > em touch all the Camps of Baseball < /title >
< meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 ">"
< link href = "assets/taylor.css" rel = "stylesheet" type = "text/css" > "
< / head >

< body >


< table width = "280" border = "0" cellspacing = "0" cellpadding = "0" >
< b >
< td colspan = "2" > < img src = "images/manning_logo.jpg" width = "426" height = "64" > < table > "
< /tr >
< tr valign = "top" >
< td colspan = "2" > < p > < / p >
< p align = "left" > thank you very much for sending your email and zip code. < /p >
< table width = "350" border = "0" cellspacing = "0" cellpadding = "0" >
< b >
< td width = "69" > < p align = "right" > email: < /p > < table >
< td width = "281" > < p align = "left" > <? PHP echo $_SESSION ['email'];? > < / p > < table >
< /tr >
< b >
< td > < p align = 'right' > postal code: < /p > < table >
< td > < p align = "left" > <? PHP echo $_SESSION ['postal code'];? > < / p > < table >
< /tr >
< / table > < p align = "left" > This information will be stored in our database exclusive use < facilities > < strong > Hank Manning em all the Baseball Camps Touch, which respects and protects your privacy. < /p >
< table >
< /tr >
< b >
< td width = "407" align = "left" > < a href = "javascript:window.close();" "> close this window < /a > < table >
< td width = "19" > < p > < / p > < table >
< /tr >
< /table >
< p > < / p >
< p > < / p >
<? PHP
end the session so that I could see new variables because they are passed in the development
session_destroy();? >
< / body >
< / html >

sbudlong wrote:

I made the change you suggested but the showsFrom:Zip still E-mail: without values for the variables. Is there a problem with the session?

It seems that you do not use session variables when you send the mail:

mail('[email protected], [email protected]',
'Join Email List',
"From: $email\r\n Zip: $zipcode");

Change to this:

mail('[email protected], [email protected]',
'Join Email List',
'From: ' . $_SESSION['email'] . "\r\n Zip: " .
$_SESSION['zipcode']);

Tags: Dreamweaver

Similar Questions

  • Creating a connection with Session variables

    Hey everybody! I've never used session variables so I'm not sure how they work, so I have a simple question for their use with a login form!

    I created a small form of login in the top right of my Web page, and what I want to do is when the user connects, the newspaper in the form of skins and is replaced by 'Welcome (username)' and stays that way while browsing the Web site. I think it's simple to do, ive just never used before

    Here is my login information for the code: (note this div tag is inside a table, do not know if it matters)

    <div id="login">
          <form ACTION="<?php echo $loginFormAction; ?>" id="form1" name="form1" method="POST">
            <label for="U_name"></label>
            Username
            <input name="U_name" type="text" id="U_name"/>
            <label for="U_Pass"></label>
            Password
            <input name="U_Pass" type="password" id="U_Pass"/>
            <input type="submit" name="login" id="login2" value="Login" class="loginb"/>
            <a href="register.php">        Register
            </a>
          </form>
        </div>
    

    Try this-

          if (!isset($_SESSION['MM_Username'])) { ?>

        


         

           
            Username
           
           
            Password
           
           
                    Register
           

         

       

    Welcome

  • Is connection with session variables secure?

    I use email as a primary key and reproducing $MM_Username when connecting with the authentication of the user.

    I of course also "password and $MM_UserGroup.»

    Is this system secure against piracy?

    I know he does not appear in the address bar, but it is possible to modify session variables using the code in the address bar or in any other way?

    I have configured groups of users for new records that only allows the account own display (page restrictions) and I don't want someone else under the law computer and freedoms (unless otherwise stated) in order to access the other folders.

    Thank you

    "RichardODreamweaver" wrote in message
    News:eutk47$GQA$1@forums. Macromedia.com...
    > Thanks for this Lionstone - I feel much happier.
    >
    > The validation code is in the page index with page restrictions on
    > everything
    > another connection failed.
    >
    > A concern is your point over https. I use a php on http site and
    > don't
    > don't know if it is possible to convert it to https
    >
    > I can only now count on our hosting provider!
    >

    The script on the server side you use has no effect on this.
    Your host likely provides HTTPS with a common certificate for annual fee.
    Do it some, some do not. most do these days, but you'll have to ask them. ;)

  • Level security line with session variables, not recommended?

    Hello

    We are on the point of implement security level line in our project of BI using OBIEE, and the solution that we found more convenient to our requirement was to use session with blocks of initialization variables.

    The problem is that this method is listed as "not recommended" in the Oracle documentation.

    Administration of alternative security options - 11g Release 1 (11.1.1)

    (This appendix describes alternative security administration options included for backward compatibility with improved systems and are not considered a best practice.)

    The Session Variables management

    Session system variables get their values of initialization blocks and are used to authenticate Oracle Business Intelligence users against external sources such as LDAP servers or database tables. Each active session of BI server generates session variables and initializes them. Each instance of session variable can be initialized to a different value. For more information on the use of variables and blocks of Oracle Business Intelligence session initialization, see 'Use of Variables in Oracle's BI repository' in Oracle Fusion Middleware metadata repository Builder of Guide for Oracle Business Intelligence Enterprise Edition.

    How confused... What is the best practice then?

    Thank you for your help.

    Joao Moreira

    authentication / authorizing the part is dealing with weblogic and then initialized the variable USER and you can use it for any initblocks for safety.

    Block of init to authenticate / variable session and authorization are different, I guess that you mix the two.

  • Problem with Session variables

    On page 1, I'll put a session based on a user variable to connect:

    < cfif NOT IsDefined "(SESSION. EmpNo") >
    < cfset SESSION. EmpNo = #Form.HREmpNo # >
    < / cfif >

    On page 2, I call the session variable in a query to a form in advance, it works fine:

    < cfquery name = "qEmpInfo" datasource = "SelfNom" >
    SELECT *.
    OF tblEmployeeList
    WHERE EmployeeNo = #session. EmpNo #.
    < / cfquery >

    On the same page, I give the pre-populated information hidden tags, so I can enter information in a table on the next page. qEmpInfo is the request that I'm hitting successfully with my session variable. Here are my tags:

    #qEmpInfo.EmployeeNo # < cfoutput > < / cfoutput >
    < input type = "hidden" name = "EmployeeNo" value = "" #qEmpInfo.EmployeeNo # "/ >"

    On the 3rd page, where I'm trying to insert information in another table, I am getting an error. Itacts as my session variable is over.

    Error:
    Syntax error in date in a query expression ' #qEmpInfo.EmployeeNo # '.

    I entered this code in page 3 to check and she in the past that I guess because it does not find the session variable:

    < cfif NOT IsDefined "(SESSION. EmpNo") >
    < cfoutput > #session. EmployeeNo # < / cfoutput >
    < / cfif >

    I put my session expires in the admin for 24 hours, so it's not the question. And I turned on the session variables in the Application.cfm:

    < name cfapplication = "SelfNom".
    sessionmanagement = "Yes" >



    Someone sees something I am doing wrong?

    Jatrix wrote:
    > Does someone sees something I am doing wrong?

    Well, the first thing I noticed is this:

    #session. EmployeeNo #.

    'session.empNo' AND ' session. EmployeeNo' are not the same variable. You
    Verify the existence for the first and then try to get out of the second.
    You create a variable named "employeeNo" in your form. It is that the
    the one you want to use here? "form.employeeNo" not "session.employeeNo".

  • Problem with session variable purging

    Hello

    I've set up in my solution OBIEE RLS filters, in accordance with article http://www.rittmanmead.com/2012/03/OBIEE-11g-security-week-row-level-security/
    All that " works very well, but I have a " "" small "problem (explained in short 'story'):

    ' 1. Suppose that user Walter White has affected Reg1 and Reg2 in " ""STAFF_REGIONS" table.

    2 after scoring in the responses the variable "NQ_SESSION." "REGION" is initialized with the values " ""Reg1 & Reg2"

    3 now I am adding Reg3 to the table ""STAFF_REGIONS " of Walter White."

    4 Walter White is logging in the responses and retains data only from Reg1 and Reg2 - why? Because variable NQ_SESSION. REGION still has the old values.

    So, here is my question: How can I reset it variable? Reconnection to the answers doesn't help. The only solution I know not is to restart CoreApplication, but this is not an acceptable solution.

    Uncheck the box for hidden in InitBlock variable

    If brand aid

    ~ http://cool-bi.com

  • return Recordset from several tables with session variables

    First of all, let me start by appolgizing for the rawness of this question, but I'm really stuck...  I have two tables in a database, a table name, username, password and company (user logs on to a secure site using the UN and PW creating a session MM_username variable).  There are several users from different companies (IE 6 users of XYZ Corp., 20 ABC... etc.).  The second table has data that is specific to each company.  How to display the data in the second table so that it is specific to the user (ie: Robert of XYZ Corp. sees only specific data of XYZ Corp.)?

    Thank you very much

    What you would do, is to join the tables on the company name field in a query:

    SELECT * FROM tbl_name LEFT JOIN tbl1.company_name ON tbl2.company_name WHERE username = MM_username;

    If you need a more details or help database tables themselves you'll need post a few details anymore, but that's the gist of it.

    And just to add, is that if you try to add in the session.  Otherwise take your session for the company_name variable in table 1 and use it in a select query based on your session pages.

  • Session variables change at each request

    Hello

    We have a problem with session variables (jsessionid), is to change a page to another page, and also when we page.code to referesh worked well on other servers. When we moved to problem of production server came.

    In application.cfc, we used the settings below.

    this.applicationTimeout = CreateTimeSpan (4, 0, 0, 0);

    This.clientmanagement = false;

    This.loginstorage = "session";

    This.sessionmanagement = true;

    This.SessionTimeout = CreateTimeSpan (0, 0, 20, 0);

    this.setClientCookies = true;

    this.setDomainCookies = true;

    this.scriptProtect = 'all ';

    In the coldfusion administrator allowed us to use"J2EE session variables", 'application variables',the session variables.and we also added "

    "Dcoldfusion. sessioncookie. HttpOnly= true "in the Java virtual machine.

    Details of the operating system: windowsserver2008R2

    Coldfusionserver: 9.0.1,274733

    Is it related to sessionfixation question? All other things we need to verify or add? Please let me know.

    Thank you

    We have solved the problem, in the jrun.xml configuration file there is the "cookie-config" section that we have removed:


    true
    true

  • being lost ColdFusion session variables

    Okay, so when my users login I create session variables. one of them is the employee id. in my Application.cfc I have this at the top:

    < cfscript >
    myIdName = "My App";
    This.SessionTimeout = CreateTimeSpan ("0", "0", "45", "0");
    This. SESSIONMANAGEMENT = "YES";
    This. SetClientCookies = "true";
    this.setDomainCookies = "true";
    < / cfscript >

    I also put the timeout for sessions at 45 in the CFadmin too.

    After a successful login, I capture their session.employeenumber by is authenticating through our enterprise LDAP. no problem. Note: this app has run smoothly for 6 years now but recently something has gone wrong.

    on every page I reference a file in my application directory called "check_session.cfm" like this:

    "< cfmodule template="/myApp/Tags/check_session.cfm ">

    In this file, I have the code that verifies the existence of the session.employee_number. If there is no they expired or book marked a page in the application in which they need to be logged in to view:

    < cflock timeout = "30" throwontimeout = "Yes" type is 'READONLY' scope is "SESSION" >
    <! - checks to ensure that the user has a session - >
    < CFIF NOT IsDefined ("Session.employee_number") >
    "< CFLOCATION URL ="http://#cgi.HTTP_HOST#/myApp/LoginAgain.cfm">."
    < / CFIF >
    < / cflock >

    time to time (I would say on average 5 times a week) I get a message to a user error (I redirect errors to my email with information on the diagnosis). the error reads "EMPLOYEE_NUMBER element is not defined in the SESSION". when I look at the page the error came I see my call to the file check_session.cfm about 50 lines above where this error occurred when I tried to reference session.employee_number. Why wouldn't he not find it and redirect the user to the page timeout? I can't reproduce this error on my machine... I always get the good result without the error message. It's a random, sporadic, intermittent error.

    A long time ago (but in this Galaxy) we found isDefined() can give false positives with session variables, exactly the way you describe.  Or indeed something as simple as this could mistake with "session.foo does not exist" on line 2 (ie: the line inside the if() function.)

    If (isDefined ("session.foo")) {}

    something = session.foo.

    }

    And the session variable absolutely did NOT exist (or a similar variable was in none of the controls isDefined() extended, for example: variables.session.foo).  If the error was right... but the isDefined() call did not work.

    The problem was occasional, so hard to follow.

    We changed the calls to structKeyExists() and the problem disappeared.

    It was in CFMX7 well, and we had not never really much time investigating her in addition, after that we have treated the symptom.  However, I have been conscious of others with similar experiences.

    However we have stopped using isDefined() right there (for all) and has never ever had similar problems.

    Maybe try it.

    --

    Adam

  • Help with the session variable PHP CS5.5 - Please

    Hi all

    I am needing a little help with the help of a session variable, and I hope someone can point me in the right direction.

    I created a PHP page that uses the Dreamweaver 'User authentication' feature and the basics of this works very well, to direct a user to the correct page depending on whether they are or are not a valid user. I want to customize the page 'user valid' with people, user name entered in the authentication of the user table... a seemingly simple task using a session variable, but I just seem not to be able to make it work!

    The generated code for the AU on page 1 is the following:

    <? PHP

    Validate request to connect to this site.

    If (! isset {})

    session_start();

    }

    $loginFormAction = $_SERVER ['PHP_SELF'];

    If (isset($_GET['accesscheck'])) {}

    $_SESSION ['PrevUrl'] = $_GET ['accesscheck"];

    }

    If (isset($_POST['txtfirst_name'])) {}

    $loginUsername = $_POST ['txtfirst_name'];

    $password = $_POST ['txtsurname'];

    $MM_fldUserAuthorization = "";

    $MM_redirectLoginSuccess = "member_update.php";

    $MM_redirectLoginFailed = 'login.php ';

    $MM_redirecttoReferrer = false;

    @mysql_select_db ($database_panto, $panto);

    $LoginRS__query = sprintf ("SELECT firstname, name OF web_access WHERE firstname = %s AND family name = %s",

    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "text"));

    $LoginRS = mysql_query ($LoginRS__query, $panto) or die (mysql_error ());

    $loginFoundUser = mysql_num_rows ($LoginRS);

    If {($loginFoundUser)

    $loginStrGroup = "";

    If (via PHP_VERSION > = 5.1) {session_regenerate_id (true) ;} else {session_regenerate_id() ;}

    Declare two session variables and assign them

    $_SESSION ['MM_Username'] = $loginUsername;

    $_SESSION ["MM_UserGroup"] = $loginStrGroup;

    If (isset($_SESSION['PrevUrl']) & & false) {}

    $MM_redirectLoginSuccess = $_SESSION ["PrevUrl"];

    }

    Header ("Location:".) $MM_redirectLoginSuccess);

    }

    else {}

    Header ("Location:".) $MM_redirectLoginFailed);

    }

    }

    ? >

    First of all, the text highlighted in red above seems to be setting the session variable that I need. Is this correct?

    If so, what is the code that I need to put on page 2 to use this session variable? or

    I have to do something else on the page 1 to correctly assign the session variable?

    Would be very grateful for your expertise

    Mark

    It seems that you put the columns incorrectly in the user authentication server behavior. This is the SQL query that checks the credentials of the user:

    $LoginRS__query = sprintf ("SELECT firstname, name OF web_access WHERE firstname = %s AND family name = %s",

    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "text"));

    You are looking for first name and last name, while you should look for the user name and password of the user.

    $_SESSION ['MM_Username"] is a session variable that stores the login name of the user. To use it in a page, all that is needed is the page start with session_start(). You can then echo the value to display.

    If you want to display the person's true name, you must create a recordset in the second page, use of $_SESSION ['MM_Username'] to search for the first name and the patronymic. Alternatively, you can change the code like this (I copied only part of it):

    $LoginRS__query = sprintf ("SELECT firstname, surname OF web_access WHERE firstname = %s AND password is %s",

    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "text"));

    $LoginRS = mysql_query ($LoginRS__query, $panto) or die (mysql_error ());

    $loginFoundUser = mysql_num_rows ($LoginRS);

    If {($loginFoundUser)

    $loginStrGroup = "";

    $row = mysql_fetch_assoc ($LoginRS);

    $_SESSION ['full_name'] = $row ["FirstName"]. ' ' . $row ['name'];

    If (via PHP_VERSION > = 5.1) {session_regenerate_id (true) ;} else {session_regenerate_id() ;}

    Declare two session variables and assign them

    $_SESSION ['MM_Username"] = $loginUsername;

    $_SESSION ["MM_UserGroup"] = $loginStrGroup;

    You can then use $_SESSION ['full_name'] in a page which begins with session_start().

  • How can I add session variables for the subject field and the body of the e-mail Message?

    How can I add session variables for the subject field and the body of the e-mail Message? Tried several combinations, but do not seem to correct the syntax.

    This is the code I have. I need to change all the form variables in $msg in session variables. The $to part is supported. What remains are the $subject and $msg fields.

    $à = « à : ». $_SESSION ["toemail"];
    $subject = '$firstname $lastname, your registration details ';
    $from = "from: [email protected]"; "
    $msg = "Dear $title $firstname $lastname\r\n\nThank for the registration for the design of your dream Home.\r\nWe have received this following details details of you-\r\n\nClient-\r\n\nOccupation: $occupation \r\nPhone No.: $phone \r\nE-mail: $email\r\n\nPresent $ location: \r\n location\r\n\nPresent address: \r\n$ address\r\n\n\nFollowing are specified by you - design requirements \r\n\nBasic Features\r\n\nNo." floors: $floors\r\nNo. of bedrooms: bedrooms\r\nNo of $. of bathrooms: $bathrooms\r\nFloor region: $sqft\r\n\nFurther Suggestions: $ Plan\r\n\nSplit one further\r\n\n\nType floor: $splitfloor\r\n-remarks: $splitfloorremarks\r\nOpen floor: $openfloor\r\n-remarks: $openfloorremarks\r\n\n\nList of the rooms to be Included\r\n\nFoyer: $foyer\r\n-remarks: $foyerremarks\r\nDrawing: $drawing\r\n-remarks: $ alive drawingremarks\r\nFormal: $formalliving\r\n-comments : $ alive formallivingremarks\r\nFamily: $familyliving\r\n-remarks: $familylivingremarks\r\nHome Office: $homeoffice\r\n-remarks: $homeofficeremarks\r\nDining: $dining\r\n-remarks: $diningremarks\r\nMaster room: $master\r\n-remarks: $masterremarks\r\nMaster bathroom: $masterbath\r\n-remarks: $masterbathremarks\r\nMaster Dressing: $masterdress\r\n-remarks: $masterdressremarks\r\nBedroom: $bed\r\n-remarks: $bedremarks\r\nBathroom: $bath\r\n-remarks: $bathremarks\r\nDress: $dress\r\n-comments : $dressremarks\r\nStudy: $study\r\n-remarks: $studyremarks\r\nLibrary: $library\r\n-remarks: $libraryremarks\r\nPowder room: $powder\r\n-remarks: $powderremarks\r\nPrayer room: $prayer\r\n-remarks: $prayerremarks\r\nKitchen: $kitchen\r\n-remarks: $kitchenremarks\r\nPantry: $pantry\r\n-remarks: $pantryremarks\r\nUtility/area of work: $utility\r\n-remarks: $utilityremarks\r\nBalcony: $balcony\r\n-remarks: $balconyremarks\r\nStore: $store\r\n-remarks: $storeremarks\r\nLaundry : $laundry\r\n-remarks: $laundryremarks\r\nVeranda: $veranda\r\n-remarks: $verandaremarks\r\nCar porch: $carporch\r\n-remarks: $carporchremarks\r\nGarage: $garage\r\n-remarks: Theater garageremarks\r\nHome $: $theater\r\n-remarks: room of $theaterremarks\r\nMaid: $maid\r\n-remarks: $maidremarks\r\n\nOther general remarks: $general\r\n\nPlease note that the fields have been left blank in your form will be considered undecided details and used in discretion.\r\nIf of the architect , it better to add more later, design requirements please feel free to reply to this email with the details. « ;
    $fla = mail ($to, $subject, $msg, $from);

    Thanks in advance!

    askintrades wrote:

    How can I add session variables for the subject field and the body of the e-mail Message?

    What you want to do? Given the nature of your question, it seems that you probably don't know what a session variable is used. The PHP manual describes the purpose of sessions here: http://docs.php.net/manual/en/intro.session.php.

    I need to change all the form variables in $msg in session variables. The $to part is supported. What remains are the $subject and $msg fields.

    $à = « à : ». $_SESSION ["toemail"];

    Why do you need to change the form variables in session variables? They are already stored in session variables, or they come directly from the form?

    The $to part is not supported. When you pass $to to the mail() function, it should contain only an e-mail address, not a string that begins with "to:

  • PHP Session variable in-app

    Hi, I'm pretty sure it's a n00bish question, but I'll have the session variable is problem when between php execs.

    So when the user connects, user id is stored in the session variable so I can use it throughout the app. However, the session variable is clearly not stored and throws a fit. I figured exit() destroys the session but that is not the case.

    I can, however, create a local variable for the user id, but I wondered how session variables are stored and retrieved.

    How is your java program interacts with the service of php?

    There is no treatment level OS things like cookies and session in Java variables.  You will have to do it yourself.

  • Branch to the same page with different session variables

    Hello guys,.

    Is there a way that allows to create a branch that redirect to the same page with a different set of values for session variables. Or is it an effective way to add the buttons after that moves through the consecutive records in the pre and oracle apex.

    hope someone can help me.

    Kind regards.

    -shashikahk-

    is there a way to add the following buttons and pre

    If you create a form using the wizard pages, Apex will automatically create these buttons in some cases (as in a master form / retail).

    Create a master page / detail demo so you can see how it works. Apex creates a pre-rendering process:

    Get the value of the primary key next or previous

    Some of the hidden objects, such as Pxx_ROWID_NEXT.

    And two buttons: GET_PREVIOUS_ROWID and GET_NEXT_ROWID

    (if you do not use rowid as the primary key, another name will be generated).

  • ADF refresh page with page fragments jsff jsf after the set session variable

    Hello.

    I have a model that includes a button that allows you to select a profile, you push the button appear available profiles, choose one and press to accept. After that, I put a variable session successfully.

    I have a page of 'First' of jsf with two fragments of page jsff after seeing a link. The display link is composed by a headerView and detailView. The headerView had a variable binding. What I need, is that this parameter (bindVariableParameter) can be defined by the session of the model variable.

    That's what I get:

    I am in a homepage (separate Application Module), model button is pushed until I load "first" jsf page and after that, I go to the page jsf 'First', that information is loaded successfully. What I do in the Application Module is something like this:

    protected void prepareSession (one session) {}

    SessionScope card = ADFContext.getCurrent () .getSessionScope ();

    Company string = (String) sessionScope.get ("compId");

    System.out.println ("Default Comapny in British Colombia is:" + company);

    super.prepareSession (session);

    this.getSession () .getUserData () .put ("The company", company);

    System.out.println ("after the definition userData value card BC");

    }

    And in the variable binding expression of the headerView that I use:

    adf.userSession.userData.Company

    It works very well! But!

    When I press the button again and I chose another profile, the info is not updated. In the headerView or in the detailView.

    Also, when I go to the 'First' jsf page (without previously pressing the button model), I had no info, which is just, because I have no session variable. After I have press the model and select the profile, but the page is not refreshed.

    I tried many ways to this, but I'm lost.

    Could you help me?

    Kind regards.

    I'm not sure that understand your use case. What do I get, you set a parameter after that you press a button on the home page to pass this parameter to the first.jsf.

    Why don't you implement a method of the application module and call it directly with the parameter. The session of preparation will not be called whenever you browse but only init am.

    Do you need the parameter in the layer model or only in the display?

    Timo

  • Session variable with a list of dashboards availalble?

    Hello

    Is it possible to fill one - line-wize?-session variable (using a block variable & init system: USER) with a list of dashboards users will have access (such as the list of dashboards displayed at the top of the Web Portal) once he's logged?

    My client said the obligation to provide each user with a default "Home" (different from "My dashboard") dashboard that will provide an overview of the available dashboards, accompanied by a description of each dashboard.

    So, what is the syntax to use?

    Thank you!

    Randall

    Hi Randall,.

    The BI-serveur is not aware of the presentation server. In other words, that he doesn't know what dashboard a user has access. What you could do is populate a table in the comic book and use the guided navigation to access the dashboard.

    concerning

    John
    http://www.obiee101.blogspot.com/

Maybe you are looking for

  • Satellite M70: Battery no longer works

    My brand-new satellite M70 battery no longer works. I haven't used the phone for about a week and when I tried to start it (on drums), he did nothing. The battery was still charged (63%) I need to connect the power adapter to make it work. During thi

  • The upgrade of Windows 10 Wizard - blocked on all "prepare them for your upgrade" at 0%

    Moving from Win 7 Pro. Chose the (non ISO) standard update process. The upgrade window says "preparing your upgrade. Installation of Windows 10. Please wait. ' Completion percentage: 0%. At a standstill like this for 2 hours now.

  • Indication of unopened mail blackBerry Smartphones

    I have three e-mail accounts on my Bold 9900 and even if I "read" all the mail in the three accounts, the top of my continures screen to show '1' not OPEN e-mail - a small but irritating problem.  My AT & T store was of no help.  I rebooted, removed

  • Smartphones BlackBerry 8900 curve phone shortcut prob!

    When I press the button on the left side of the phone to the voice component a message comes up saying... impossible to allocate memory. close to other applications and try again... but I have, to my knowledge, have nothing open. is it possible to cl

  • Last line is not read

    HelloWe run a native Linux as command:Process p = Runtime.getRuntime().exec("/bin/tcsh");Then to the process, we use outputstream to send the following:getOutputStream () .write (command + getNewline()) .getBytes ());getOutputStream () .flush ();Comm