php-general Digest 22 Jun 2003 23:07:36 -0000 Issue 2133
Topics (messages 152443 through 152461):
Re: Front Page equivalent
152443 by: George Pitcher
Re: from a textfile/textarea to a mysql INSERT
152444 by: Øystein Håland
Re: Is there a way to get rid of \' and \" ?
152445 by: Jason Wong
152453 by: Philip Olson
variable shortened in hidden fields?
152446 by: Denis L. Menezes
152448 by: Chris Hayes
Secur32.dll and php_imap.dll
152447 by: Mark
Re: Query mysql highest id number
152449 by: Bobby Patel
am i doing this right?
152450 by: Jay Fitzgerald
Variable from hidden fields shortens.
152451 by: Denis L. Menezes
152452 by: Philip Olson
simple flash php form, help please
152454 by: Paul Ferrie
How to run script ?
152455 by: Xprogsoft
execute a command
152456 by: Mattia
152461 by: Don Read
Mod_L33T ANYONE! (Virtual Hosts ) alternative READ if you USE Virtual Hosts
152457 by: Mark Clarkstone
Security conundrum ....
152458 by: Miles Thompson
changing PHP include location without .htaccess
152459 by: Tim Thorburn
152460 by: Jason Wong
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 ---
Graham,
PHP editors is a frequent topic on this list. I would suggest that you have
a look at the archives and see if the answer is there.
BTW, I only use Dreamweaver and don't have any problems.
George
> -----Original Message-----
> From: Graham Webb [mailto:[EMAIL PROTECTED]
> Sent: 22 June 2003 12:06 pm
> To: [EMAIL PROTECTED]
> Subject: [PHP] Fw: Front Page equivalent
>
>
>
> ----- Original Message -----
> From: "Gabor Hojtsy" <[EMAIL PROTECTED]>
> To: "Graham Webb" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Sunday, June 22, 2003 11:59 AM
> Subject: Re: Front Page equivalent
>
>
> Please ask support questions at [EMAIL PROTECTED]
>
> Goba
>
> Graham Webb írta:
> > I am looking for software that will allow me to write PHP in WYSIWYG.
> something like front page. Although I can code directly I have become so
> lazy that I use packages such as this a Dreamweaver and then alter the
> coding afterwards.
> >
> > Please advise.
> >
> > Regards,
> >
> > Graham Webb.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
"John W. Holmes" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Øystein Håland wrote:
> >>From Excel you can save a table as a tab separated txt-file. I want to
take
> > this and execute INSERT queries (by uploading the file or by copying the
> > content into a textarea). Anyone who has a script to do this? My
platform is
> > Windows, but the script will be used on a Linux web server.
>
> Use the LOAD DATA INFILE command to load the entire file at once.
Thanks (and I'm working on it right now). But what about the textarea way?
--- End Message ---
--- Begin Message ---
On Sunday 22 June 2003 06:00, Dan Anderson wrote:
> I have a form which feeds into an e-mail. When I use the mail function
> all 's turn into \'s and all "s turn into \"s.
Are you sure it's the mail() function that's doing it? I doubt it.
> I tried
> set_magic_quotes_runtime(0) and it didn't do anything,
In php.ini:
magic_quotes_gpc = Off
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
*/
--- End Message ---
--- Begin Message ---
On Sun, 22 Jun 2003, Jason Wong wrote:
> On Sunday 22 June 2003 06:00, Dan Anderson wrote:
> > I have a form which feeds into an e-mail. When I use the mail function
> > all 's turn into \'s and all "s turn into \"s.
>
> Are you sure it's the mail() function that's doing it? I doubt it.
>
> > I tried
> > set_magic_quotes_runtime(0) and it didn't do anything,
>
> In php.ini:
>
> magic_quotes_gpc = Off
Btw, magic_quotes_gpc and magic_quotes_runtime are totally
different beasts. You cannot set magic_quotes_gpc at
runtime but may use php.ini as Jason suggests or .htaccess
Before you set it off, be sure you know how it will affect
your SQL queries though.
Regards,
Philip
--- End Message ---
--- Begin Message ---
Hello friends.
I am passing a variable of two word like "communications software" from one
form to the other. The variable passes as communications%20software . This
is okay for some purpose, but not for the hidden text field that I want. The
hidden text field gets the value "communications" only instead of
"communications software".
Is there a way to solve this?
Thanks
Denis
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003
--- End Message ---
--- Begin Message ---
At 15:23 22-6-2003, you wrote:
Hello friends.
I am passing a variable of two word like "communications software" from one
form to the other. The variable passes as communications%20software . This
is okay for some purpose, but not for the hidden text field that I want. The
hidden text field gets the value "communications" only instead of
"communications software".
Is there a way to solve this?
putting quotes in the tag!
compare:
echo '<input type=hidden myvar='.$myvar.'>';
<input type=hidden myvar=communications software>
to
echo '<input type="hidden" myvar="'.$myvar.'">';
<input type="hidden" myvar="communications software">
--- End Message ---
--- Begin Message ---
Win NT4.0
Apache 2.0.45
I've searched the archives and google, but haven't been able to quite
find a solution to this problem. I just upgraded from php4.3.1
(pre-release version) to php4.3.2. I am now getting the following two
errors, which I'm sure I've gotten and fixed in the past, but can't
figure out now...
ERROR 1 (An Apache error)
The dynamic link library Secur32.dll could not be found in the
specified path <path listed out here>
I click OK, and get the following php error:
Unknown() Unable to load dynamic library
'c:\winnt\system32\php_imap.dll' The specified module could not be
found.
Secur32.dll is not on my system, and hasn't been in the past.
php_imap.dll was copied to c\winnt\system32
php extension dir is c:\winnt\system32 (tried it with
c:\php\extensions as well).
My apologies - I can't imagine this is a new problem, and I'm sure
many others have found and solved it. I just can't seem to find it
logged anywhere.
Mark
=====
Mark Weinstock
[EMAIL PROTECTED]
***************************************
You can't demand something as a "right" unless you are willing to fight to death to
defend everyone else's right to the same thing.
***************************************
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
--- End Message ---
--- Begin Message ---
you can you the Mysql MAX function, I believe
Select Max(ID) from Table;
Also, you may want to look at PHP's mysql_insert_id(), (if you are trying to
find the id number after an insert (if that's what you want)).
"Chris Schoeman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I want to make a query in a mysql database with as result
> the row with the highest id number. How can I do that?
>
>
--- End Message ---
--- Begin Message ---
This is the code I have that is on step 4 of an event registration system i
am working on...
[code page=step4.php]
ini_set("display_errors", "1");
ini_set ('error_reporting', E_ALL);
session_start ();
$ip = $_SERVER['REMOTE_ADDR'];
$fullhost = gethostbyaddr($ip);
$host = preg_replace("/^[^.]+./", "*.", $fullhost);
$_SESSION['host'] = $fullhost;
$_SESSION['ip'] = $ip;
$_SESSION['eventid'] = $_SESSION['eventid'];
$_SESSION['age'] = $_SESSION['age'];
$_SESSION['terms'] = $_SESSION['terms'];
$_SESSION['team'] = $_REQUEST['team'];
for($i = 0; $i <= 239; $i++):
$seat = array('A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10',
'A11', 'A12', 'A13', 'A14', 'A15', 'A16', 'A17', 'A18', 'A19', 'A20',
'B21', 'B22', 'B23', 'B24', 'B25', 'B26', 'B27', 'B28', 'B29', 'B30',
'B31', 'B32', 'B33', 'B34', 'B35', 'B36', 'B37', 'B38', 'B39', 'B40',
'C41', 'C42', 'C43', 'C44', 'C45', 'C46', 'C47', 'C48', 'C49', 'C50',
'C51', 'C52', 'C53', 'C54', 'C55', 'C56', 'C57', 'C58', 'C59', 'C60',
'D61', 'D62', 'D63', 'D64', 'D65', 'D66', 'D67', 'D68', 'D69', 'D70',
'D71', 'D72', 'D73', 'D74', 'D75', 'D76', 'D77', 'D78', 'D79', 'D80',
'D81', 'D82', 'D83', 'D84', 'D85', 'D86', 'D87', 'D88', 'D89', 'D90',
'E91', 'E92', 'E93', 'E94', 'E95', 'E96', 'E97', 'E98', 'E99', 'E100',
'E101', 'E102', 'E103', 'E104', 'E105', 'E106', 'E107', 'E108', 'E109',
'E110', 'F111', 'F112', 'F113', 'F114', 'F115', 'F116', 'F117', 'F118',
'F119', 'F120', 'G121', 'G122', 'G123', 'G124', 'G125', 'G126', 'G127',
'G128', 'G129', 'G130', 'H131', 'H132', 'H133', 'H134', 'H135', 'H136',
'H137', 'H138', 'H139', 'H140', 'H141', 'H142', 'H143', 'H144', 'H145',
'H146', 'H147', 'H148', 'H149', 'H150', 'I151', 'I152', 'I153', 'I154',
'I155', 'I156', 'I157', 'I158', 'I159', 'I160', 'I161', 'I162', 'I163',
'I164', 'I165', 'I166', 'I167', 'I168', 'I169', 'I170', 'I171', 'I172',
'I173', 'I174', 'I175', 'I176', 'I177', 'I178', 'I179', 'I180', 'J181',
'J182', 'J183', 'J184', 'J185', 'J186', 'J187', 'J188', 'J189', 'J190',
'J191', 'J192', 'J193', 'J194', 'J195', 'J196', 'J197', 'J198', 'J199',
'J200', 'K201', 'K202', 'K203', 'K204', 'K205', 'K206', 'K207', 'K208',
'K209', 'K210', 'K211', 'K212', 'K213', 'K214', 'K215', 'K216', 'K217',
'K218', 'K219', 'K220', 'L221', 'L222', 'L223', 'L224', 'L225', 'L226',
'L227', 'L228', 'L229', 'L230', 'L231', 'L232', 'L233', 'L234', 'L235',
'L236', 'L237', 'L238', 'L239', 'L240');
echo "<A HREF=\"step5.php?seat=$seat[$i]\">$seat[$i]</A><BR>";
endfor;
[/end code]
Now - all of that works perfect and it displays seperate lines with links
to each $seat in the browser....even when I click on the link and goto step
5, it "seems" as though it is working correctly...
[code page=step5.php]
session_start ();
$_SESSION['seat'] = $_REQUEST['seat'];
echo "$_SESSION[seat]";
[/end code]
My question is - is my session working correctly? am I doing what I need to
be doing in order to keep the seats secure so that noone can just type the
seat number in the location bar and get to register their seat?
The reson I ask this is because the only way I know to test sessions is to
close out my browser completely, reopen it and try going to the page I am
testing...HOWEVER, when I do that in this situation, I am still allowed to
change the actual seat number in my location bar....this is what I do NOT
want...
I have read and read and read online and every place I have looked says the
same stuff that the way I have it above should be secure, but apparently it
is not...
TIA,
Jay
--- End Message ---
--- Begin Message ---
I have a form called feedback which has a hidden field as follows :
<?php
Print"<input type=\"text\" name=\"SubCategoryName\"
value=\"$SubCategoryName\">";
?>
I send this hidden field as a variable in form2 which sends an email with
the following code :
<?php
// Build up email header fields
$mailFrom = $SenderName;
$mailTo = "[EMAIL PROTECTED]";
$mailSubject = "Message form mydomain.com";
$link="Please follow this link
"."http://www.mydomain.com/findbymember.php?SubCategoryName=".$SubCategoryNa
me;
$Message="$SenderName had searched for '$SubCategoryName'. His/her details
are as follows : "."\n"."Telephone number : ".$SenderTelNumber."\n";
$Message=$Message."Mobile number : ".$SenderMobNumber."\n"."Email address :
".$SenderEmailAddress."\n";
$Message=$Message."Address : ".$SenderAddress;
// Send email to member company
mail($mailTo, $mailSubject, $Message,$link);
?>
When my variable in form 1 is "Large Format Print", the mail that arrives is
as follows :
Please follow this
linkhttp://www.findusnow.com/findbymember.php?SubCategoryName=Large Format
Print
Jack had searched for 'Large Format Print'. His/her details are as follows :
Telephone number : 454588445
Email address : 989855564
Address : some address1, some home, some street, some city
As you can see the link does not show the full variable at the end and shows
only the word "large" instead of "large Format Print"
can any of you help?
Thanks
denis
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003
--- End Message ---
--- Begin Message ---
For example:
$a = 'a b c';
print $a; // a b c
print urlencode($a); // a+b+c
So, you want to urlencode your url (the query string).
Regards,
Philip
On Sun, 22 Jun 2003, Denis L. Menezes wrote:
> I have a form called feedback which has a hidden field as follows :
> <?php
> Print"<input type=\"text\" name=\"SubCategoryName\"
> value=\"$SubCategoryName\">";
> ?>
>
> I send this hidden field as a variable in form2 which sends an email with
> the following code :
> <?php
> // Build up email header fields
> $mailFrom = $SenderName;
> $mailTo = "[EMAIL PROTECTED]";
> $mailSubject = "Message form mydomain.com";
> $link="Please follow this link
> "."http://www.mydomain.com/findbymember.php?SubCategoryName=".$SubCategoryNa
> me;
>
> $Message="$SenderName had searched for '$SubCategoryName'. His/her details
> are as follows : "."\n"."Telephone number : ".$SenderTelNumber."\n";
> $Message=$Message."Mobile number : ".$SenderMobNumber."\n"."Email address :
> ".$SenderEmailAddress."\n";
> $Message=$Message."Address : ".$SenderAddress;
>
> // Send email to member company
> mail($mailTo, $mailSubject, $Message,$link);
> ?>
>
> When my variable in form 1 is "Large Format Print", the mail that arrives is
> as follows :
> Please follow this
> linkhttp://www.findusnow.com/findbymember.php?SubCategoryName=Large Format
> Print
>
> Jack had searched for 'Large Format Print'. His/her details are as follows :
> Telephone number : 454588445
> Email address : 989855564
> Address : some address1, some home, some street, some city
>
> As you can see the link does not show the full variable at the end and shows
> only the word "large" instead of "large Format Print"
>
> can any of you help?
>
> Thanks
> denis
>
>
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi again guys :)
I am having problems with this little email user script for my website. I
have set this script here to run with flash outputing the information. When
i run the script in the browser i grt this error
"Warning: Failed to Receive in C:\apache\htdocs\innovat\forum\mailuser.php
on line 18"
I aint any php expert just some simple stuff i know.
You can copy the code and test it just change the email information.
cheers for any help guys.
<?
$username = "djd";// set these two so that we do not need flash to output
the information
$users_email="[EMAIL PROTECTED]";
$ToEmail = "$users_email";
$date = date("m/d/Y H:i:s");
$ToName = "$username";// out put from flash
$ToSubject = "Email from mywebsite.co.uk";
$email = "[EMAIL PROTECTED]";
$msg = "Type whatever here";
$EmailBody = "Sent By: $username\n\nMessage Sent:\n$msg\n\n";
$EmailFooter="\nSent on\n Date/Time: $date";
$Message = $EmailBody.$EmailFooter;
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$username."
<".$email.">");// line 18
print "retval=1&$ToEmail&ToSubject&$Message&$username&$email";// This just
returns output to show all variables have been passed ok.
?>
--- End Message ---
--- Begin Message ---
Hi,
If i try to run php script out side DOCUMENT_ROOT i.e
using an alias.
the server reply with "No input file specified."
I have Xitami and win 98.
My Q how do i tell php where to find the script.
Hope some one can help!
Regards.
--- End Message ---
--- Begin Message ---
How to execute a command capturing the stanndard error, in addition to
standard output? example:
echo system('/bin/rm ...');
I need to know when this command fails, and when it fails, i need to
know why. Any hints?
_Mattia_
--- End Message ---
--- Begin Message ---
On 22-Jun-2003 Mattia wrote:
> How to execute a command capturing the stanndard error, in addition to
> standard output? example:
>
> echo system('/bin/rm ...');
>
> I need to know when this command fails, and when it fails, i need to
> know why. Any hints?
>
> _Mattia_
>
$cmd='/bin/rm foo';
exec("$cmd 2>&1", $output);
-- or --
exec($cmd, $output, $errno);
echo posix_strerror($errno);
-- or --
proc_open(...) and read from pipe[2]
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)
--- End Message ---
--- Begin Message ---
hey everyone do any of you people use mod_l33t? I do it rocks you can have
about 1000 sites on your comp with their own domain & your ram won't even go
down 1mb. its easy to setup & its very cool
email me or post if you want of info
--- End Message ---
--- Begin Message ---
This does have to do with PHP, but bear with me.
We're using a Flash movie, which calls various PHP scripts to authenticate
users & retrieve news articles, to display a daily business digest. As
Flash's printing capabilities are pathetic, we use JavaScript to popup a
chromeless window in which runs print_news.php. (This is a small window,
with selection, resizing, etc. all disabled, and which calls the print
dialog on load; all that is really visible is its "Close" button.)
It won't be too long before some bright spark realizes that our site could
be visited and the URL for print_news.php fed in; that person would then
have free access - not good.
What I planned to do is add authentication to print_news.php, by passing
the user's ckval (obtained when first authenticated by user_logon.php)
back to the browser in a session var. That does not work, as Flash
apparently gobbles the cookie.
The apparent alternative is to call an intermediate script from Flash,
passing the ckval, and having that script set the session and then redirect
to print_news.php, using the header( Location: ... ). The problem is that
opens in the same window, and I need a new one.
I obviously can't pass ckval in the URL, and I don't have any way, that I
know of, to fake a <form> POST.
Suggestions or nudges in the right direction will be appreciated.
Regards - Miles Thompson
--- End Message ---
--- Begin Message ---
Hi,
I have a site running on a shared server (and as such, I have no access to
the php.ini file) that I'd like to be able to change the default include
path. I've done this before using the .htaccess file and the following
command:
php_value include_path ".:/path/to/web/"
However, on this particular server that command produces an error 500 on
all PHP files with the above command in the .htaccess file. Is there
another way that I can change the default include path?
The server is running FreeBSD 4.4 and PHP 4.3.2RC4
Thanks
-Tim
--- End Message ---
--- Begin Message ---
On Monday 23 June 2003 05:10, Tim Thorburn wrote:
> I have a site running on a shared server (and as such, I have no access to
> the php.ini file) that I'd like to be able to change the default include
> path. I've done this before using the .htaccess file and the following
> command:
>
> php_value include_path ".:/path/to/web/"
>
> However, on this particular server that command produces an error 500 on
> all PHP files with the above command in the .htaccess file. Is there
> another way that I can change the default include path?
ini_set()
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
--- End Message ---