Re: [PHP] Please Help Me ASAP

2009-04-10 Thread Jignesh Thummar
whenever you want to print HTMLs in your code you don't need to call echo or
print everytime.
You can use plain HTML in your php code this way.


your HTML code

your HTML code

or you can use HEREDOC to print long string ( http://in.php.net/types.string)

- Jignesh

On Fri, Apr 10, 2009 at 12:37 PM, Bipin Upadhyay wrote:

> kunal sharma wrote:
>
>>  Hello,
>> I'm building my own website without any knowledge of PHP, & i'm almost
>> done
>> with that..as my website works fine on my local server
>> i:e WAMPSERVER 2.0,
>> but the same code is not working on server...n i'm rilli 'd of coz of
>> that...
>>
>> The error is :"PHP Parse error: syntax error, unexpected $end in
>> /home/usang2me/public_html/sign_up.php on line 145"
>>
>> "145" happens to be last line i:e "?>" , but here becoz of pattern..itz
>> not
>> into its proper way...
>>
>> &
>> After filling the sign up form correctly . it says ALL FIELD ARE
>> MANDATORYi dont understand ...y soi'm pasting my code
>> here...please
>> help me asap ...
>> each and every suggestion will be appreciat'd
>>
>>
>>
>> Here Is The Code:
>>
>> > $username = $_POST['username'];
>> $password1 = $_POST['password1'];
>> $password2 = $_POST['password2'];
>> $name = $_POST['name'];
>> $address = $_POST['address'];
>> $city = $_POST['city'];
>> $state = $_POST['state'];
>> $code = $_POST['code'];
>> $phone = $_POST['phone'];
>> $email = $_POST['email'];
>> //$bankname = $_POST['bankname'];
>> //$bankbranch = $_POST['bankbranch'];
>> //$accountnumber = $_POST['bankac'];
>> $refer_id = $_POST['refer_id'];
>> //$country = $_POST['country'];
>> // Connects to your Database
>> include('database_connect_local.php');
>> //This makes sure they did not leave any fields blank
>> $minuser_len = 6; //username minimum length
>> $minpass_len = 6; //password minimum length
>> $mincode_len = 6; //code minimum length
>> $minphone_len = 10; //phone minimum length
>> //$refer_id_len = 6; //refer_id minimum length
>>
>> if (strlen($username) < $minuser_len || strlen($password1) < $minpass_len
>> ||
>> strlen($code) < $mincode_len || strlen($phone) < $minphone_len)
>> {
>> echo "";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> echo " > style=font-size:11pt;>Minimum length values for Username or Password or
>> Pincode or Mobile is missing. Please try again with correct
>> values.   ";
>> include 'signup.php';
>> exit;
>> //die("User/password was not long enough!");
>> }elseif (!is_numeric($code) || !is_numeric($phone)){
>> echo "";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> echo " > style=font-size:11pt;>Non Numeric Character Where only Numeric Value is
>> Allowed.   ";
>> include 'signup.php';
>> exit;
>> //}elseif (empty($username)|| empty($password1) || empty($password2) ||
>> empty($name) || empty($address) || empty($city) || empty($state) ||
>> empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
>> //echo "";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> //echo " > style=font-size:11pt;>All fields are
>> Mandatory
>>   //";
>> //include 'signup.php';
>> }else{
>> // checks if the username is in use
>> $checkuser = mysql_query("SELECT username FROM id_users WHERE
>> username='$username'");
>> $username_exist = mysql_num_rows($checkuser);
>> $referid = mysql_query("SELECT username FROM id_users WHERE
>> username='$refer_id'");
>> $referid_exist = mysql_num_rows($referid);
>> if($username_exist != 0){
>> echo "";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> echo " > style=font-size:11pt;>I'm sorry but the username you specified has
>> already been taken. Please pick another one.
>>   ";
>> unset($username);
>> include 'signup.php';
>> }elseif($referid_exist > 0){
>> echo "";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> echo " > style=font-size:11pt;>I'm sorry but the referral id doesn't exist.
>> Please
>> check the referral id or enter the valid one.
>>   ";
>> unset($username);
>> include 'signup.php';
>> }else{
>> // this makes sure both passwords entered match
>> if ($password1 != $password2) {
>> die('Your passwords did not match.');
>> }else{
>> //}
>> // now we insert it into the database
>> //$password3 = md5($_POST['password1']);//
>> $insert = "INSERT INTO id_users (username, password, name, address, city,
>> state, code, p

Re: [PHP] Please Help Me ASAP

2009-04-10 Thread Bipin Upadhyay

kunal sharma wrote:

 Hello,
I'm building my own website without any knowledge of PHP, & i'm almost done
with that..as my website works fine on my local server
i:e WAMPSERVER 2.0,
but the same code is not working on server...n i'm rilli 'd of coz of
that...

The error is :"PHP Parse error: syntax error, unexpected $end in
/home/usang2me/public_html/sign_up.php on line 145"

"145" happens to be last line i:e "?>" , but here becoz of pattern..itz not
into its proper way...

&
After filling the sign up form correctly . it says ALL FIELD ARE
MANDATORYi dont understand ...y soi'm pasting my code here...please
help me asap ...
each and every suggestion will be appreciat'd



Here Is The Code:

";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " Minimum length values for Username or Password or
Pincode or Mobile is missing. Please try again with correct
values.   ";
include 'signup.php';
exit;
//die("User/password was not long enough!");
}elseif (!is_numeric($code) || !is_numeric($phone)){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " Non Numeric Character Where only Numeric Value is
Allowed.   ";
include 'signup.php';
exit;
//}elseif (empty($username)|| empty($password1) || empty($password2) ||
empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
//echo "";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo "";
//echo " All fields are Mandatory
  //";
//include 'signup.php';
}else{
// checks if the username is in use
$checkuser = mysql_query("SELECT username FROM id_users WHERE
username='$username'");
$username_exist = mysql_num_rows($checkuser);
$referid = mysql_query("SELECT username FROM id_users WHERE
username='$refer_id'");
$referid_exist = mysql_num_rows($referid);
if($username_exist != 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " I'm sorry but the username you specified has
already been taken. Please pick another one.
  ";
unset($username);
include 'signup.php';
}elseif($referid_exist > 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " I'm sorry but the referral id doesn't exist. Please
check the referral id or enter the valid one.
  ";
unset($username);
include 'signup.php';
}else{
// this makes sure both passwords entered match
if ($password1 != $password2) {
die('Your passwords did not match.');
}else{
//}
// now we insert it into the database
//$password3 = md5($_POST['password1']);//
$insert = "INSERT INTO id_users (username, password, name, address, city,
state, code, phone, email, payment_status, member_status, total_member,
refer_id)
VALUES ('$username', '$password1', '$name', '$address', '$city', '$state',
'$code', '$phone', '$email', '0', '0', '0', '$refer_id'); UPDATE id_users
SET refer_id = '1' where username = 'refer_id';";
$queries =
preg_split("/;+(?=([^'|^\\\']*['|\\\'][^'|^\\\']*['|\\\'])*[^'|^\\\']*[^'|^\\\']$)/",
$insert);
foreach ($queries as $query){
if (strlen(trim($query)) != 0) mysql_query($query) or die(mysql_error());
}
//mysql_query($insert) or die(mysql_error());
//mysql_close();

//$update = "update id_users set refer_id='1' where username='refer_id'";
//mysql_query($update) or die(mysql_error());
//mysql_close();
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " You have successfully Registered, Please
Login   ";
include 'login.php';
}
}
}
?>

Thanks Kunal

  

Kunal,

The trouble is the way you've commented things here (and in the 
following lines):


//}elseif (empty($username)|| empty($password1) || empty($password2) ||
empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
...


Due to these comments, you are missing a semicolon.

On a very friendly note, here are a few comments:
1. The code is very ugly. Almost unmaintainable.
2. It seems to have almost every vulnerability I can think of -SQL 
Injection, XSS, etc.
3. You don't seem to be using an IDE. Any basic PHP IDE will at least 
eliminate these parsing related issues.

4. .

There are a few things that you'd need to learn before you can actually 
put your code in a live environment.

BTW, which book are you referring to write code?

--Bipin Upadhyay.
http://projectbee.org/



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



RE: [PHP] Please Help Me ASAP

2009-04-09 Thread abdulazeez alugo


 

> Date: Fri, 10 Apr 2009 08:33:10 +0530
> From: usang...@gmail.com
> To: php-general@lists.php.net
> Subject: [PHP] Please Help Me ASAP
> 
> Hello,
> I'm building my own website without any knowledge of PHP, & i'm almost done
> with that..as my website works fine on my local server
> i:e WAMPSERVER 2.0,
> but the same code is not working on server...n i'm rilli 'd of coz of
> that...
> 
> The error is :"PHP Parse error: syntax error, unexpected $end in
> /home/usang2me/public_html/sign_up.php on line 145"
> 
> "145" happens to be last line i:e "?>" , but here becoz of pattern..itz not
> into its proper way...
> 
> &
> After filling the sign up form correctly . it says ALL FIELD ARE
> MANDATORYi dont understand ...y soi'm pasting my code here...please
> help me asap ...
> each and every suggestion will be appreciat'd
> 
> 
> 
> Here Is The Code:
> 
>  $username = $_POST['username'];
> $password1 = $_POST['password1'];
> $password2 = $_POST['password2'];
> $name = $_POST['name'];
> $address = $_POST['address'];
> $city = $_POST['city'];
> $state = $_POST['state'];
> $code = $_POST['code'];
> $phone = $_POST['phone'];
> $email = $_POST['email'];
> //$bankname = $_POST['bankname'];
> //$bankbranch = $_POST['bankbranch'];
> //$accountnumber = $_POST['bankac'];
> $refer_id = $_POST['refer_id'];
> //$country = $_POST['country'];
> // Connects to your Database
> include('database_connect_local.php');
> //This makes sure they did not leave any fields blank
> $minuser_len = 6; //username minimum length
> $minpass_len = 6; //password minimum length
> $mincode_len = 6; //code minimum length
> $minphone_len = 10; //phone minimum length
> //$refer_id_len = 6; //refer_id minimum length
> 
> if (strlen($username) < $minuser_len || strlen($password1) < $minpass_len ||
> strlen($code) < $mincode_len || strlen($phone) < $minphone_len)
> {
> echo "";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
> echo "  style=font-size:11pt;>Minimum length values for Username or Password or
> Pincode or Mobile is missing. Please try again with correct
> values.   ";
> include 'signup.php';
> exit;
> //die("User/password was not long enough!");
> }elseif (!is_numeric($code) || !is_numeric($phone)){
> echo "";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
> echo "  style=font-size:11pt;>Non Numeric Character Where only Numeric Value is
> Allowed.   ";
> include 'signup.php';
> exit;
> //}elseif (empty($username)|| empty($password1) || empty($password2) ||
> empty($name) || empty($address) || empty($city) || empty($state) ||
> empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
> //echo "";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
> //echo "  style=font-size:11pt;>All fields are Mandatory
>   //";
> //include 'signup.php';
> }else{
> // checks if the username is in use
> $checkuser = mysql_query("SELECT username FROM id_users WHERE
> username='$username'");
> $username_exist = mysql_num_rows($checkuser);
> $referid = mysql_query("SELECT username FROM id_users WHERE
> username='$refer_id'");
> $referid_exist = mysql_num_rows($referid);
> if($username_exist != 0){
> echo "";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
> echo "  style=font-size:11pt;>I'm sorry but the username you specified has
> already been taken. Please pick another one.
>   ";
> unset($username);
> include 'signup.php';
> }elseif($referid_exist > 0){
> echo "";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
> echo "  style=font-size:11pt;>I'm sorry but the referral id doesn't exist. Please
> check the referral id or enter the valid one.
>   ";
> unset($username);
> include 'signup.php';
> }else{
> // this makes sure both passwords entered match
> if ($password1 != $password2) {
> die('Your passwords did not match.');
> }else{
> //}
> // now we insert it into the database
> //$password3 = md5($_POST['password1']);//
> $insert = "INSERT INTO id_users (username, password, name, address, city,
> state, code, phone, email, payment_status, member_status, total_member,
> refer_id)
> VALUES ('$username', '$password1', '$name', '$address', '$city', '$state',
> '$code', '$phone', '$email', '0', '0', '0', '$refer_id'); UPDATE id_users
> SET refer_id = '1' where username = 'refer_id';";
> $queries =
> preg_split("/;+(?=([^'|^\\\']*['|\\\'][^'|^\\\']*['|\\\'])*[^'|^\\\']*[^'|^\\\']$)/",
> $

Re: [PHP] Please Help Me ASAP

2009-04-09 Thread Jason Pruim



Jason Pruim

On Apr 9, 2009, at 11:03 PM, kunal sharma  wrote:


Hello,
I'm building my own website without any knowledge of PHP, & i'm  
almost done

with that..as my website works fine on my local server
i:e WAMPSERVER 2.0,
but the same code is not working on server...n i'm rilli 'd of  
coz of

that...

The error is :"PHP Parse error: syntax error, unexpected $end in
/home/usang2me/public_html/sign_up.php on line 145"

"145" happens to be last line i:e "?>" , but here becoz of  
pattern..itz not

into its proper way...

&
After filling the sign up form correctly . it says ALL FIELD ARE
MANDATORYi dont understand ...y soi'm pasting my code  
here...please

help me asap ...
each and every suggestion will be appreciat'd



Here Is The Code:

if (strlen($username) < $minuser_len || strlen($password1) <  
$minpass_len ||

strlen($code) < $mincode_len || strlen($phone) < $minphone_len)
{
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " style=font-size:11pt;>Minimum length values for Username or  
Password or

Pincode or Mobile is missing. Please try again with correct
values.   ";
include 'signup.php';
exit;
//die("User/password was not long enough!");
}elseif (!is_numeric($code) || !is_numeric($phone)){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " style=font-size:11pt;>Non Numeric Character Where only Numeric  
Value is

Allowed.   ";
include 'signup.php';
exit;
//}elseif (empty($username)|| empty($password1) || empty($password2)  
||

empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
//echo "";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo "";
//echo " style=font-size:11pt;>All fields are Mandatoryp>

  //";
//include 'signup.php';
}else{
// checks if the username is in use
$checkuser = mysql_query("SELECT username FROM id_users WHERE
username='$username'");
$username_exist = mysql_num_rows($checkuser);
$referid = mysql_query("SELECT username FROM id_users WHERE
username='$refer_id'");
$referid_exist = mysql_num_rows($referid);
if($username_exist != 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " I'm sorry but the username you specified has
already been taken. Please pick another one.td>

  ";
unset($username);
include 'signup.php';
}elseif($referid_exist > 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " style=font-size:11pt;>I'm sorry but the referral id doesn't  
exist. Please
check the referral id or enter the valid one.td>

  ";
unset($username);
include 'signup.php';
}else{
// this makes sure both passwords entered match
if ($password1 != $password2) {
die('Your passwords did not match.');
}else{
//}
// now we insert it into the database
//$password3 = md5($_POST['password1']);//
$insert = "INSERT INTO id_users (username, password, name, address,  
city,
state, code, phone, email, payment_status, member_status,  
total_member,

refer_id)
VALUES ('$username', '$password1', '$name', '$address', '$city',  
'$state',
'$code', '$phone', '$email', '0', '0', '0', '$refer_id'); UPDATE  
id_users

SET refer_id = '1' where username = 'refer_id';";
$queries =
preg_split("/;+(?=([^'|^\\\']*['|\\\'][^'|^\\\']*['|\\\'])*[^'|^\\ 
\']*[^'|^\\\']$)/",

$insert);
foreach ($queries as $query){
if (strlen(trim($query)) != 0) mysql_query($query) or  
die(mysql_error());

}
//mysql_query($insert) or die(mysql_error());
//mysql_close();

//$update = "update id_users set refer_id='1' where  
username='refer_id'";

//mysql_query($update) or die(mysql_error());
//mysql_close();
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " You have successfully Registered, Please
Login   ";
include 'login.php';
}
}
}
?>

Thanks Kunal


Just based on a quick look i'd guess you don't have the right number  
of curly braces at the end of the file. 


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



RE: [PHP] Please help me

2007-01-02 Thread Peter Lauri
I also use PHPmailer to send emails. However it is good to do it the 'hard'
way once to learn about mailing headers etc.

Best regards,
Peter Lauri

www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free



-Original Message-
From: Steven Macintyre [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 02, 2007 2:44 PM
To: php-general@lists.php.net
Subject: RE: [PHP] Please help me

> When I send a mail using php using mail(), and using html tags in
> message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

I use phpmailer for all my email sending ... 

Never had a problem with it

S

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

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



RE: [PHP] Please help me

2007-01-02 Thread Steven Macintyre
> When I send a mail using php using mail(), and using html tags in
> message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

I use phpmailer for all my email sending ... 

Never had a problem with it

S

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



Re: [PHP] Please help me

2007-01-02 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-02 15:35:26 +0530:
> my problem got solved in gmail, but now i am not getting mails any where
> else...
> headers now i am using is:
> 
> $headers = 'MIME-Version: 1.0'."*\n*".'Content-type:
> text/html;charset=iso-8859-1'."*\n*".'Content-Transfer-Encoding:
> 8bit'."*\n*".'From:'.$sitename."*\n*".'return-path:'.$from;

If and when you're interested in doing your job right instead of blindly
trying whatever shmuck your /dev/random can generate, read about the email
message format at

ftp://ftp.rfc-editor.org/in-notes/rfc2045.txt
ftp://ftp.rfc-editor.org/in-notes/rfc2821.txt
ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



Re: [PHP] Please help me

2007-01-02 Thread Jochem Maas
use and/or study this nice bit of code (well I like it anyway, Manuel Lemos 
probably
diagrees :-) 

http://phpmailer.sourceforge.net/



Anju Prasad wrote:
> my problem got solved in gmail, but now i am not getting mails any where
> else...
> headers now i am using is:
> 
> $headers = 'MIME-Version: 1.0'."*\n*".'Content-type:
> text/html;charset=iso-8859-1'."*\n*".'Content-Transfer-Encoding:
> 8bit'."*\n*".'From:'.$sitename."*\n*".'return-path:'.$from;
> 
> 
> On 1/2/07, Stut <[EMAIL PROTECTED]> wrote:
>>
>> Please don't reply to me directly. Always include the list in replies.
>>
>> Anju Prasad wrote:
>> > Headers i am using:
>> > $headers = "MIME-Version: 1.0*\r\n*
>> > Content-type:
>> text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit
>> > *\r\n\r\n*From:$sitename*\r\n*return-path:
>> > $from";
>> >
>> > Message body:
>> >
>> > $message = 'Hi '.$_POST[name1
>> > ].' '.$message.'Regards '.
>> > $sitename.' ' ;
>> > Now tell is there any wrong in this syntax
>>
>> There's something wrong with that syntax.
>>
>> Assuming it's not your mail client wrapping the line above, you have two
>> newlines between the MIME-Version header and the Content-Type header.
>> This will cause the headers after MIME-Version to be ignored.
>>
>> -Stut
>>
>> >
>> > On 1/2/07, *Stut* <[EMAIL PROTECTED] > wrote:
>> >
>> > Anju Prasad wrote:
>> > > I am doing that but still not getting any fruitful results.
>> >
>> > Show us exactly what you're doing. If your mail client is not
>> > displaying
>> > the email as HTML one of two things is happening. 1) You're not
>> > telling
>> > it it's an HTML email, or 2) your mail client is ignoring the
>> headers
>> > and displaying the raw message. I'm gonna go with the former since
>> > hopefully you'd remember if you'd told your mail client to do the
>> > latter.
>> >
>> > -Stut
>> >
>> > > On 1/2/07, zoticaic <[EMAIL PROTECTED]
>> > > wrote:
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> > My Seeding Blog | http://bytes.nullp0inter.com
>> > >> > Hire me as Freelancer |
>> > >> http://www.getafreelancer.com/affiliates/shockx/
>> > >> > -Original Message-
>> > >> > From: Anju Prasad [mailto:[EMAIL PROTECTED]
>> > ]
>> > >> > Sent: Tuesday, January 02, 2007 5:13 PM
>> > >> > To: php-general@lists.php.net
>> > >
>> > >> > Subject: [PHP] Please help me
>> > >> >
>> > >> > When I send a mail using php using mail(), and using html tags
>> in
>> > >> message
>> > >> > body , these tags are being displayed as it is.
>> > >> > Please let me know if there's any way of how to tackle with
>> this.
>> > >>
>> > >> You need to add some headers that should indicate that the type
>> > of mail
>> > >> you are
>> > >> sending is an HTML email.
>> > >>
>> > >> Take this link from our friendly manual and see through
>> Example 4
>> :
>> > >> Sending HTML
>> > >> Emails
>> > >> http://www.php.net/manual/en/function.mail.php
>> > 
>> > >>
>> > >> HTH
>> > >> Jervin
>> > >>
>> > >>
>> > >
>> >
>> >
>>
>>
> 

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



Re: [PHP] Please help me

2007-01-02 Thread Anju Prasad

my problem got solved in gmail, but now i am not getting mails any where
else...
headers now i am using is:

$headers = 'MIME-Version: 1.0'."*\n*".'Content-type:
text/html;charset=iso-8859-1'."*\n*".'Content-Transfer-Encoding:
8bit'."*\n*".'From:'.$sitename."*\n*".'return-path:'.$from;


On 1/2/07, Stut <[EMAIL PROTECTED]> wrote:


Please don't reply to me directly. Always include the list in replies.

Anju Prasad wrote:
> Headers i am using:
> $headers = "MIME-Version: 1.0*\r\n*
> Content-type:
text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit
> *\r\n\r\n*From:$sitename*\r\n*return-path:
> $from";
>
> Message body:
>
> $message = 'Hi '.$_POST[name1
> ].' '.$message.'Regards '.
> $sitename.' ' ;
> Now tell is there any wrong in this syntax

There's something wrong with that syntax.

Assuming it's not your mail client wrapping the line above, you have two
newlines between the MIME-Version header and the Content-Type header.
This will cause the headers after MIME-Version to be ignored.

-Stut

>
> On 1/2/07, *Stut* <[EMAIL PROTECTED] > wrote:
>
> Anju Prasad wrote:
> > I am doing that but still not getting any fruitful results.
>
> Show us exactly what you're doing. If your mail client is not
> displaying
> the email as HTML one of two things is happening. 1) You're not
> telling
> it it's an HTML email, or 2) your mail client is ignoring the
headers
> and displaying the raw message. I'm gonna go with the former since
> hopefully you'd remember if you'd told your mail client to do the
> latter.
>
> -Stut
>
> > On 1/2/07, zoticaic <[EMAIL PROTECTED]
> > wrote:
> >>
> >>
> >>
> >> --
> >> > My Seeding Blog | http://bytes.nullp0inter.com
> >> > Hire me as Freelancer |
> >> http://www.getafreelancer.com/affiliates/shockx/
> >> > -Original Message-
> >> > From: Anju Prasad [mailto:[EMAIL PROTECTED]
> ]
> >> > Sent: Tuesday, January 02, 2007 5:13 PM
> >> > To: php-general@lists.php.net 
> >> > Subject: [PHP] Please help me
> >> >
> >> > When I send a mail using php using mail(), and using html tags
in
> >> message
> >> > body , these tags are being displayed as it is.
> >> > Please let me know if there's any way of how to tackle with
this.
> >>
> >> You need to add some headers that should indicate that the type
> of mail
> >> you are
> >> sending is an HTML email.
> >>
> >> Take this link from our friendly manual and see through Example 4
:
> >> Sending HTML
> >> Emails
> >> http://www.php.net/manual/en/function.mail.php
> 
> >>
> >> HTH
> >> Jervin
> >>
> >>
> >
>
>




Re: [PHP] Please help me

2007-01-02 Thread Stut

Please don't reply to me directly. Always include the list in replies.

Anju Prasad wrote:
Headers i am using: 
$headers = "MIME-Version: 1.0*\r\n*

Content-type: text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit
*\r\n\r\n*From:$sitename*\r\n*return-path:
$from";

Message body:

$message = 'Hi '.$_POST[name1
].' '.$message.'Regards '.
$sitename.' ' ;
Now tell is there any wrong in this syntax


There's something wrong with that syntax.

Assuming it's not your mail client wrapping the line above, you have two 
newlines between the MIME-Version header and the Content-Type header. 
This will cause the headers after MIME-Version to be ignored.


-Stut



On 1/2/07, *Stut* <[EMAIL PROTECTED] > wrote:

Anju Prasad wrote:
> I am doing that but still not getting any fruitful results.

Show us exactly what you're doing. If your mail client is not
displaying
the email as HTML one of two things is happening. 1) You're not
telling
it it's an HTML email, or 2) your mail client is ignoring the headers
and displaying the raw message. I'm gonna go with the former since
hopefully you'd remember if you'd told your mail client to do the
latter.

-Stut

> On 1/2/07, zoticaic <[EMAIL PROTECTED]
> wrote:
>>
>>
>>
>> --
>> > My Seeding Blog | http://bytes.nullp0inter.com
>> > Hire me as Freelancer |
>> http://www.getafreelancer.com/affiliates/shockx/
>> > -Original Message-
>> > From: Anju Prasad [mailto:[EMAIL PROTECTED]
]
>> > Sent: Tuesday, January 02, 2007 5:13 PM
>> > To: php-general@lists.php.net 
>> > Subject: [PHP] Please help me
>> >
>> > When I send a mail using php using mail(), and using html tags in
>> message
>> > body , these tags are being displayed as it is.
>> > Please let me know if there's any way of how to tackle with this.
>>
>> You need to add some headers that should indicate that the type
of mail
>> you are
>> sending is an HTML email.
>>
>> Take this link from our friendly manual and see through Example 4 :
>> Sending HTML
>> Emails
>> http://www.php.net/manual/en/function.mail.php

>>
>> HTH
>> Jervin
>>
>>
>




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



Re: [PHP] Please help me

2007-01-02 Thread Anju Prasad

actually this problem i am getting only when sending mail in gmail,
otherwise everywhere its coming correctly and fine

On 1/2/07, Anju Prasad < [EMAIL PROTECTED]> wrote:


Headers i am using:
$headers = "MIME-Version: 1.0*\r\n*
Content-type: text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit
*\r\n\r\n*From:$sitename*\r\n*
return-path:
$from";

Message body:


$message = 'Hi '.$_POST[name1
].' '.$message.'Regards '
.
$sitename.' ' ;
Now tell is there any wrong in this syntax



On 1/2/07, Stut < [EMAIL PROTECTED]> wrote:
>
> Anju Prasad wrote:
> > I am doing that but still not getting any fruitful results.
>
> Show us exactly what you're doing. If your mail client is not displaying
> the email as HTML one of two things is happening. 1) You're not telling
> it it's an HTML email, or 2) your mail client is ignoring the headers
> and displaying the raw message. I'm gonna go with the former since
> hopefully you'd remember if you'd told your mail client to do the
> latter.
>
> -Stut
>
> > On 1/2/07, zoticaic <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>
> >> --
> >> > My Seeding Blog | http://bytes.nullp0inter.com
> >> > Hire me as Freelancer |
> >> http://www.getafreelancer.com/affiliates/shockx/
> >> > -Original Message-
> >> > From: Anju Prasad [mailto:[EMAIL PROTECTED]
> >> > Sent: Tuesday, January 02, 2007 5:13 PM
> >> > To: php-general@lists.php.net
> >> > Subject: [PHP] Please help me
> >> >
> >> > When I send a mail using php using mail(), and using html tags in
> >> message
> >> > body , these tags are being displayed as it is.
> >> > Please let me know if there's any way of how to tackle with this.
> >>
> >> You need to add some headers that should indicate that the type of
> mail
> >> you are
> >> sending is an HTML email.
> >>
> >> Take this link from our friendly manual and see through Example 4 :
> >> Sending HTML
> >> Emails
> >> http://www.php.net/manual/en/function.mail.php
> >>
> >> HTH
> >> Jervin
> >>
> >>
> >
>
>



RE: [PHP] Please help me

2007-01-02 Thread zoticaic
1. Try displaying the message first on the browser and see if it renders
properly.

2. Try viewing the headers of the actual sent message and check if they are
properly transmitted. Sometimes spaces/punctuations or typo errors on header
generation wholly disregards our intent on sending HTML type emails.

 

--
> Outsource Now | GetAFreelancer
<http://www.getafreelancer.com/affiliates/shockx/> 

  _  

From: Anju Prasad [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 02, 2007 5:26 PM
To: zoticaic
Cc: php-general@lists.php.net
Subject: Re: [PHP] Please help me

 

I am doing that but still not getting any fruitful results. 

On 1/2/07, zoticaic <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:



--
> My Seeding Blog | http://bytes.nullp0inter.com
> Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/
> -Original Message-
> From: Anju Prasad [mailto: [EMAIL PROTECTED]
> Sent: Tuesday, January 02, 2007 5:13 PM
> To: php-general@lists.php.net
> Subject: [PHP] Please help me 
>
> When I send a mail using php using mail(), and using html tags in message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this. 

You need to add some headers that should indicate that the type of mail you are
sending is an HTML email.

Take this link from our friendly manual and see through Example 4 : Sending HTML
Emails
http://www.php.net/manual/en/function.mail.php

HTH
Jervin

 



Re: [PHP] Please help me

2007-01-02 Thread Stut

Anju Prasad wrote:

I am doing that but still not getting any fruitful results.


Show us exactly what you're doing. If your mail client is not displaying 
the email as HTML one of two things is happening. 1) You're not telling 
it it's an HTML email, or 2) your mail client is ignoring the headers 
and displaying the raw message. I'm gonna go with the former since 
hopefully you'd remember if you'd told your mail client to do the latter.


-Stut


On 1/2/07, zoticaic <[EMAIL PROTECTED]> wrote:




--
> My Seeding Blog | http://bytes.nullp0inter.com
> Hire me as Freelancer | 
http://www.getafreelancer.com/affiliates/shockx/

> -Original Message-
> From: Anju Prasad [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 02, 2007 5:13 PM
> To: php-general@lists.php.net
> Subject: [PHP] Please help me
>
> When I send a mail using php using mail(), and using html tags in
message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

You need to add some headers that should indicate that the type of mail
you are
sending is an HTML email.

Take this link from our friendly manual and see through Example 4 :
Sending HTML
Emails
http://www.php.net/manual/en/function.mail.php

HTH
Jervin






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



Re: [PHP] Please help me

2007-01-02 Thread Anju Prasad

I am doing that but still not getting any fruitful results.

On 1/2/07, zoticaic <[EMAIL PROTECTED]> wrote:




--
> My Seeding Blog | http://bytes.nullp0inter.com
> Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/
> -Original Message-
> From: Anju Prasad [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 02, 2007 5:13 PM
> To: php-general@lists.php.net
> Subject: [PHP] Please help me
>
> When I send a mail using php using mail(), and using html tags in
message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

You need to add some headers that should indicate that the type of mail
you are
sending is an HTML email.

Take this link from our friendly manual and see through Example 4 :
Sending HTML
Emails
http://www.php.net/manual/en/function.mail.php

HTH
Jervin




RE: [PHP] Please help me

2007-01-02 Thread zoticaic


--
> My Seeding Blog | http://bytes.nullp0inter.com
> Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/
> -Original Message-
> From: Anju Prasad [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 02, 2007 5:13 PM
> To: php-general@lists.php.net
> Subject: [PHP] Please help me
> 
> When I send a mail using php using mail(), and using html tags in message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

You need to add some headers that should indicate that the type of mail you are
sending is an HTML email.

Take this link from our friendly manual and see through Example 4 : Sending HTML
Emails 
http://www.php.net/manual/en/function.mail.php

HTH
Jervin

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



Re: [PHP] Please help me with in_array

2006-08-04 Thread Jochem Maas
Chris G wrote:
> I have already tried using
>  
> foreach($_GET['question'] as $key => $value)
>  
> the in_array function does not work with it for some reason.

'does not work with it' ??

use var_dump(); to see what's actually in your variables.

> 
>  
> On 8/5/06, *Jochem Maas* <[EMAIL PROTECTED]
> > wrote:
> 

> foreach($_GET['question'] as $key => $value) {
> 

var_dump($key, $value);

> >  if(!in_array($key, $_SESSION['question'])) {
> >   print "not matched lets update".
> > "$_GET[question][$key]"; // HERE I WANT IT TO
> SHOW $key
> > is 10 and its value should be 1 (as printed in the Array above)
> >  }
> > else {
> >  print "matched";
> >  }
> > }
> >
> >
> >
> > Where it gets to the section "not matched" I need to print out
> from the
> > question array question[$key][$value] (question '10' => '1' as above)
> >
> >
> >
> > I am not sure if I am even making sense here anymore...
> >
> > Thanks in advance
> >
> >
> > Chris
> >
> 
> 

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



Re: [PHP] Please help me with in_array

2006-08-04 Thread Jochem Maas
Chris G wrote:
> Hi all
> 
> I have been stuck on this problem for 4 hours. Please anyone that can help
> here I would appreciate it.
> 
> If I print_r($_GET) I have
> 
> Array ([question] => Array ( [10] => 1 [11] => 2 [12] => 1 [13] => 1)'
> 
> 
> So now I try
> 
> foreach($_GET['question'] as $key) {

foreach($_GET['question'] as $key => $value) {

>  if(!in_array($key, $_SESSION['question'])) {
>   print "not matched lets update".
> "$_GET[question][$key]"; // HERE I WANT IT TO SHOW $key
> is 10 and its value should be 1 (as printed in the Array above)
>  }
> else {
>  print "matched";
>  }
> }
> 
> 
> 
> Where it gets to the section "not matched" I need to print out from the
> question array question[$key][$value] (question '10' => '1' as above)
> 
> 
> 
> I am not sure if I am even making sense here anymore...
> 
> Thanks in advance
> 
> 
> Chris
> 

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



RE: [PHP] Please help me with a query

2006-06-13 Thread Jef Sullivan
Your query is wrong. You are selecting only one result yet you are 
referencing three. I suggest...

SELECT * FROM centers ORDER BY idc asc


Jef

-Original Message-
From: Jesús Alain Rodríguez Santos [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 13, 2006 8:49 AM
To: php-general@lists.php.net
Subject: [PHP] Please help me with a query

First of all I'm sorry for my english I don't know speak very well, I will 
try to explain it, I hope you understain what I need.

I have two tables: centers and peoples, in table centers I have the centers 
values and in table peoples I have the peoples values and in table columns 
center the id corresponding the center.

db:
centers
id  nameccorreoc   telc
1 Cienfuegos  [EMAIL PROTECTED]  4534345
2   Havana [EMAIL PROTECTED] 4643765
3  Santiago[EMAIL PROTECTED]  3453453

peoples
idnamed   center  correod 
cargod
1 Albert  1   [EMAIL PROTECTED] 
sfgsdfgsdfgsdfg
2  Julio1  [EMAIL PROTECTED] 
sadfsgfdsfgfdsg
3 Sussan 2  [EMAIL PROTECTED] 
gjfhjfhjfhjfg
4 Peter2  [EMAIL PROTECTED] 
fgjhfgjgfjhjjghj

And the query and script to generate the tables for each centers list is:

$centers = mysql_query("SELECT namec FROM centers ORDER BY idc asc", 
$connect);

while ($centerss = mysql_fetch_array($centers, MYSQL_ASSOC)) {
   echo "";
echo "";
echo "".$centerss['namec']."";
echo "mailto:".$centerss['correoc'].">".$centerss['correoc']."";
echo "".$centerss['telc']."";
echo "";
echo "";
}
mysql_free_result($centers);

That's generate one table with one row and three columns for each center, 
but, I would like to generate more rows and 3 columns in each table with the 
named, correod and cargod of peoples corresponding the center, I mean, print 
the centers values with the peoples corresponding this center, in one table 
each one.

I hope you understaind what I need, if not polease let me know.

regards Alain


-- 
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.

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

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



Re: [PHP] Please help me with a query

2006-06-13 Thread Jochem Maas
if you want to ask a question don't be so lazy as to
simply reply to a post in an existing thread - it's considered
rude.

send a new email.

Jesús Alain Rodríguez Santos wrote:

...

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



Re: [PHP] please help me I try to post my question to Php.net 2-3 times

2006-02-16 Thread Kim Christensen
On 2/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> $filename =3D "c:data.txt";
> $contents =3D file($filename);
> echo $contents;
> ?>
> // data in text file is "1_2_3_4" < _ =3D blank>
> // output is "1 2 3 4"
> // I want fixed possition . please help me ?

I'm not really sure what you're trying to do, but I assume you want to
keep the four(?) spaces when you output the data. If you're going to
display it using HTML, you have to replace the spaces with   -
otherwise HTML truncates the excess whitespace. Try using REGEX:

$contents =3D file($filename);
echo preg_replace("/\s/", " ", $contents);

This regular expression will replace all whitespace
(spaces/newlines/carriage returns) with the character  , which in
HTML yields a blank space.

--
Kim Christensen
[EMAIL PROTECTED]

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



Re: [PHP] please help me I try to post my question to Php.net 2-3times

2006-02-16 Thread Hugh Danaher
wvolks wrote "...but when I display data in text file it compress space in 
each lines..."  Sounded to me like he wanted all the blank spaces he put 
into the string, but when he "displayed" it, the spaces were gone.  Since 
html ignores more than one blank space between printable characters, I 
suggested he substitute   for the blank spaces.  He also said "I want 
fixed possition . please help me ?", and so I tried to help.

Regards,
HTD
- Original Message - 
From: "Barry" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, February 16, 2006 12:37 AM
Subject: Re: [PHP] please help me I try to post my question to Php.net 
2-3times




Hugh Danaher wrote:

If you want to preserve the blank spaces then try;

str_replace(" ", " ", $contents); //   is html for blank space.
HTH
HTD


no he don't:
qote:

> read text file to array string


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 2/10/2006






--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 2/10/2006

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



Re: [PHP] please help me I try to post my question to Php.net 2-3 times

2006-02-16 Thread Barry

Hugh Danaher wrote:

If you want to preserve the blank spaces then try;

str_replace(" ", " ", $contents); //   is html for blank space.
HTH
HTD


no he don't:
qote:

> read text file to array string


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Re: [PHP] please help me I try to post my question to Php.net 2-3 times

2006-02-16 Thread Hugh Danaher

If you want to preserve the blank spaces then try;

str_replace(" ", " ", $contents); //   is html for blank space.
HTH
HTD
- Original Message - 
From: <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, February 15, 2006 10:26 PM
Subject: [PHP] please help me I try to post my question to Php.net 2-3 times



text file problem

read text file to array string. I use function File(). but when I display
data in text file it compress space in each lines such as first record
contain "1_2__3__4__" ( _ = blank )
when store in array string is "1 2 3 4" . I want you tell me howto do?
+

// data in text file is "1_2_3_4" < _ = blank>
// output is "1 2 3 4"
// I want fixed possition . please help me ?
from Wvolks

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



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 2/10/2006






--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 2/10/2006

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



Re: [PHP] please help me send html email from php scripts instead of simple text

2005-04-28 Thread John Nichel
Carraccia, Giuseppe wrote:
Hello, can you please help me send an html email using php instead of
just simple text output.  I'm trying to have the user fill out a form (
https://www.smilerochester.com/medical_form.html ) and have the exact
same form emailed to me with the same pretty format of a form instead of
just a variable name and the value.  
 
Do you think you can give me a hand?
Google can...
http://www.google.com/search?q=php+send+html+email
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] please help me send html email from php scripts instead of simple text

2005-04-28 Thread Richard Davey
Hello Giuseppe,

Thursday, April 28, 2005, 2:22:20 PM, you wrote:

CG> Hello, can you please help me send an html email using php instead of
CG> just simple text output.  I'm trying to have the user fill out a form (
CG> https://www.smilerochester.com/medical_form.html ) and have the exact
CG> same form emailed to me with the same pretty format of a form instead of
CG> just a variable name and the value.  

Save yourself some hassle and use the excellent free PHPMailer class
library. http://phpmailer.sourceforge.net

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I do not fear computers. I fear the lack of them." - Isaac Asimov

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



RE: [PHP] Please help me understand gmmktime()

2004-02-12 Thread Ford, Mike [LSS]
On 11 February 2004 20:26, Richard Day wrote:

> Hello:
> 
> 
> Environment:
> Linux server
> PHP 4.3.4
> 
> This code:
> 
> echo ''.strftime('%T %Z',mktime()).', Timestamp='.mktime();
> echo ''.strftime('%T GMT',gmmktime()).',
> Timestamp='.gmmktime();
> 
> yields this result:
> 
> 23:52:08 EST, Timestamp=1076475128
> 18:52:08 GMT, Timestamp=1076457128
> 
> Why? GMT should be 5 hours ahead of EST, not 5 behind. Right?
> What am I
> missing here??

Well, that looks very suspicious, and probably not for the reasons you're
thinking.

I can explain why you get that result, but it means that either (a) there's
a bug in gmmktime(), or (b) the documentation for gmmktime() is wrong (or,
at least, misleading).  So, let's take it step-by-step:

1. gmmktime(), according to the manual, should use the "current
corresponding GMT value" for it's omitted arguments.
2. In my book, at 23:52:08 EST that means it should be using 04:52:08 GMT on
the following day (we'll discuss this later, since, whilst giving a
different result, it still wouldn't produce what you're expecting!).
3. However, let's guess that gmmktime() is actually using the *local* time
value of 23:52:08, but treating it as if it were GMT.
4. In which case, you'll get a timestamp for 23:52:08 GMT.
5. Because timestamps are absolute (not adjusted for timezone), this is also
the timestamp for 18:52:08 EST.
6. 18:52:08 is what you're getting printed.
7. QED.

This behaviour is *not* what the manual says should happen, and in my
opinion is counter-intuitive.  However, if gmmktime() were to behave as the
manual, at least how I read it, suggests, this is what would happen:

1. gmmktime() would calculate a timestamp for 04:52:08 GMT (next day).
2. Because timestamps are absolute, this is also the timestamp for 23:52:08
EST.
3. So strftime() still outputs 23:52:08.

Ergo, this is not the way to produce an adjusted time.  One way to do what
you're looking for is to feed the same timestamp to date('%H:%i:%s') and
gmdate('%H:%i:%s).  If you want something you can feed to strftime() for the
GMT date, you need to acquire your timezone's offset from GMT in seconds
(e.g. with date('Z');) and subtract that from the timestamp.

HTH

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Please help me with this. (Retriving info from mySQL database and then put it in combo box)

2004-01-31 Thread Raditha Dissanayake
Hello
This is a PHP list not an activex list.
Radwan Aladdin wrote:

Hi all..

I have in my database the fields :"CourseTitle, Language1, Language2, Language3, Language4, Language5, Language6...Etc.."

Now what I want to make is : By using an ActiveX Control I want to retrive the values for these fields from the database.. so for example there are many rows there(In the database).. :

MS Word XP   EnglishFrench  Arabic

MS PowerPoint XPChinese French Arabic.Etc

MS Access XPChinese JapaneseEnglish.Etc

I want to retrive these rows and put them in two combo boxes  (CourseTitle and CourseLanguage).. the CourseTitle combo box contains the "CourseTitle values from the database. For example : MS Word XP, MS PowerPoint XP, MS Access XP...Etc " and the CourseLanguage combo box contains the "CourseLanguage values from the database for every CourseTitle. For example : MS Word XP has Englsih,French and Arabic languages.. so if the user chose MS Word XP then the CourseLanguage will show the languages for that Course.."

I hope you got my meaning..

So what I want is to import from the database then split these info into items inside the Combo box..

Best Regards..

 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Tom
Radwan Aladdin wrote:

Hi all

Is it possible in mySQL to put a timer that changes a value inside a row in a table every while?

For example : Add "1" to the value very 10 minutes for example.. Field number = 5 after ten minutes = 6 after another 10 minuste = 7..Etc..

Is it possible?And how?

Regards..

 

I am not aware of any such functionality within MySQL.

However if you have a one-one relationship between a period of time and 
an incremental,
could you not simply INSERT a timestamp and then compare with times with 
NOW,
and then divide by your time period?

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


RE: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Chris Kay


http://www.unixgeeks.org/security/newbie/unix/cron-1.html


Chris Kay (CK)
Eleet Internet Services
M: 0415 451 372
P: 02 4620 5076
F: 02 4620 7008
E: [EMAIL PROTECTED]

-Original Message-
From: Radwan Aladdin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 20 January 2004 9:05 PM
To: Nick JORDAN
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Please help me as fast as possible.. very important!!

Where can I fin tutorials about it? (CRON Tab)?

Regards..
- Original Message -
From: "Nick JORDAN" <[EMAIL PROTECTED]>
To: "Radwan Aladdin 
Sent: Tuesday, January 20, 2004 1:56 PM
Subject: Re: [PHP] Please help me as fast as possible.. very important!!


> > Is it possible in mySQL to put a timer that changes a value inside a 
> > row in a table every while?
>
> > For example : Add "1" to the value very 10 minutes for example..
> > Field number = 5 after ten minutes = 6 after another 10 minuste =
> 7..Etc..
>
>
> As far as I'm aware, that's not possible in MySQL, however you could 
> write a small script in PHP (or, indeed, some other language) which 
> would increment the counter, and which would be run at intervals via 
> cron (for instance).
>
> A better solution, however, would be to include a timestamp in your 
> database, then, when data is requested, calculate how many units of 
> ten minutes have passed and adjust your counter accordingly.
>
> Nick
>

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

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



RE: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Angelo Zanetti
Im not sure about php but if you are desperate then you could also do it in
VB with a timer control.

-Original Message-
From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Please help me as fast as possible.. very important!!
Importance: High


Hi all

Is it possible in mySQL to put a timer that changes a value inside a row in
a table every while?

For example : Add "1" to the value very 10 minutes for example.. Field
number = 5 after ten minutes = 6 after another 10 minuste = 7..Etc..

Is it possible?And how?

Regards..


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Mario
The only thing you need to know is that you enter a file in the cron dir (in
/etc I think) and you have the following line in that file:
52 10 * * * /usr/bin/php /home/mainwebsite_html/file.php

this line runs the file.php every day at 10.52

(min hour week month year) (php dir) (file location) - the star means any
day-month-year [i'm not sure if it's week month year or year month week]

If there is a cron.daily or monthly ...etc... you don't need to specify the
first part (date time stuff)

e.g.  /usr/bin/php /home/mainwebsite_html/file.php





- Original Message - 
From: "Radwan Aladdin" <[EMAIL PROTECTED]>
To: "Nick JORDAN" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, January 20, 2004 12:05 PM
Subject: Re: [PHP] Please help me as fast as possible.. very important!!


> Where can I fin tutorials about it? (CRON Tab)?
>
> Regards..
> - Original Message -
> From: "Nick JORDAN" <[EMAIL PROTECTED]>
> To: "Radwan Aladdin 
> Sent: Tuesday, January 20, 2004 1:56 PM
> Subject: Re: [PHP] Please help me as fast as possible.. very important!!
>
>
> > > Is it possible in mySQL to put a timer that changes a value inside a
> > > row in a table every while?
> >
> > > For example : Add "1" to the value very 10 minutes for example..
> > > Field number = 5 after ten minutes = 6 after another 10 minuste =
> > 7..Etc..
> >
> >
> > As far as I'm aware, that's not possible in MySQL, however you could
write
> > a small script in PHP (or, indeed, some other language) which would
> > increment the counter, and which would be run at intervals via cron (for
> > instance).
> >
> > A better solution, however, would be to include a timestamp in your
> > database, then, when data is requested, calculate how many units of ten
> > minutes have passed and adjust your counter accordingly.
> >
> > Nick
> >
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



RE: [PHP] Please help me as fast as possible.. very important!![Scanned]

2004-01-20 Thread Michael Egan
http://www.google.com/linux?hl=en&lr=&ie=ISO-8859-1&q=cron+tutorials&btnG=Google+Search

> -Original Message-
> From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
> Sent: 20 January 2004 10:05
> To: Nick JORDAN
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Please help me as fast as possible.. very
> important!![Scanned]
> 
> 
> Where can I fin tutorials about it? (CRON Tab)?
> 
> Regards..
> - Original Message -
> From: "Nick JORDAN" <[EMAIL PROTECTED]>
> To: "Radwan Aladdin 
> Sent: Tuesday, January 20, 2004 1:56 PM
> Subject: Re: [PHP] Please help me as fast as possible.. very 
> important!!
> 
> 
> > > Is it possible in mySQL to put a timer that changes a 
> value inside a
> > > row in a table every while?
> >
> > > For example : Add "1" to the value very 10 minutes for example..
> > > Field number = 5 after ten minutes = 6 after another 10 minuste =
> > 7..Etc..
> >
> >
> > As far as I'm aware, that's not possible in MySQL, however 
> you could write
> > a small script in PHP (or, indeed, some other language) which would
> > increment the counter, and which would be run at intervals 
> via cron (for
> > instance).
> >
> > A better solution, however, would be to include a timestamp in your
> > database, then, when data is requested, calculate how many 
> units of ten
> > minutes have passed and adjust your counter accordingly.
> >
> > Nick
> >
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



Re: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Radwan Aladdin
Where can I fin tutorials about it? (CRON Tab)?

Regards..
- Original Message -
From: "Nick JORDAN" <[EMAIL PROTECTED]>
To: "Radwan Aladdin 
Sent: Tuesday, January 20, 2004 1:56 PM
Subject: Re: [PHP] Please help me as fast as possible.. very important!!


> > Is it possible in mySQL to put a timer that changes a value inside a
> > row in a table every while?
>
> > For example : Add "1" to the value very 10 minutes for example..
> > Field number = 5 after ten minutes = 6 after another 10 minuste =
> 7..Etc..
>
>
> As far as I'm aware, that's not possible in MySQL, however you could write
> a small script in PHP (or, indeed, some other language) which would
> increment the counter, and which would be run at intervals via cron (for
> instance).
>
> A better solution, however, would be to include a timestamp in your
> database, then, when data is requested, calculate how many units of ten
> minutes have passed and adjust your counter accordingly.
>
> Nick
>

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



RE: [PHP] Please help me as fast as possible.. very important!![Scanned]

2004-01-20 Thread Michael Egan
I've never done it but I can only imagine you'd need to run some sort of CRON job to 
effect this at regular intervals.

HTH,

Michael Egan

> -Original Message-
> From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
> Sent: 20 January 2004 09:45
> To: [EMAIL PROTECTED]
> Subject: [PHP] Please help me as fast as possible.. very 
> important!![Scanned]
> Importance: High
> 
> 
> Hi all
> 
> Is it possible in mySQL to put a timer that changes a value 
> inside a row in a table every while?
> 
> For example : Add "1" to the value very 10 minutes for 
> example.. Field number = 5 after ten minutes = 6 after 
> another 10 minuste = 7..Etc..
> 
> Is it possible?And how?
> 
> Regards..
> 

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



Re: [PHP] Please help me retrieving data from a PHP file!!???

2004-01-16 Thread John W. Holmes
SASSINC Internet Solutions - Arabic Department wrote:

How to retrieve data from a PHP file? 
(The value that will be retrieved of course 
it is echoed in the PHP file, and it will be 
shown in a TextBox in my VB program.. so I want 
to retrieve it to my EXE VB program that will 
put it inside a TextBox or something like that..)
So you have a PHP file that does (for example)



And you want to retrieve it's results, i.e. the "Hello" string?

Like someone else said, you need to ask this on a VB list. You need to 
determine how to run a program from within VB to run php from the 
command line or open a web interface and retrieve the results of a web 
file. This is not a PHP specific problem.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] Please help me with these questions..

2004-01-16 Thread Richard Davey
Hello,

Friday, January 16, 2004, 11:54:26 AM, you wrote:

SISAD> I'm a beginner in PHP.. And I'm working on a project..
SISAD> I want your help please to learn how to :

SISAD> 1- MD5 with PHP values.

$md5 = md5($variable);

SISAD> 2- Random values in PHP.

$min = 1;
$max = 100;
$random = mt_rand($min, $max);

SISAD> 3- Inserting values to mySQL DB by PHP and importing
SISAD> from them also to send echo. (For example : after MD5 some
SISAD> strings in PHP I want to insert them into the database also
SISAD> then to echo these MD5 strings).

Depends on your table structure, there are hundreds of tutorials
covering this on the web.

SISAD> 4- How to echo something.

echo "something";

;)

SISAD> 5- How to make some GET values like :
SISAD> http://www.mysitename.com/test.php?username=abc then insert
SISAD> them to the database.

$username = $_GET['username'];

***Strongly*** suggest you download yourself a copy of the PHP manual,
I am on a Windows PC so personally I use the CHM version for speed and
built-in searching. You can find example code for ALL of the questions
you asked in there.

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

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



Re: [PHP] Please HELP me

2003-07-27 Thread Peter James
You're not giving us much to work with here.  What's the actual problem?

Regardless, I can see a couple of thing wrong here.

1. You're trying to do a multipart/form-data transfer using GET.  You need
to use POST.
2. Unless you've got register_globals on, and even if you do, you should be
referencing your uploaded file with $_FILES['util']['tmp_name']
3. You should read the manual here:http://ca2.php.net/features.file-upload

HTH.
Pete.

--
Peter James
[EMAIL PROTECTED]

php|architect
The Magazine for PHP Professionals
http://www.phparch.com


- Original Message - 
From: "Rausch Alexandru" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 26, 2003 8:50 PM
Subject: [PHP] Please HELP me


I have some problem with uploading a file from my harddisk using a ftp
connection.
Here are the 2 files:

test.php contains the form:




Titlu gif
 :: 





and test2.php is the script for upload :

";
}


$util=strtolower($util);

$destination="tit.gif";
if(ftp_put($con, $destination, $util, FTP_BINARY)){echo "OK ,am pus titlul
";}
else{ echo "eroare";$error=1;}

?>

Thanks in advanced





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



Re: [PHP] please help me, y have a error

2003-01-05 Thread Marek Kilimajer
Means php tried to access memory page address it did not have. Try to
find out if it was php itself or a loaded module, then upgrade the 
offending
part and see if it still happens again.

Ysrael Guzmán wrote:

this is the message of the ERROR:


PHP has encountered an Access Violation at 012B7DE7

what this


Ysrael Guzmán Meza



 



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




Re: [PHP] Please help me with this.

2001-05-11 Thread Young Chi-Yeung Fan

"Johan Vikerskog (ECS)" wrote:

> ok.
> I have this problem of mine which i dont know how to solve. therefor i use this 
>great mailing list.
>
> Lets say i have a URL that looks something like below. This URL was generated from a 
>program that starts netscape with this adress. This adress is of course wrong.
>
> http://adam:9000//usr/local/test/test.html
>
> I want to change it so it looks like below with simply starting another scripts that 
>modifies the HTTP_REFERER so it adds the full computer name to the adress window.
>
> I asked this one before but nobody answered. If it isnt possible to be done i can 
>understand it but i atleast wants to know if it is possible. To do it.
>
> http://adam.artwork.com:9000//user/local/test/test.html
>
> Anyone got any tips for me on how to do this?
> Please help me with this.
>

I don't quite understand your question. It looks you have a program that generates the 
wrong URL, in which case it won't reach a page you want to go to. If the server in
the URL is wrong, there's nothing you can do to fix it the problem using PHP. If the 
URL that is generated is to a server you have control over, you can just do a
redirect to the correct address (and you don't need PHP to do this).

Also, you can *read*  $HTTP_REFERER to find out which page linked to the PHP script -- 
so setting it is not meaningful.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]