php-windows Digest 12 Oct 2001 16:05:00 -0000 Issue 801
Topics (messages 9813 through 9826):
php question
9813 by: Brian Feliciano
9814 by: Chen Wei, Lian
9815 by: Brian Feliciano
9816 by: Brian Feliciano
9817 by: Brian Feliciano
9818 by: Chen Wei, Lian
9820 by: Brian Feliciano
Re: Data from local PC MySQL (or MSAccess) to remote UNIX ISP MySQL
9819 by: Kevin Truong
expecting a variable
9821 by: Brian Feliciano
9822 by: Jonathan David Edwin Wright
text formatting in database article
9823 by: Mark Hope
9826 by: Mark Hope
4.06 CGI IIS - MAIL abnormalities
9824 by: Matthew Luchak
CORRECTION: 4.06 CGI IIS - MAIL abnormalities
9825 by: Matthew Luchak
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
ive been using ASP and now i'dlike to try PHP.
But i cant seem find the counterpart of response.redirect to the PHP
language.
Pls. help. thanks.
--
B R I A N F E L I C I A N O
======================
Server Administrator
The Websense Group Co.
-----------------------------
Unit 103 Terris Villa Sikap St.
Mandaluyong City, Philippines
Tel. No.: (632) 7462449
Fax. No.: (632) 7462482
Mobile Phone No.: +639176189153
--- End Message ---
--- Begin Message ---
Hi Brian,
response.redirect actually just works like meta refresh, u can do it the
same using header() in php.
--
regards,
chen wei (http://www.cw213.net)
===================================
Solutions Developer of Earth9.com
===================================
Friday, October 12, 2001, 2:30:08 PM, you wrote:
BF> ive been using ASP and now i'dlike to try PHP.
BF> But i cant seem find the counterpart of response.redirect to the PHP
BF> language.
BF> Pls. help. thanks.
BF> --
BF> B R I A N F E L I C I A N O
BF> ======================
BF> Server Administrator
BF> The Websense Group Co.
BF> -----------------------------
BF> Unit 103 Terris Villa Sikap St.
BF> Mandaluyong City, Philippines
BF> Tel. No.: (632) 7462449
BF> Fax. No.: (632) 7462482
BF> Mobile Phone No.: +639176189153
--- End Message ---
--- Begin Message ---
thanks Ig!
is there a better way than this? What i am doing is a login page.
if the login is a success, then i will redirect it to the inside pages.
thanx!
> header("location: http://mydomain.com/index.php");
>
>
> ----- Original Message -----
> From: "Brian Feliciano" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, October 12, 2001 4:30 PM
> Subject: [PHP-WIN] php question
>
>
> > ive been using ASP and now i'dlike to try PHP.
> > But i cant seem find the counterpart of response.redirect to the PHP
> > language.
> >
> > Pls. help. thanks.
> > --
> >
> > B R I A N F E L I C I A N O
> > ======================
> > Server Administrator
> > The Websense Group Co.
> > -----------------------------
> > Unit 103 Terris Villa Sikap St.
> > Mandaluyong City, Philippines
> > Tel. No.: (632) 7462449
> > Fax. No.: (632) 7462482
> > Mobile Phone No.: +639176189153
> >
> >
> > --
> > PHP Windows 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]
> >
>
--- End Message ---
--- Begin Message ---
can i redirect using include/requre??
i think this like the serverside include for php...
> Hi,
>
> You can use Include or required instead !!
>
> Dan
>
> -----Original Message-----
> From: Brian Feliciano [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 12, 2001 8:39 AM
> To: Ignatius Teo; [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] php question
>
>
> thanks Ig!
> is there a better way than this? What i am doing is a login page.
> if the login is a success, then i will redirect it to the inside pages.
>
> thanx!
>
> > header("location: http://mydomain.com/index.php");
> >
> >
> > ----- Original Message -----
> > From: "Brian Feliciano" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, October 12, 2001 4:30 PM
> > Subject: [PHP-WIN] php question
> >
> >
> > > ive been using ASP and now i'dlike to try PHP.
> > > But i cant seem find the counterpart of response.redirect to the PHP
> > > language.
> > >
> > > Pls. help. thanks.
> > > --
> > >
> > > B R I A N F E L I C I A N O
> > > ======================
> > > Server Administrator
> > > The Websense Group Co.
> > > -----------------------------
> > > Unit 103 Terris Villa Sikap St.
> > > Mandaluyong City, Philippines
> > > Tel. No.: (632) 7462449
> > > Fax. No.: (632) 7462482
> > > Mobile Phone No.: +639176189153
> > >
> > >
> > > --
> > > PHP Windows 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]
> > >
> >
>
>
> --
> PHP Windows 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]
>
--- End Message ---
--- Begin Message ---
okay, this is what i want to do.
i have a login.php that asks the user to login.
and then if the login was successful the user will "redirected" to my
main.php.
and also if the user is already logged and went to my index.php, he will be
redirected immediately to main.php
i tried to do header("Location: main.php"); but it said that i "cannot add
header information".
pls. help.
--- End Message ---
--- Begin Message ---
Hi Brian,
u must use header() function before you output any contents to client
browser, and terminate ur script immediately after using it.
--
regards,
chen wei (http://www.cw213.net)
===================================
Solutions Developer of Earth9.com
===================================
Friday, October 12, 2001, 3:09:12 PM, you wrote:
BF> okay, this is what i want to do.
BF> i have a login.php that asks the user to login.
BF> and then if the login was successful the user will "redirected" to my
BF> main.php.
BF> and also if the user is already logged and went to my index.php, he will be
BF> redirected immediately to main.php
BF> i tried to do header("Location: main.php"); but it said that i "cannot add
BF> header information".
BF> pls. help.
--- End Message ---
--- Begin Message ---
im sorry, now it's ok. i just didn't wrong.
instead of header("Location:login.php"); i did header("Location=login.php");
> OK,
> This is first try:
>
> if ($submit) {
> file://checking variable from form
> if (everything OK) {
> include ("go.php");
> exit;
> } else {
> include ("error.php");
> exit;
> }
> }
> <form action="<?=$PHP_SELF ?>" ...................
>
>
> <input type="submit" ...
>
>
> Dan
> -----Original Message-----
> From: Brian Feliciano [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 12, 2001 9:09 AM
> To: Sichta Daniel; [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] php question
>
>
> okay, this is what i want to do.
> i have a login.php that asks the user to login.
> and then if the login was successful the user will "redirected" to my
> main.php.
> and also if the user is already logged and went to my index.php, he will
be
> redirected immediately to main.php
>
> i tried to do header("Location: main.php"); but it said that i "cannot add
> header information".
>
> pls. help.
>
>
> --
> PHP Windows 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]
>
--- End Message ---
--- Begin Message ---
Just dump the database on your local MySQL server onto a file. Since you
already have the phpmyadmin setup at the remote location, you could just
import your dumped database to the remote MySQL server. Hope that helps.
-Kevin
"Tome" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How to get the data from my local PC MySQL database (or MSAccess) to the
> remote UNIX ISP MySQL database. There must be a simple method for this?
>
> I am new to OpenSource and programming.
>
> I have been an NT administrator, and made the jump to OpenSource. Some of
> the simple things to do in SQLServer seem complicated using MySQL.
>
> I set up phpAdmin 2.2.0 on my remote ISP's UNIX box: I am able to browse
> the phpAdmin 2.2.0 Welcome page, and have protected the folder with
> .htaccess.
>
> I remotely created a table in the database which mimics the table I have
on
> my local Windows2000 PC. Locally, the table and data had originally been
> created in MSAccess and was exported to my local MySQL database. That was
a
> menu-driven one step procedure.
>
> Now, I am trying to figure out how to get the data from my local PC MySQL
> database (or MSAccess) to the remote ISP MySQL database. There must be a
> simple method for this. I am new to OpenSource, so I need step-by-step
> instructions.
>
> Should I give up?
>
>
--- End Message ---
--- Begin Message ---
my login page (login.php) passes it's form elements to my main page
(main.php).
in my main page, i try to call the elements from my login page as $element1;
but if go to my main page directly, without going to the login page, php
tells me that $element is not initialized, which is true because it is not
initialized, and the one who will be initializing it will be the form which
is not available.
Please help. again
--- End Message ---
--- Begin Message ---
You might try something like:
if (!isset($element1))
{ $element = ""; }
Which would check that the value is set, and if not, initialize it.
At 16:59 12/10/2001 +0800, you wrote:
>my login page (login.php) passes it's form elements to my main page
>(main.php).
>in my main page, i try to call the elements from my login page as $element1;
>but if go to my main page directly, without going to the login page, php
>tells me that $element is not initialized, which is true because it is not
>initialized, and the one who will be initializing it will be the form which
>is not available.
>
>Please help. again
>
>
>
>
>
>--
>PHP Windows 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]
/***
* Jonathan Wright
* [EMAIL PROTECTED]
* ICQ 21961373
***/
--- End Message ---
--- Begin Message ---
I am currently creating a website that pulls news articles from a mysql
database into a php page. The article is stored as a TEXT function in
the database, and is inserted by a single form field. What do I need to
do in order for the article to be displayed with the proper paragraph
breaks instead of a the continuous text it is now.
Mark
--- End Message ---
--- Begin Message ---
Thanks for everybodies replies - we've used the nl2br() function and its
working just fine.
Mark
> ----------------------------------------------------------------------
> -----------------------
> Oliver Robillo replied:
>
> You could try using the replace function of mysql within your query.
> For example:
>
> $res=mysql_query("SELECT REPLACE(paragraph_field,CHAR(10),'</p><p>')
> FROM some_table");
>
> What I do is store the article's body with line breaks after each
> individual paragraph. Then when I pull it out of the database table, I
> convert the line breaks into html paragraphs.
>
------------------------------------------------------------------------
---------------------
> >
> > I am currently creating a website that pulls news articles
> > from a mysql database into a php page. The article is stored
> > as a TEXT function in the database, and is inserted by a
> > single form field. What do I need to do in order for the
> > article to be displayed with the proper paragraph breaks
> > instead of a the continuous text it is now.
>
--- End Message ---
--- Begin Message ---
A script that formats and sends out an email using http vars fails with
certain email addresses.
I couldn't believe it when I saw this (not) happening. Using:
MAIL(
"$recip",
"$subject",
"$message",
"$header"
);
where $recip is passed from an HTML form, fails to mail with certain
email addresses in the $recip var. The same script in 4.04pl2 does not
fail with the same addresses.
Any thoughts on this?
____________________________
Matthew Luchak
Webmaster
Kaydara Inc.
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
The error occurs for emails addresses entered into the header field as :
$header="From: $email_required";
NOT in the $recip field. Sorry 'bout that.
____________________________
Matthew Luchak
Webmaster
Kaydara Inc.
[EMAIL PROTECTED]
-----Original Message-----
From: Matthew Luchak
Sent: Friday, October 12, 2001 10:34 AM
To: [EMAIL PROTECTED]
Subject: 4.06 CGI IIS - MAIL abnormalities
A script that formats and sends out an email using http vars fails with
certain email addresses.
I couldn't believe it when I saw this (not) happening. Using:
MAIL(
"$recip",
"$subject",
"$message",
"$header"
);
where $recip is passed from an HTML form, fails to mail with certain
email addresses in the $recip var. The same script in 4.04pl2 does not
fail with the same addresses.
Any thoughts on this?
____________________________
Matthew Luchak
Webmaster
Kaydara Inc.
[EMAIL PROTECTED]
--- End Message ---