tand alone, do not forget
that you can use other languages, too.
Regards,
Jason
--
Jason Murray
Developer
jWeb New Media Design
1 877 525 jWEB
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contac
;);
?
There's advantages and disadvantages to both our ways, really. It's
not worth an in-depth discussion because I think I've just sent everyone
on the list to sleep as-is. But our way works for us just as well as
your way works for you :)
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web
emacs sucks! vi forever! :P
Yes, I think its about time for another round of What Editor
Is The Most Awesomest Best And R0xx0rz The World! :)
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net
Is there a way to limit the image size with php?
You would have to use some image manipulation functions to look at the
file once it's been uploaded.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net
requests to the remote server,
show headers (thus displaying the cookies), and parse the output
so that you can find the cookie values in your script.
cURL: http://curl.haxx.se/
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List
tion, I've taken the Debian ml off the response)
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contac
value, and store it in
the session table in the database.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
like
below?
$Birthdate = $year$monthday;
And I will insert value in $Birthdate into table.
Not quite. right idea, wrong syntax.
You're just doing a simple string concatenation, so what you actually
want is this:
$Birthdate = $year . $month . $day;
Jason
--
Jason Murray
[EMAIL PROTECTED
YS,
then you'll want to substitute in a specific year in the mktime() statements
above, as you'll otherwise end up with the number of days between your exact
DATES of birth.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List
It has px...something...i cannot remember the exact site.
could someone point me to that site?
http://px.sklar.com
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail
( which of
course we can easily tell that $date1 come before $date2).
Can I use the sniplet below:
Yep, you can use a simple conversion in that case as long as its
YMD :)
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List
t;, $withdashes);
This wil actually remove everything from the string that is
not a number between 0 and 9 (ie, numbers).
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PR
for the tip. I
am going to use it today for an authentication system I'm building.
Careful. This will die in the butt if the client comes in from an ISP
using load-balancing proxy servers.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General
delete" by default.
I'll see if I can grab some MySQL table definitions and the like
if you'd like them...
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECT
But even if they had 100 servers, have you priced an OC-12 lately?
Actually, isn't it possible / more likely that they're running one
server cohosted at an ISP with an OC-12 link?
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General
$query = "insert into user values
('firstname','lastname','address','phone')";
$resultinsert = mysql_query($query);
$getID = "select userID from user"; // Will this get me the
// Id of the record I just inserted?
$resultID = mysql_query($getID);
No, it
cookie is accessible everywhere.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
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 ad
If I store the file in a non-apache directory, how does the
user download the file?
Use a file, "download.php" that will make sure the user is
authenticated, then fetch the contents of the file, and send the
file to the browser.
Jason
--
PHP General Mailing List (http://www.php.net/)
To
(try doing an nslookup of that at es.whois-servers.net :)).
Anyone interested in the data structure and underlying scripts, let me
know and I'll see what I can do about packaging it up.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General
Does anyone know why the list keeps going down ?
It hasn't happened for a while until now - I wouldn't worry myself
too much over it :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
However, Apache htpasswd is an interactive program and we
need manually input the password, is there a way to automate
and batch process this using php scripts?
[jason@phpdev htdocs]$ /usr/local/apache/bin/htpasswd --help
Usage:
htpasswd [-cmdps] passwordfile username
Pardon for the OT but what would cause "Resource id #"x to
show up in my select box from a select box populated from a database?
You're probably echo()'ing your database connection resource, instead
of the actual value you've pulled from the database.
Jason
--
PHP General Mailing List
You can override (and yet still have access to) inherited
class methods in subclasses. Have you looked at applicability
of OOP in your implementation?
Unfortunately, I'm pretty much an old-school programmer, I just
can't wrap my brain around OOP and don't have the time to stop
and learn :\
BUT you can't do this:
function foo($var=date("Y-m-d"))
{
}
But, you can do
function foo($var='defaultvaluethatwillneverhappen')
{
if ($var == 'defaultvaluethatwillneverhappen')
{ $var = date("Y-m-d"); }
}
Why? This would be a kick ass little trick!
Mmmm, well ... *shrug*
on screen, and not the $total.
thanks,
Augusto Cesar Castoldi
Hi there,
I guess you have print $buffer
Jason
--
Jason Murray
Developer
http://www.jwebmedia.com/
1 877 525 jWEB
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
This thread has really fired up my desire to go the states US$80
an hour for php dmn, that's a shitload more than I
make here, which is more like US$20/hr
Remember though, if you're on a salary you'll get less an hour for
ANYTHING (not just PHP) but it'll at least be
I am writing a script that will send me an email every time a 404
error is returned for an http request. So far I have the script
working so that it will email me and inform me of the URL of the
page that has the offending link by using the HTTP_REFERER environment
variable. I would
some other wierdness.
Regards,
Jason
--
Jason Murray
Developer
http://www.jwebmedia.com/
1 877 525 jWEB
--
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]
I'm studying some code from the net and was kinda curious. There are
places where it references variables like this:
$$testvar
What's the difference between that and
$testvar
?
$testvar means "the value of the variable named 'testvar'".
$$testvar means "the value of
Hi there,
$ob-date is '2000/03/06'.
$d = ereg_replace('([0-9]*)-([0-9]*)-([0-9]*)',
'\2/\3/\1', $ob-date);
$d is now '03/06/2000'.
$foo = getdate(strtotime($d)+86400);
Here I have to add an entire day to the value of strtotime($d) to get
the expected results for below.
Use include(). Like
?
switch ($page) {
case "audio" : include("audio.txt"); break;
case "visual" : include("visual.txt"); break;
}
Greetings,
Jason
--
Jason Murray
Developer
http://www.jwebmedia.com/
1 877 525 jWEB
--
PHP General Mailing List (htt
d be great.
Many thanks
Roland
This will do it:
$dim = sizeof($arrLoginName);
for ($nr = 0; $nr $dim; $nr++) {
if (match) {
return 1;
}
}
Greetings,
Jason
--
Jason Murray
Developer
http://www.jwebmedia.com/
1 877 525 jWEB
--
PHP General Mailing List (http://w
The older look was neat to show off to people re: pop up menus, etc.,
but this is a real speed demon, and will be much more useful for
searching around.
I agree. Very smart, smooth and clean!
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair
care to discuss in the
open? Using real-life examples (with the added realism of budgets,
legacy code, deadlines, etc.) may help everyone here.
I agree - throw us some examples of what you're thinking about, Justin.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch
if( $submit ){
print "I love Montana";
put form #2 in here w/ action = $PHP_SELF make sure you
set $submit2 to
some value
)
elseif( $submit2 ){
print "Part two of script";
}
else{
put your form in here w/ action= $PHP_SELF
}
Actually - do it in the reverse order, because then you
happiness.
I wouldn't *dream* of moving a client's site from the hosting company
to my own system - I don't want to be blamed for the downtime, and any
server problems.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http
over comma delimiting, since your text fields
will probably contain commas but will *very* *exceedingly* rarely have
tabs.
I've ripped some code out of phpMyAdmin to do this (ta Tobias, if you're
watching ;)) - I can post it if you want to.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team,
{
//if ( getmxrr(substr(strstr($check[0], '@'), 1),
$validate_email_temp) )
if ( checkdnsrr(substr(strstr($check[0], '@'), 1), "ANY") )
{ return "valid"; }
else
{ return "invalid-mx"; }
}
else
{
return "i
Why wouldn't this redirect?
Because you need to do this:
?
header ("Location: $redirurl");
?
Jason
--
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:
Is there a way to find out the mumber of days of a given month? for
example a function that I pass the month number i.e. 02 (February) and
it returns 28?
Date("t", $unixtimestamp);
If you have a month "2", you need a year as well since February's days vary
according to the year, so:
ok I've changed it the SELECT to CHECKED but it had no effect ...
input type="checkbox" name="avail" value="" ? if ($avail ==
'n') { echo 'CHECKED'; }?
I've also tried it with a "n" value so it reads like
input type="checkbox" name="avail" value="n" ? if ($avail
== 'n') { echo
1.
2.
Both seem fine to me.
3. At the time of upload, it is possible to specify a list of
users who can "view" and "modify" the file. Currently I am storing
this list as a whitespace-separated list in a mySQL TEXT column.
Column "view" data: 3 11 1
At the time of displaying the
you can't stream output like that...netscape will wait until your
HTML output is done, but if you're infinitely looping, it won't be, and
you'll never get your /body/html tags.i've seen a number of
posts trying to do chats and flush() the output, but bottom line, if you
don't send it
you
know 8)
If there aren't any around, I'll start one on Yahoogroups or
some other similar service.
Feel free to do it, and best of luck. :)
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-ma
Perhaps i'm not following what you're trying to do, but why not
manipulate the height/width img tag attributes to make it look like a
thumbnail, but then when displaying it for real, take them out?
Because then you have to download the entire large image.
Large images are bigger. :)
Jason
Fatal error: Call to unsupported or undefined function
foreach() in ...
You're probably using PHP3 on that Apache server.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail
HTML doesn't pay attention to line breaks, thats why you're
needing a BR...
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
-Original Message-
From: Ray Gaylog [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 3:49 PM
Like google has it's toolbar, why not have a PHP Manual toolbar? That
would be *great*. Just type in the function name and hit go and the
manual comes up.
You could probably work a bit of javascript magic in a bookmark to
do the same thing.
I've seen bookmarks that pop up a javascript
news would actually be a PHP script, of course. I know how
to handle /2002/01/02/keyword as parameters, my question is on
making news be interpreted through PHP.
Off the top of my head...
You could either use a .htaccess to force Apache to recognise
news as a PHP script, or you could use a
So far nothing seems to work which leads me to believe
there's something else wrong.
Here's what I've tried
$service_type_insert = $x['926service_type']; //works fine
when I hard code
a value in and returns proper value
$service_type_insert = $x[$$keyservice_type]; //returns empty
A 404 ErrorDoc would still reply with a 404 code, which could mess up
some search engines.
Not true, try this: www.inww.com/ifdbnifoudbvfd
This is actually produced by ErrorDocument 404 /404.php3 in our Apache
configuration, and 404.php3 is a PHP script that sends the neccessary stuff
to be
True, but if I remember right, the hit will end up in your
error_log not in your access_log.
Ah. Bugger.
But since this would require messing with your Apache config
you could adjust that anyway surely?
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
When you run phpinfo(), the first line of detail has the OS
version. What variable produces this?
Thats the output from uname -a on the command line... at least,
under *nix it is...
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
My problem is that I want to use events in my forms but I do not know how
to
use php as a script for an event. Say I wanted to do something as simple
as
(within a form): input type=button value=Test onclick= ?php print
'testing, testin 123';?
Essentially, when a click this button in a
I need that that my webmail can send mail with many attach.
How can I do it?
You could either ask the user how many attachments they want,
and present that number of INPUT TYPE=FILE fields, or you
can grab the file attachment from the user, store it in a
uniquely-named temporary directory,
in aol.com could
be in the USA, Europe, Asia, or Australia these days.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Thank you Jason ,I will check the Digital Envoy to get more
information, have you got the website address of it?
www.google.com ... digital envoy ... I'm feeling lucky :)
... or just www.digitalenvoy.net.
Search engines are fun :)
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne
Is there a way around this? Or is this a limitation of my
older versions of PHP and MySQL?
You need to apply addSlashes() to the text fields before entering
them into the database.
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
What is an addSlash ?
How can I appy addSlashes ? Can anyone give me an example ?
Try the manual ... http://www.php.net/addslashes
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
Here is the error...
Warning: Unable to jump to row 1 on MySQL result index 2 in
/blahblahblah/patient/display_search_results.php on line 39
This means that the query you executed didn't return enough
rows to count up to ... 1.
Here is the code on line 39
$d = mysql_result($result,
Here is the code on line 39
$d = mysql_result($result, $c, id);
the field id is an auto_increment column.
$c is an exsisting row in the query, $result.
Any help?
Yes, it looks like $result doesn't contain anything, so maybe
your SQL is messed up.
Oh yes, additionally
Why PHP is so not popular in the computer science teaching area?
Well, here at RMIT in Melbourne Australia they're teaching all
the first year students PHP...
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
The file is running on an NT box and can be accessed fine
through IIS. It is only when using the include() statement to
this file that problems occur. If I do a local path map to it,
it will include fine but when using an URL it gives that error.
Can you retrieve the file from that URL
stumped.
\n is the new line character. Make sure you use it in and
not in ''.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
: Don't know why it's got everyone else stumped.
:
: \n is the new line character. Make sure you use it in and
: not in ''.
:
: Jason
Unfortunately, that doesn't work either, it changes the \n that
appeared at the end of the new line to a single black block. It
does not put the next
I thought this would be easy but it ain't. What I want is
the id number of the last record in a table.
If you use mysql_num_rows() and decrement it by one, you'll
have the ID of the row you can use with mysql_result.
Jason
--
PHP General Mailing List (http://www.php.net/)
To
1 $limit = 5000;
2 if(strlen($text) $limit)
3{
4cut $text down to $limit length
5$text .= ...sorry, text was too long;
6}
4$text = substr($text, 0, $limit);
5$text .= ... (More);
:)
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
I'm think I'm going to start forwarding all the bugtraq
alerts for PHP scripts to this list. Any objections?
Yes, if the author of the script isn't on the list it's useless
unless someone wants to patch their script themselves. And if
they're the kind of person who's inclined to do that,
I'm processing a form but all the functions I've found on the
web only seem to add the BR after the \n. I need to remove the
\n altogether - anyone know how I can kill the \n and put a BR
in it's place?
Sounds like you want a simple ereg_replace(\n, BR, $sourcestring);
Jason
--
PHP
Isn't there a function br2nl() and it's relative nl2br() ??
There's nl2br, but I don't believe there's one that goes the other way.
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
suspect your connection isn't working, as I've never
seen 127.0.0.1 used - normally I just use localhost
or .
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED
might be busy at the time). If you think
you've graduated from the Newbie class, pat yourself on the
back, move on, and quietly unsubscribe yourself.
Don't make fun of the newbies who come here for advice.
They don't know any better, and we were all new to PHP at
one point.
Jason
--
Jason Murray
copied the uploaded data into.
Take care that you use the appropriate security measures to protect
yourself against exploits here.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
Jason L wrote:
Of course, I am lucky enough to be working in a place which uses
PHP/MySQL for practically everything, and Perl in a few others.
And say ASP, and you are liable to get your head shot off.
Same here, everything web-related anyway ... but the head-shot-off
attitude is in
The error message might be useful, but in any case I think
you need to enclose the source filename in quotes; also (you
better check the docs here) if I remember correctly you need
to give the full path to the source file unless it is in the
mysql data directory.
That's right, it needs
I have the need to be able to mail out a text file. whats
the best way that I could do this?
Simple answer: mail(). If you're not sure, www.php.net/mail.
More complicated answer:
Are you talking about using a text file as a template for
the email, using a user-uploaded text file as the
I figure if I'm forced to go M$ I'd much rather use C# that
VBScript...
C# actually seems to be getting quite a lot of positive mentions
in the *nix world at the moment.
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Well, the projects that are underway to create a open source
implementation of the .NET platform as evidence that at least
some people in the *nix world have been quite taken with it...
That, and the number of positive mentions its getting on SlashDot
in the last week or so.
Jason
--
PHP
Any expert programmers out there with the way to chop this
even further?
I would suspect that chopping this further would make it
even harder to understand/maintain in the future...
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello. I just finished creating a simple input form in
which the contents of a textarea get written to a file
which in turn gets read by a particular page.
This is a Really Bad Idea(tm).
it seems pretty dangerous to allow a user to enter any
amount of php programming at their will.
...
Would strip_tags() do?
Easily gotten-around then by not closing your PHP ? ? tags.
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Your problem is a simple HTML formatting problem - your FORM
submit button is inside your TABLE but outside a TD (it's
after the final /TR), thus Netscape puts it above the table
entirely.
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
-Original
I'm looking for a function that turns special charcters into
html charcter codes ( into quot;). Is there one?
Please try the manual before you ask here.
If you'd looked, you'd have found the function:
html_special_chars()
... which you'll note is named extremely closely to the
wording
This had worked without problems..
It sounds like the text encoding could be wrong. Using
some encoding types, =charchar means something else.
Maybe the charset you're using needs to be looked at?
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
unneccessary)
- Firm grasp of SQL and MySQL use
- Reasonable grasp of HTTP and networks
Please email me directly - [EMAIL PROTECTED]
Thanks
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne
backward compatibility (and thus
accessibility) with non-JavaScript browsers.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The function sendtohost:
[snip]
Is great for posting results to a regular http site. But
what I need to do is post to a secure site (https).
At that point, you'll want to look into using CURL extensions
to PHP.
http://www.php.net/manual/en/ref.curl.php
Jason
--
PHP General Mailing
What is the code to make a string into lower case?
Could you please check the manual before you ask like this?
It's strToLower().
http://www.php.net/strtolower
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
PHP General Mailing List (http
I need to make this case insensitive. This seems like over kill?
if((substr($author, 0, 1) == a) or (substr($author, 0, 1) == a))
{
}
if((strtolower(substr($author, 0, 1)) == a)
{
}
:)
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
-based
code just ain't there.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
for ($i=1; $i 12; $i++) {
echo state_$i; // This would print out either Yes No or Maybe.
}
What you actually want is:
for ($i=1; $i 12; $i++)
{
$mystate = state_.$i;
echo $$mystate; // This would print out either Yes No or Maybe.
}
$$X tells PPH to use the
... could you please use a *slightly* less obnixously long
signature when you post to the list? Signatures aren't
supposed to be over 4 lines (and if we want to know your
AIM/ICQ/MSN/Y! ID's, we'll ask you).
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak
it in the database. :)
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I would like to know why you put this character (!) in front of this:
An ! means that the following statement should be false. So:
if (!isset($variable))
means If $variable is not set
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
?php
function questions()
{
[snip]
a href=?php echo $PHP_SELF??page=questionsfont
[snip]
}
?
$PHP_SELF is unknown to the function questions().
You'll need to add global $PHP_SELF at the top of the function.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work
that HTML source code tells the browser how
to render the page.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there any PHP function that works like ColdFusion's location tag?
After a certain execution, I wish to leave the current PHP
page entirely and go to another page. Is this possible?
That's a HTTP Header, so you want to use the ... Header() command.
A Location header is what does the
Or, alter your page's structure so that it writes its output into a
buffer, and echo/print it at the end of the page. That way you can
do the redirect at any point it's needed within the page logic.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later
I went to php.net wnating info on the date() function. To my
surprise the word date was already in the search for field.
It was probably the last thing you looked for there. I know I
constantly go back to look up Date() placeholders. :)
J
--
PHP General Mailing List
since the security patch
was installed.
These servers are Sun 420's running Solaris SunOS 7, 1 Gig
RAM, Apache 1.3.19, Apache JServ 1.1.2, PHP 4.0.6 + patch so
you can imagine how we're surprised at the high load on them...
Has anyone else experienced this or similar?
Jason
--
Jason Murray
1 - 100 of 311 matches
Mail list logo