Re: [PHP] I cannot figure out why this is not working?

2007-06-03 Thread Jim Lucas

Brad Sumrall wrote:

?php

{

What?  why is this here?



$to =
([EMAIL PROTECTED],[EMAIL PROTECTED]);

why parenthesis around string definition?



$subject = online guestbook register;

$email = $_POST['email'] . \n;

$headers = Reply-To:  . $_POST['email'] . \n;

$body = Visitor Infomation:  . \n .

Name:  . $_POST['name2'] . \n . 


Email:  . $_POST['email2'] . \n;

}

else

{

mail($to,$subject,$body,$headers);
This is so confusing...  You are calling the mail() function before you 
are setting everything...


Is this really your code, or did you copy bits and pieces of you code to 
make this example?




$to = ($email2);

$subject = (Thank you);

$email = $_POST['email'] . \n;

$headers = Reply-To:  . $_POST['email'] . \n;

$body = Thank you for signing our Guest Book and visiting our website. Feel
free to search our extensive property database, as this is the most current
up to date information in the Real Estate Market today. You will see the
latest listings the same time the Realtors do. Check out
http://www.Floridaonlineinvestments.com; . \n .

Shouldn't there be a semi-colon here?  instead of a period?

Why are you closing your string and then concatenating another with just 
a newline?




mail($to,$subject,$body,$headers);

}

?

 





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cant set info in DB...HELP

2007-06-03 Thread Tijnema

On 6/3/07, Stut [EMAIL PROTECTED] wrote:

K. Hayes wrote:
 What lists are you referring to?  Also this is how the examples show
 I've seen.

I mean hit Reply to all in your mail client. That way you include the
email address of the PHP General mailing list so everyone, including the
archives, can see your reply.

 I know this is basic general stuff but I try many times before posting,
 and I have followed all directions given.

Change the following line...

 mysqli_query($connection,$sql_query); ?

to...

