1) Why are you using JavaScript to open the window? HTML will do just fine
(a target=_whatever) and will work on all browsers as well as search
engines.
2) Your sample page has some password on it and I can't decipher from your
message what's actually going on, so without seeing it in action,
andy [EMAIL PROTECTED] wrote:
Hi there,
I would like to validate a website adress. Unfortunatelly my eregi stmt
does
not work:
if (eregi(^@([0-9a-z][0-9a-z-\.]+)\.([a-z]{2,3})), $website)){ // not
a
link
I am getting the error msg:
Warning: REG_ERANGE in extend.inc on line
On Sat, 18 May 2002, andy wrote:
I would like to validate a website adress. Unfortunatelly my eregi stmt does
not work:
if (eregi(^([0-9a-z][0-9a-z-\.]+)\.([a-z]{2,3})), $website)){ // not a
link
I am getting the error msg:
Warning: REG_ERANGE in extend.inc on line 94
does anybody
Can you be more specific about what you mean by I'm having a lot of
trouble passing the values in the first array to the second array?
You have a lot more than two arrays, so we don't know which are the first
and second. And you are passing a lot of things around, so we don't know
where you are
On Sat, May 04, 2002 at 02:42:34PM +0200, Andy wrote:
if (ereg(^[A-Za-z0-9],$new_passw))
if (!preg_match(/^[a-zA-Z0-9]*$/, $new_passw)) {
echo invalid;
}
preg-power! :)
--
Trond Arve Nordheim
- This message is ROT13-encrypted twice for extra security.
--
PHP General Mailing List
place these statements in your include file, which is standard for PHP
development:
$link=mysql_connect(localhost,user,12345) or die(Error: cannot
connect.mysql(error());
mysql_select_db(mydatabase) or die(Error: cannot select db:
.mysql_error());
-Original Message-
From: Denis L.
On Tue, 26 Mar 2002, Denis L. Menezes wrote:
I have a website called www.abcresources.com
The mysql database set up by the hosting company is called
abc_resources.com
I have a table called addressbook
One problem you may run into is that (at least as far as I know) a MySQL
database name
On Saturday 09 March 2002 18:08, Timothy J. Luoma wrote:
Hello! I am trying to reduce the size of the code below, which I believe
can be simplified.
I checked the 'for' entry in the manual as well as googling for some
similar code, but did not have any luck.
Here is what I have:
echo T.$username.$password;
is PHP 2 and earlier proper syntax for PHP 3+ is
echo T+$username+$password;
or
echo T$username$password;
Doug
I can't believe I just sent this. For those who care it's the other way
around.
-Original Message-
From: Douglas Maclaine-cross
Sent: Monday, March 04, 2002 14:08
To: 'PHP'; [EMAIL PROTECTED]
Subject: RE: [PHP] Need help with a PHP script
echo T.$username.$password;
is PHP 2
instead of $HTTP_POST_VARS, try $_POST
-Original Message-
From: PHP [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 12:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Need help with a PHP script
?php
if($a == 0 || $a == null) LogOn();
else if($a==1) CPMain();
function Authorize() {
John,
Yeeesch! I neet help.
Yeeesch! was exactly my reaction when I read the following!
Now that you have had some responses to 'directly' address the problem may I ask why
you would want to
maintain/work with the data in this format (top) as opposed to the eminently logical
later
John,
You could create a function to do this. Just think of it in small steps.
You can use the string replace function to replace certain parts with
other characters, or nothing at all. For example:
$data = Wilson; Hope,(i) Alec Derwent; King,(i) Bruce; James,(i)
Henry;;
$new_data =
it in an understandable way, but as Steven says, break
it down into smaller steps
Martin
-Original Message-
From: Steven Walker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 1:30 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Need help
John,
You could create
str_replace() and eregi_replace() work well for this.
Mike
- Original Message -
From: Robby [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 27, 2002 1:45 PM
Subject: [PHP] Need help with Taking a phrase from a remote location.
Hi Everyone,
I need to know which
]]
Sent: Thursday, January 10, 2002 11:10 AM
To: Martin Towell; 'Brian Tully'; PHP DB; PHP
Subject: RE: [PHP] need help looping through each record with a query -
st umped
If you are querying the Score = 75 how are you ging to
take the Consecutive requirement into the account
dn -
thanks SO much for your detailed reply. :)
yes there are tons of problems :( the last 3 consecutive Months issue is
tricky enough - but the fact that the database is set up all wrong for this
type of query is the real problem.
unfortunately changing the structure and field formats then
Hi,
If I am not missing anything, you are not sorting
SELECT Month, Score
FROM scores
WHERE Username = '$Username'
Also, the requirement is not three consecutive test in a
month, so I would not break the loop into months.
once you have it ordered it by the date :
while (list($Month,
could you change this
$query2 = (SELECT Month, Score FROM scores WHERE Username =
'$Username');
to
$query2 = (SELECT count(*) FROM scores WHERE Username = '$Username' and
Score = 75 and Month in ('January', 'December', 'November', 'October'));
$result2 = mysql_query($query2) or die
If you are querying the Score = 75 how are you ging to
take the Consecutive requirement into the account.
--- Martin Towell [EMAIL PROTECTED] wrote:
could you change this
$query2 = (SELECT Month, Score FROM scores WHERE
Username =
'$Username');
to
$query2 = (SELECT count(*)
: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 11:10 AM
To: Martin Towell; 'Brian Tully'; PHP DB; PHP
Subject: RE: [PHP] need help looping through each record with a query -
st umped
If you are querying the Score = 75 how are you ging to
take the Consecutive requirement
, January 10, 2002 11:10 AM
To: Martin Towell; 'Brian Tully'; PHP DB; PHP
Subject: RE: [PHP] need help looping through each record with a query -
st umped
If you are querying the Score = 75 how are you ging to
take the Consecutive requirement into the account.
--- Martin Towell [EMAIL PROTECTED
Hi,
Both problems can be solved with php directives in httpd.conf or in
.htaccess.
You can just put php_value safe_mode off or php_value engine off
into Directory definitions in httpd.conf to restrict only for some
directories or into Virtual for virtual servers.
(Of course in htaccsess you
Original message
From: Michael Champagne [EMAIL PROTECTED]
Date: Mon, Sep 24, 2001 at 09:28:01AM -0500
Message-ID: [EMAIL PROTECTED]
Subject: [PHP] Need help with auto_prepend_file
Our website relies heavily on include files. We have a single include file
that is 'auto prepended' to every php
John Holcomb wrote:
I'm sorry for those who my have responded to my last
email. I thought I had plenty of room in my email
client, but I forgot to delete my trash, so I did not
get any responses. So, I'm going to restate my initial
problem. Any help will be greatly appreciated.
Thanks
OK I am trying to write a script that will bring data out of a database
into
a select box. But what I need it to do is repeat 5 times or more depending
on what it brings out. I can only get it to display one select box. Here
is
what I got so far:
?php
require 'common.inc';
// Connect to
John,
Try this:
TABLE
?php
$query = SELECT image_link, web_url FROM testdata;
$result = mysql_query ($query) or die (Query Failed);
while ($row = mysql_fetch_object ($result))
{
printf (trTD.$row-image_links.br.$row-web_url./TD
TD.$row-image_link.br.$row-web_url./tr\n);
}
?
/TABLE
-
ho,
John Bass wrote:
printf (trTD%sbr%s/TD TD%sbr%s/tr\n, $row-image_link,
^^
You forgot to close the td tag, maybe your browser didnt display the table
because of that.
Markus Bertheau
--
PHP General Mailing List (http://www.php.net/)
To
Lewis [EMAIL PROTECTED]
To: John Bass [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] Need help to create HTML table with 2 columns.
Date: Thu, 23 Aug 2001 10:41:08 -0400
John,
Try this:
TABLE
?php
$query = SELECT image_link, web_url FROM testdata;
$result = mysql_query ($query) or die
: Re: [PHP] Need help to create HTML table with 2 columns.
Hi,
Thank you for the email. I tried your code, but first column is printing
image_link web_url fields correctly and second column is repeating
values
of the first column.
Other records or rows are printing same way.
Regards
second column should print next record that was returned from the query.
Thanks.
John
From: Jeff Lewis [EMAIL PROTECTED]
Reply-To: Jeff Lewis [EMAIL PROTECTED]
To: John Bass [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] Need help to create HTML table with 2 columns.
Date: Thu, 23 Aug
On 23 Aug 01, at 14:30, John Bass wrote:
TABLE
?php
$query = SELECT image_link, web_url FROM testdata;
$result = mysql_query ($query) or die (Query Failed);
while ($row = mysql_fetch_object ($result))
{
printf (trTD%sbr%s/TD TD%sbr%s/tr\n, $row-image_link,
$row-web_url,$row-image_link,
At 04.08.2001 01:33, Matthew Tyler wrote:
Hey all,
I have a server with Apache running on it, and it currently uses PHP3
(installed with the OS). I am trying to upgrade to PHP4, but from the
php.net documentation it appears that I have to reinstall Apache in order to
have access to the PHP4
add to the top of the script
error_reporting(E_ALL ~E_NOTICE);
- Original Message -
From: Virgil Claritt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 23, 2001 2:57 PM
Subject: [PHP] need help w/ variables
when i use this script:
?php
session_start();
if ($op == ds)
i dont quite get it what your saying
it is clearly defined at the top
$op is equal to ds
$valid is equal to yes
$msg is equal to Bad Login
Reductor [EMAIL PROTECTED] wrote in message
002701c11335$ac5dafe0$0200a8c0@ReDucTor">news:002701c11335$ac5dafe0$0200a8c0@ReDucTor...
add to the top of the
did u try what i said???
- Original Message -
From: Virgil Claritt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 23, 2001 3:13 PM
Subject: Re: [PHP] need help w/ variables
i dont quite get it what your saying
it is clearly defined at the top
$op is equal to ds
$valid
On Mon, 23 Jul 2001, Virgil Claritt wrote:
i dont quite get it what your saying
it is clearly defined at the top
$op is equal to ds
$valid is equal to yes
$msg is equal to Bad Login
Reductor [EMAIL PROTECTED] wrote in message
try looking here:
http://www.php.net/manual/en/function.mktime.php
then here:
http://www.php.net/manual/en/function.date.php
-JB
- Original Message -
From: John Holcomb [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, July 17, 2001 12:53 PM
Subject: [PHP]
John Holcomb pressed the little lettered thingies in this order...
Hello and thank you.
I'm trying to find a function(method) or existing
code taht takes the number of minutes that have passed
in a day and returns the time of the day. For
example:
780 minutes == 1pm,
0 minutes ==
That's rather simple:
echo date(H:i:s,mktime(0,$minutes,0));
-Rasmus
On Tue, 17 Jul 2001, John Holcomb wrote:
Hello and thank you.
I'm trying to find a function(method) or existing
code taht takes the number of minutes that have passed
in a day and returns the time of the day. For
Jack Dempsey pressed the little lettered thingies in this order...
$hours = $time / 60;
$minutes = $time % 60;
if($hours = 12){
$meridian = 'pm';
$hours -= 12;
}
else{$meridian = 'am';}
if($hours == 0){$hour = '12';}
echo $hours:$minutes$meridian;
try something like
This will convert minutes to hours, then convert
to 12-hour am|pm based time. all hours have 60
minutes. it's simple mathematics to convert.
$m = 780;
$h = 0;
// convert to hours:minutes
while ($m = 60) {
$h++;
$m -= 60;
}
print $h:$m \n;
// convert to 12-hour am|pm
if (!$h) {
$suff
]]
Sent: Tuesday, July 17, 2001 5:11 PM
To: Jack Dempsey
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Need help with formatting time
Jack Dempsey pressed the little lettered thingies in this order...
$hours = $time / 60;
$minutes = $time % 60;
if($hours = 12){
$meridian = 'pm';
$hours -= 12
I would do it this way .
?
$quota = `/usr/bin/sudo /usr/bin/quota -v test`;
// please mind that the command is between backtics and not quotes
echo $quota;
// It probably doesn't produce a nice looking output but you can
change that yourself
// This doesn't work
hhhm, I played around a little and found another solution which you might
find usefull
?
exec(/bin/ls -al /home/marcd,$ls);
Array($ls);
$max = sizeof($ls);
$num = 0;
while ($num = $max)
{
echo $quota[$num],br\n;
$num++;
}
?
This way you can execute any command and put the
if you want the current time all you have to do is this.. :)
echo date(l d F, Y g:i A)
that will out put:
Thursday 05 July, 2001 7:52 PM
or whatever time your system is at it will echo it in that format.. hope
that helps!
jay
- Original Message -
From: JustinS [EMAIL PROTECTED]
To:
As I understand it,
* strftime takes a format string and an integer timestamp and returns a
date string
* date takes a different type of format string and an integer timestamp
and returns a date string
In both cases they default to using the timestamp for the current time.
SO: what you code
Can anybody tell me what does the following mean?
$path=substr(__FILE__, 0, strlen(__FILE__) - strlen(basename(__FILE__)) -
1);
It's silly code written by someone who doesn't realize that the dirname()
function exists. dirname(__FILE__) would do exactly the same thing. See
php.net/dirname
__FILE__ is a constant predefined by PHP. See
http://www.php.net/manual/en/language.constants.php
For help on the basename() function, see
http://www.php.net/manual/en/function.basename.php
Kirk
-Original Message-
From: Fai [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001
wow, that's quite a mouthfull ;)
use dirname
$path=substr(__FILE__, 0, strlen(__FILE__) - strlen(basename(__FILE__)) -
1);
--
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
Be more specific please,
as you typed SELECT count(*) FROM ... as ...
this should return one row and only one!
that means you need to fetch that row and use it as a variable and not
within a row...
can you plz clarify your question?
-elias
http://www.eassoft.cjb.net
Ryan W. Zajicek [EMAIL
On Wednesday 18 April 2001 08:38, chris herring wrote:
this is really buggin me... i've got this free-for-all that i want to
make, and everything seems logical, but
I did a quick rewrite here. it adds links as people enters them :)
?
echo END
form method="POST"
On Wed, 18 Apr 2001 16:08, chris herring wrote:
this is really buggin me... i've got this free-for-all that i want to
make, and everything seems logical, but
echo "form method=\"POST\" action=\"$PHP_SELF\" name=\"linkadd\"";
echo "input type=\"text\" name=\"url\" size=\"20\"
The 3rd argument for fwrite() is the length of the string. So you should do:
$fp = fopen('./file.txt','w');
$line = "a href=\"$url\"$text/abr\n";
fwrite($fp,$line,strlen($line));
fclose($fp);
--Joe
On Wed, Apr 18, 2001 at 01:38:11AM -0500, chris herring wrote:
this is really buggin me... i've
"is there a way"
i'm sure there is, but you haven't given enough information to get much
more of a response...
show us some code, explain clearly and concisely what you're trying to
do, and we might be able to help more...
-jack
p.s. and the quick answer is yes, you can read information from
Hi,
ok, here is the code:
?
//starting directory
$startDir = "/homepages/24/d11622983/htdocs/Berent/";
//open directory
$openDir = opendir($startDir);
print "center";
print "table border=0 cellspacing=1 cellpadding=4\ntr\ntd\n";
//starting of table
print
I believe you need to set the cookie
before any other header information is
passed.
-brian
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 2:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] need help with cookies
Hi, I am trying
I beleive I am attempting to set this cookie before any headers are sent.
?
Kris
On 22 Mar 01, at 14:38, Brian V Bonini wrote:
I believe you need to set the cookie
before any other header information is
passed.
-brian
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL
as allready stated you need to set the cookie before data is outpued, you can override
this by editing your php.ini
output_buffering = on;
on another note, I would use sessions for all this, youve created a tone of code that
does almost exactly what sessions can do in a matter of a few
I would suggest for you to take all the complicated stuff out of a simple text
script and try something like this:
%
setcookie("TestValue","Working",600)
%
Make sure that nothing is being sent prior to setting the cookie, and see if IE
prompts you...
Good Luck!
[EMAIL PROTECTED] wrote:
Hi, I
Your regex is incorrect. You've written:
/[\,\;\s*]/
That * means "match a *" because it's inside the brackets. Put it outside,
like this (actually use a + instead):
/[\,\;\s]+/
to match 1 or more of any of those characters.
That may not be exactly what you want, since that
On Thursday 08 March 2001 18:43, you wrote:
I am attempting to take a line of text (a list) that has been entered
into a form and split it into the appropriate parts, placing them into
an array. I am splitting the input on commas, semi-colons, and spaces.
Problem 1: Is with "white space".
301 - 362 of 362 matches
Mail list logo