my apologies jpadie, I certainly don't mean to waste anyone's time and am very appreciative of all of your help thus far with regard to this problem I'm having.
I'm starting to track all of the $session data from point of login to see if I can find where the problem is.
I will post back my...
Notice: Undefined variable: session in
Notice: Trying to get property of non-object in
Notice: Undefined variable: session in on line 55
Notice: Trying to get property of non-object in
error with query.
error was
Query was:SELECT coName,coStreet,coUnit,coCity,coStProv,coType,pack FROM...
Thanks jpadie,
here is the result of the query output:
Query was:SELECT coName,coStreet,coUnit,coCity,coStProv,coType,pack FROM vendors WHERE coCity = '' AND coStProv = ''
Thanks jpadie,
I used the code you provided and it printed all of the $session properties :), I tried using this in my query but it still fails:
WHERE coCity = '".mysql_real_escape_string($session->userinfo['city'])."' AND coStProv = '".mysql_real_escape_string($session->userinfo['stProv'])."'";
jpadie
Array
(
[username] => Lynque
[url] => /login/promotions.php
[userid] => 54e1c027d16a5c673ebdb8c6d60f9f93
)
is the result, though I am also echoing this:
echo "<b>City:</b> ".$session->userinfo['city']."<br>";
echo "<b>State / Province:</b>...
Thanks for both suggestions but neither work
Vucinita:
Notice: Undefined index: userinfo
Don:
Notice: Undefined index: userinfo
Notice: Trying to get property of non-object in
Any further help with this would be great.
I'm trying this but I think the syntax is wrong...
WHERE coCity = '".mysql_real_escape_string($_SESSION['userinfo->city'])."' AND coStProv = '".mysql_real_escape_string($_SESSION['userinfo->stProv'])."'";
Any help is appreciated
Thanks feherke,
I've heard a lot about SQL injection attacks but haven't found a definitive guide for protecting my DB, do you know of a link that would serve as a good guide?
I have a query that executes when I hardcode the username but not when I try to use the session var.
Works:
$q = "SELECT * FROM ".TBL." WHERE username = 'Me'";
Doesn't work:
$q = "SELECT * FROM ".TBL." WHERE username = '$username'";
I have used:
<?php
print_r($_SESSION);
?>
to print out...
Let me post the entire block of code so you can see what I'm trying to do
$email = $_POST["eMail"];
$subject = $_POST["subject"]; */
if($subject == "Accepted - MDG"){
$email = $_POST["eMail"];
mail($email,$subject);
$redirect="thank-you.html"
header("Location: $redirect");
}else...
thanks to both of you for your help, I should have clarified the desired functionality as pointed out by a6.
step1 - user fills out form and submits
step2 - mailer finds out if $subject == accepted or declined
step3 - if accepted email sent and redirect to thank you page, if declined email sent...
Hello all,
I have a php mailer that I would like to have redirect if the subject is != "accepted", I've never used a redirect on a mailer so it's new to me.
So somethng like the code below
$email = "name@mydomain.com";
if($subject = "accepted";){
$email = "name@mydomain.com";
$subject...
Hello all,
I have a form that submits to a php mail and works just fine.
I'd like to add to the submit button an "onclick" that loads up a .pdf document as well as submit the form.
Any tips on this would be really helpful
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.