mysqli_query($connection,$sql_query)
or die(Query failed: .mysqli_error($connection);


you're missing a ) here, it should be:
mysqli_query($connection,$sql_query)
or die(Query failed: .mysqli_error($connection))

Tijnema


If you still get no output, check error_reporting and display_errors in
your php.ini file to make sure you are seeing at least errors and warnings.

-Stut

 ===END NEW
 CODE=


 - Original Message - From: Stut [EMAIL PROTECTED]
 To: K.Hayes [EMAIL PROTECTED]
 Cc: php-general php-general@lists.php.net
 Sent: Saturday, June 02, 2007 9:52 PM
 Subject: Re: [PHP] Cant set info in DB...HELP


 Please include the list on all replies.

 K.Hayes wrote:
 I don't know if I'm escaping the 'vars correctly'.  If I'm wrong can you
 give me an example?
 snip
 $sql_query = INSERT INTO contestants (conName, conAddress, conCity,
 conState, conZip, conPhone, schName, schAddress, schCity, schState,
 schZip,
 strName, strCity, strState) VALUES('$regName', '$regAddress',
 '$regCity',
 '$regState', '$regZip', '$regPhone', '$sclName', '$sclName', '$sclCity',
 'sclState', '$sclZip', '$stoName', '$stoCity', '$stoState');
 $insert_query = mysqli_real_escape_string($connection, $sql_query);

 mysqli_query($connection,$insert_query); ?

 No, this is not the right way. I suggest you read the manual page on
 mysqli_real_escape_string (http://php.net/mysqli_real_escape_string).
 You need to run it on every variable you are using *in* the SQL query,
 not on the SQL query itself.

 Google for a php mysqli tutorial - all this stuff is very basic and
 should be covered by most tutorials you'll find.

 -Stut






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cant set info in DB...HELP

2007-06-03 Thread kvigor
Thanks All.

Made the changes and just like Ambien it worked like a Dream.

I found out that I had a typo in my DB and missing ) I corrected it. All
is well.


Tijnema  wrote in message
news:[EMAIL PROTECTED]
 On 6/3/07, Stut [EMAIL PROTECTED] wrote:
 K. Hayes wrote:
  What lists are you referring to?  Also this is how the examples show
  I've seen.

 I mean hit Reply to all in your mail client. That way you include the
 email address of the PHP General mailing list so everyone, including the
 archives, can see your reply.

  I know this is basic general stuff but I try many times before posting,
  and I have followed all directions given.

 Change the following line...

  mysqli_query($connection,$sql_query); ?

 to...

 mysqli_query($connection,$sql_query)
 or die(Query failed: .mysqli_error($connection);

 you're missing a ) here, it should be:
 mysqli_query($connection,$sql_query)
 or die(Query failed: .mysqli_error($connection))

 Tijnema

 If you still get no output, check error_reporting and display_errors in
 your php.ini file to make sure you are seeing at least errors and
 warnings.

 -Stut

  ===END NEW
  CODE=
 
 
  - Original Message - From: Stut [EMAIL PROTECTED]
  To: K.Hayes [EMAIL PROTECTED]
  Cc: php-general php-general@lists.php.net
  Sent: Saturday, June 02, 2007 9:52 PM
  Subject: Re: [PHP] Cant set info in DB...HELP
 
 
  Please include the list on all replies.
 
  K.Hayes wrote:
  I don't know if I'm escaping the 'vars correctly'.  If I'm wrong can
  you
  give me an example?
  snip
  $sql_query = INSERT INTO contestants (conName, conAddress, conCity,
  conState, conZip, conPhone, schName, schAddress, schCity, schState,
  schZip,
  strName, strCity, strState) VALUES('$regName', '$regAddress',
  '$regCity',
  '$regState', '$regZip', '$regPhone', '$sclName', '$sclName',
  '$sclCity',
  'sclState', '$sclZip', '$stoName', '$stoCity', '$stoState');
  $insert_query = mysqli_real_escape_string($connection, $sql_query);
 
  mysqli_query($connection,$insert_query); ?
 
  No, this is not the right way. I suggest you read the manual page on
  mysqli_real_escape_string (http://php.net/mysqli_real_escape_string).
  You need to run it on every variable you are using *in* the SQL query,
  not on the SQL query itself.
 
  Google for a php mysqli tutorial - all this stuff is very basic and
  should be covered by most tutorials you'll find.
 
  -Stut



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: I cannot figure out why this is not working?

2007-06-03 Thread Jonesy
On Sat, 2 Jun 2007 18:34:36 -0400, Brad Sumrall queried:

  I cannot figure out why this is not working?

Just as soon as the Crack gmane.comp.php.general Mind Reading Team
revealss your meaning of not working, someone will get back to you.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How can I DomDocument-renameNode?

2007-06-03 Thread itoctopus
Create a copy manually and then rename the node.

-- 
itoctopus - http://www.itoctopus.com
Eric Wiener [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
Apparently renameNode is not yet implemented into Dom, so how can I
rename a node without affecting its value and/or child nodes?



I have tried making a new node, inserting it before the old node then
removing the old node but I could not figure out how to get the
nodeValue to include the child nodes, so they get stripped out leaving
only the text value.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How can I DomDocument-renameNode?

2007-06-03 Thread tedd

I have tried making a new node, inserting it before the old node then
removing the old node but I could not figure out how to get the
nodeValue to include the child nodes, so they get stripped out leaving
only the text value.



You might try something like this:

function replaceNode() {
var inChoice = document.getElementById(grafCount).selectedIndex;
var inText = document.getElementById(textArea).value;

var newText = document.createTextNode(inText);
var newGraf = document.createElement(p);
newGraf.appendChild(newText);

var allGrafs = nodeChangingArea.getElementsByTagName(p);
var oldGraf = allGrafs.item(inChoice);

nodeChangingArea.replaceChild(newGraf,oldGraf);
}

 tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Single Sign On

2007-06-03 Thread Sudheer Satyanarayana

Hi,

We have three web sites
a) example1.com
b) example2.com
c) my.example2.com


Our sites include exclusive pages for registered users. All user account 
management tasks are handled by my.example2.com including registration, 
modification, cancellation, etc.  We would like to create a single sign 
on system for all the three web sites. The user would sign on with a 
single username and password to all three web sites. For example, when 
the user visits a membership page in example1.com he would be prompted 
to sign on to his account.  His credentials are stored in 
my.example2.com.  my.example2.com is now fully functional. After the 
successful sign on, the user would be redirected to original membership 
page in example1.com.


How would I pass the information from my.example2.com to example1.com 
about the authentication status of user?


We use MySQL database to store and retrieve user account details in 
my.example2.com. The web host does not allow remote database connections.


Thanks,
Sudheer

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Single Sign On

2007-06-03 Thread Robert Cummings
On Mon, 2007-06-04 at 08:06 +0530, Sudheer Satyanarayana wrote:
 Hi,
 
 We have three web sites
 a) example1.com
 b) example2.com
 c) my.example2.com
 
 
 Our sites include exclusive pages for registered users. All user account 
 management tasks are handled by my.example2.com including registration, 
 modification, cancellation, etc.  We would like to create a single sign 
 on system for all the three web sites. The user would sign on with a 
 single username and password to all three web sites. For example, when 
 the user visits a membership page in example1.com he would be prompted 
 to sign on to his account.  His credentials are stored in 
 my.example2.com.  my.example2.com is now fully functional. After the 
 successful sign on, the user would be redirected to original membership 
 page in example1.com.
 
 How would I pass the information from my.example2.com to example1.com 
 about the authentication status of user?
 
 We use MySQL database to store and retrieve user account details in 
 my.example2.com. The web host does not allow remote database connections.

