Search found 41 matches

by azw
Wed Jun 08, 2005 7:51 pm
Forum: PHP coding => General
Topic: header("location: with session_register() & sessio
Replies: 12
Views: 2121

That makes sense. Thanks!
by azw
Tue Jun 07, 2005 9:08 pm
Forum: PHP coding => General
Topic: header("location: with session_register() & sessio
Replies: 12
Views: 2121

Ruturajv, what is the reasoning behind using both isset and =='some value'?

Code: Select all

if (isset($_SESSION['variablename']) && $_SESSION['variablename']=='some value')
by azw
Tue Jun 07, 2005 2:01 am
Forum: PHP coding => General
Topic: header("location: with session_register() & sessio
Replies: 12
Views: 2121

Great! I've got one of the test scripts working now. I'll play with it more and let you know if I can't fix the main one.

Thanks a million, Alexei!
by azw
Tue Jun 07, 2005 1:53 am
Forum: PHP coding => General
Topic: header("location: with session_register() & sessio
Replies: 12
Views: 2121

Oops. I think I now see what you meant.

Yes, on the second page, there is a test for a current session.

Code: Select all

if (!session_is_registered("SESSION"))


I'll try changing that.

Thanks, again.
by azw
Tue Jun 07, 2005 1:50 am
Forum: PHP coding => General
Topic: header("location: with session_register() & sessio
Replies: 12
Views: 2121

Hi, Alexei, Thanks for the really quick response. Actually, I've not even gotten off the login page. So I'm not checking to see if I'm logged in. What I'm doing below is making sure my data gets carried over to the next page. session_register("SESSION"); session_register('admin...
by azw
Tue Jun 07, 2005 1:29 am
Forum: PHP coding => General
Topic: header("location: with session_register() & sessio
Replies: 12
Views: 2121

header("location: with session_register() & sessio

The server I'm on has session.auto_start turned off. It's php version 4.3.11. I'm writing a login routine. From what I read at php.net, it seems like you shouldn't use session_register() with session_start(). I'm stumped. If I use session_register(), this works fine (the header location redirects pe...
by azw
Sun Feb 15, 2004 11:53 am
Forum: PHP coding => General
Topic: how to return from script to contact form at bottom of page?
Replies: 8
Views: 2027

The semicolon is extraneous. But I'm not sure if that's what you were asking about.
by azw
Sat Feb 14, 2004 12:09 am
Forum: PHP coding => General
Topic: how to return from script to contact form at bottom of page?
Replies: 8
Views: 2027

With a little brainstorming with some gurus, I came up with a solution I think works in Opera, Netscape and IE: <?php $goTo = "'#signup'"; if (isset($_POST['submit'])) // if form was submitted, use onload body tag { ?> <body id="top" onload="location.hre...
by azw
Wed Feb 11, 2004 10:22 am
Forum: PHP coding => General
Topic: how to return from script to contact form at bottom of page?
Replies: 8
Views: 2027

Oops. Testing these pages in Opera 7 and Navigator 7, I see that it doesn't work. The problem is this: <script type="text/javascript"> //<![CDATA[ document.location="#signup"; //]]> </script> Is there another way to use php or javascript to go to a specific place on a page? Using the body tag didn't...
by azw
Tue Feb 10, 2004 2:33 am
Forum: PHP coding => General
Topic: SOLVED: pulling my hair out on parse error
Replies: 2
Views: 889

Well, I didn't find any posts here exactly like what I was looking for, but I did notice that most of these kinds of errors were silly things like quotes, brackets, and parentheses. So...I went through all my () {} and [] to be sure they were paired. There must be an easier way to do that. Anyone kn...
by azw
Tue Feb 10, 2004 1:25 am
Forum: PHP coding => General
Topic: SOLVED: pulling my hair out on parse error
Replies: 2
Views: 889

SOLVED: pulling my hair out on parse error

Howdy, I get this error when I load my page. Parse error: parse error in /home/azw/public_html/poolPros/scripts/jobOpeningsHeadTEMP.php on line 352 I've had that line working before (actually 355 is the real line), but when I added a new validation above this, I get the error. The lines around 352 c...
by azw
Sat Feb 07, 2004 1:01 am
Forum: PHP coding => Mail
Topic: multiple cc & bcc in mail()
Replies: 6
Views: 3535

Actually, all I'm doing is sending a copy of customer inquiries to several different people in the same organization. So in this case a cc: would do, except that it won't work! P-r-e-t-t-y frustrating!
by azw
Sat Feb 07, 2004 12:00 am
Forum: PHP coding => Mail
Topic: multiple cc & bcc in mail()
Replies: 6
Views: 3535

Error in conclusions. Deleted message.
by azw
Fri Feb 06, 2004 11:24 am
Forum: PHP coding => Mail
Topic: multiple cc & bcc in mail()
Replies: 6
Views: 3535

Hmm. Strange.

I think I've got that. I'll test it again.

Is there any chance that some part of the system deletes duplicates emails to the same address when sent with the same call to mail()?
by azw
Fri Feb 06, 2004 3:23 am
Forum: PHP coding => Mail
Topic: multiple cc & bcc in mail()
Replies: 6
Views: 3535

multiple cc & bcc in mail()

Hi, I need to send an email to 4 people. Do I have to call mail() 4 times, or can I set up a cc: with 3 addresses? I've not had success in getting the emails to go to all 4 addresses. Here's one version I tried: $ccEmail1 = "\"" . $name1 . "\" <" . $email1 . ">&quo...
by azw
Thu Feb 05, 2004 12:36 pm
Forum: PHP coding => General
Topic: how to return from script to contact form at bottom of page?
Replies: 8
Views: 2027

Thanks for your continuing efforts! I finally gave up on working with the body tag because of Symantec's rewriting of the onload element. [By the way, I'd recommend that--even if a developer isn't using Symantec, themselves--that they at least test anything that requires quotes in the the onload tag...
by azw
Wed Feb 04, 2004 1:07 am
Forum: PHP coding => General
Topic: how to return from script to contact form at bottom of page?
Replies: 8
Views: 2027

Thanks for the helpful response, ruturajv. You were right that I didn't have <a name="name"></a> Can I leave that empty, with nothing between the opening and closing tag? I have tried it both ways, and for the body tag, I tried variations on this code: <?php if ((bool)$_POST...
by azw
Mon Feb 02, 2004 11:48 am
Forum: PHP coding => General
Topic: how to return from script to contact form at bottom of page?
Replies: 8
Views: 2027

how to return from script to contact form at bottom of page?

Howdy, I have a fairly long page with a "contact us" form at the bottom. After I process the form's data using PHP, I want to show the form again--or actually the <h3>title</h3> above the form, becuase I display error messages right below that heading. I've tried using a variety of conditional <body...
by azw
Sat Nov 02, 2002 8:16 am
Forum: mySQL & php coding
Topic: ?Put connection data where users can't access it directly?
Replies: 5
Views: 2690

Hi,

You're both right. I was concerned with both security and ease of change. Once again, I appreciate your help!

If I don't have to worry about just putting them in the xxx.php file, I can do that.

Thanks!

Art
by azw
Fri Nov 01, 2002 11:13 pm
Forum: mySQL & php coding
Topic: ?Put connection data where users can't access it directly?
Replies: 5
Views: 2690

?Put connection data where users can't access it directly?

Hi, In several PHP pages I use the same lines to set up a connection to a mySQL database. // set variables for database $Host = "localhost"; $User = "xxx"; $Password = "yyy"; $DBName = "zzz"; $TableName = "aaa"; I'd rather put this somewhere besides in a php file, since it contains my username and p...
by azw
Thu Oct 31, 2002 8:15 am
Forum: mySQL & php coding
Topic: why do I have to put single quotes around this variable?
Replies: 10
Views: 4417

The idea that the variable type needs to be clear is certainly a lot easier and more productive than where I was heading!
Thanks,
Art
by azw
Wed Oct 30, 2002 10:11 pm
Forum: mySQL & php coding
Topic: why do I have to put single quotes around this variable?
Replies: 10
Views: 4417

Both of your thoughts on this helped. Thanks. I've been searching for a specific answer to my question and think I've gotten a bit closer to it. Paul Dubois in the book "MySQL" writes (p. 136): ...as a consequence of MySQL's comparison rules, a comparison involving a string and a number is evaluated...
by azw
Wed Oct 30, 2002 12:20 am
Forum: mySQL & php coding
Topic: why do I have to put single quotes around this variable?
Replies: 10
Views: 4417

Hmm. When you said $inputIdEncrypt has a space in it, did you mean that there might be a space at the end of the variable's value or a space in the variable name?
by azw
Wed Oct 30, 2002 12:16 am
Forum: mySQL & php coding
Topic: why do I have to put single quotes around this variable?
Replies: 10
Views: 4417

Here's the error message I get: Warning: Supplied argument is not a valid MySQL result resource in /hsphere/local/home/zollerwa/zollerwagner.com/realistPtg/artCardPickup6.php on line 53 It prints the values for $Query, $Result, and $numRows as: select Query: SELECT * FROM artCard WHERE idEncrypt=077...
by azw
Tue Oct 29, 2002 10:39 pm
Forum: mySQL & php coding
Topic: why do I have to put single quotes around this variable?
Replies: 10
Views: 4417

why do I have to put single quotes around this variable?

I have had to put single quotes around $inputIdEncrypt in this line:

$Query = "SELECT * FROM $TableName WHERE idEncrypt='$inputIdEncrypt'";

Otherwise I get an error. Can anyone tell me why this is so?