I'd pass a session identifier to example1.com, then when example1.com
detects a session synch, it would use a webservice to call home to
my.example2.com and request verification of the session. You will
probably want to have some extra checks in place too, like a timestamp
that expires, maybe user browser information, etc to help validate. 

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Is the GD module standard?

2007-06-03 Thread Dave M G

PHP General,

I have been using the imagepng() function in my local testing 
environment for a while now to make CAPTCHA images.


In my testing environment, I hadn't done any customization to my PHP set 
up. I went with the default set of installation options that Ubuntu 
offers for a LAMP server.


Recently, I uploaded my site to a web hosting server, and the CAPTCHA 
would not display.


At first, I didn't understand that it was a module issue, because I 
thought the imagepng() function was standard in PHP.


However, by using the phpinfo() command on my hosting service, I 
realized they don't have the GD module installed.


So my assumption that imagepng() will be available on any standard 
installation of PHP is wrong.


However, I'm surprised that it wouldn't be as common as, say, the MySQL 
module.


Is it that my Ubuntu installation comes with an unusual amount of bells 
and whistles? Is it that my web hosting server is lacking in what can be 
expected for standard PHP features?


I want to write code that most people can expect to run on their hosting 
services without having to reconfigure their PHP installation. So, can I 
expect that most servers would have the GD module? If not, what do 
people usually do to manipulate images?


Thank you for any advice.

--
Dave M G
Ubuntu Feisty 7.04
Kernel 2.6.20-15-386

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Is the GD module standard?

2007-06-03 Thread Robert Cummings
On Mon, 2007-06-04 at 12:47 +0900, Dave M G wrote:
 PHP General,
 
 I have been using the imagepng() function in my local testing 
 environment for a while now to make CAPTCHA images.
 
 In my testing environment, I hadn't done any customization to my PHP set 
 up. I went with the default set of installation options that Ubuntu 
 offers for a LAMP server.
 
 Recently, I uploaded my site to a web hosting server, and the CAPTCHA 
 would not display.
 
 At first, I didn't understand that it was a module issue, because I 
 thought the imagepng() function was standard in PHP.
 
 However, by using the phpinfo() command on my hosting service, I 
 realized they don't have the GD module installed.
 
 So my assumption that imagepng() will be available on any standard 
 installation of PHP is wrong.
 
 However, I'm surprised that it wouldn't be as common as, say, the MySQL 
 module.
 
 Is it that my Ubuntu installation comes with an unusual amount of bells 
 and whistles? Is it that my web hosting server is lacking in what can be 
 expected for standard PHP features?
 
 I want to write code that most people can expect to run on their hosting 
 services without having to reconfigure their PHP installation. So, can I 
 expect that most servers would have the GD module? If not, what do 
 people usually do to manipulate images?

Every host I've ever used has had GD installed. If they didn't offer GD,
I'd switch. I think it's a safe bet to assume most realistic hosts have
GD.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Is the GD module standard?

2007-06-03 Thread Greg Donald

On 6/3/07, Robert Cummings [EMAIL PROTECTED] wrote:

Every host I've ever used has had GD installed. If they didn't offer GD,
I'd switch. I think it's a safe bet to assume most realistic hosts have
GD.


Same here.  Been using it for years, never had to ask for it to be installed.


--
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php