You have to check for it, regardless. See if this works for you.
$url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING'])) ?
$_SERVER['QUERY_STRING'] . '' : '' ) . 'newVar=1';
The middle part basically sees if the QUERY_STRING is empty. If it is, it
includes a question mark
Replying to myself... :)
You have to check for it, regardless. See if this works for you.
$url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING']))
?
$_SERVER['QUERY_STRING'] . '' : '' ) . 'newVar=1';
The middle part basically sees if the QUERY_STRING is empty. If it is, it
['PHP_SELF'].
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
How do you create thumbnails from .BMP files? Is there a function
like
there is for JPG (ImageJPEG)?
Probably need to use an external program that understands that format
and an exec() call.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect
Yes, no problem! Glad it worked out. you may wish to actually study the
perlre man page on perl.com. This goes into the most details and talks
about
how PERL actually EXTENDS shell regular expressions significantly and
excellent resource that I have used many many times.
I figure since PHP
is it?
Are you sure it's not fine in the database and you're just showing it
like:
input type=text value=$value name=field
which will end up like
input type=text value=St. Petersburg, FL name=field
and will only show St. in the text box...
---John W. Holmes...
Amazon Wishlist: http
I am wanting one field on a table in one of my MYSQL databases to
contain
different dates and times as a epoch timestamps.
Firstly how do I convert a particular time and date which the user
will
enter on the website into the epoch timestamp.
$db_timestamp = strtotime($user_input);
And
the first user.
Hope that helps.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
ridiculous.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
Simply trying to use regular expressions to validate a 5 or 5+4 zip code,
excluding 0 and 0-. Looked on http://www.regexlib.com, and
that's where I found the pattern below, but it doesn't work. The best I
can
do on my own is two separate regular expressions, one to match a valid
: mysql_fetch_array(): supplied argument is not a valid MySQL
result
resource
Can someone tell me what's wrong with this part of the code?
You're query is failing. Use mysql_error() to find out why (probably
because you need a GROUP BY clause).
---John W. Holmes...
Amazon Wishlist: http
I'm getting strange behavior in some of my scripts
I just upgraded from 4.3.1 to 4.3.2 and was hoping it would solve the
problem. The problem is that variables changes its values from one line
og
code to another - without specific code that should change the value.
Do anybody else had this
I have a value 178607, which is stored as seconds. I
like to convert it (178607 Secs) to Hours, Minutes and
Seconds appropiatly.
Can anybody help me supplying the code?
If it's stored in MySQL, you can use SEC_TO_TIME()
mysql select sec_to_time(178607);
+-+
|
On Tuesday 03 June 2003 13:58, Jay Blanchard wrote:
[snip]
We would have to see some code
Jay
I'm not able to reproduce this in a short code-snippet.
But from the first echo to the last echo $lid change its value:
Either this is a bad cut and paste job or this script will never
I'm trying to build a news panel for my home page. Basically I want to
present the five most recent news articles in a recordset, but I'm not
sure how to cut off the recordset after 5.
Also I want to present a picture with my first headline.
My code will go something like this:
?php
I've built a page that collects network card information, assigning each
element its place within a $Card array, and all of the cards to $NetCards.
As you enter your card information at the bottom, the previous card is
displayed above it, with a Delete checkbox option at the end of that row
,$page+5);
for($i = $minpage; $i = $maxpage; $i++)
{ ... }
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net
to zero if need be or
timing it out after so long...
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net
yeah .. I knew it .. but it would be so very helpfull if it would be just
included in a superglobal similar to $_REQUEST ...
Do it yourself, if you must: array_merge()
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks, its working fine now, actually a little better than I expected :-)
Dont understand the logic though, if you find time point me to the correct
place where i can read up and figure out the logic you used.
The logic isn't too hard. You're on page X. You show links to other pages
from X
You can also call the file through lynx or wget if you can't call the php
executable directly.
lynx --dump http://www.yourserver.com/file.php
wget http://www.yourserver.com/file.php
Down side is that the file has to be in your web root. Works great for
calling remote files, though.
---John
W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
can't leave out the * for multiplication. y = mx + b in algebra must
be written as $y = $m * $x + $b, for example.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http
From: Randum Ian [EMAIL PROTECTED]
Why pay for something when you can get this for nowt! ;o)
I love getting things for nowt... like candy from a baby...
:)
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I've been getting a warning on one of my scripts since I upgraded from
4.1.2
to the most recent version of PHP. The warning is:
Warning: setlocale(): Passing locale category name as string is
deprecated.
Use the LC_* -constants instead
The script at the line that is failing sez:
When using PHP sessions, if the user's browser supports
cookies, PHP sets the session id as a cookie (so far as I
understand it). So when trying to use the session ID in a
script, a cookie request is sent to the browser to get the ID
and assigns it to the internal variable $PHPSESSID (again,
Is there a way to check within an application if the gd library has
been installed?
Maybe get_loaded_extensions()
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Need some help here. I have to format a line with each piece of the line
being a fixed set of characters in length, wether its a mix of spaces and
letters, or all letters. Here's an example of the line:
06?4111ABDALARM333 N COUNTRY CLUB CANTON
DD8
In this file,
I'm working on quite a large website with a lot of php pages.. And a lot
of
includable functions (modules).. Sometimes one of those modules gets
included twice accidently and then it generates an error .. of course..
This
made me wonder of there's any way to prevent the function from being
Alright with the following code I am using is printing/echoing to the
browser a 1 before the html output. It's like it's adding 2
variables
together.
Here is what I am trying to do. I have a form that enters information
to a
text file, and at the same time sends the information to a
an entire database and then
using PHP to match criteria? Are you using a WHERE clause to do the
sorting? Sounds like you may be going about this the wrong way... if
not, carry on.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine
] = count 2
To cycle through and display it:
foreach($var as $key = $value)
{ echo $key : $value; }
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP
I would like to know where i should be looking to pass an image
through
PHP
Pass it from where to where? What to you mean by pass?
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
If you view source in IE, do you see the entire page? If so, then it's
an IE display issue.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
-Original
How can I print table in my page without I use print command from file
menu? I means just table not all page
Make a print-friendly page that just contains your table. Printing is
pretty much a client side issue, not a PHP issue.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o
Anyone know of a good free thumbnail program that can be called from a
PHP
script using the exec() call or something similar?
Netpbm is used by Gallery. Works very well.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine
not desirable, you could look into using the is_float() or
is_numeric() functions, or a regex such as:
if(preg_match('/^[0-9]*\.?[0-9]+$/',$string))
{ echo good; }
else
{ echo bad; }
That will allow text/numbers with or without a period.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o
linking
to the other domain. This will only work if both domains use the same
directory for storing session files, though.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http
lifetime so it persists after the browser is closed,
like a regular cookie. Where you store your session data is irrelevant.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http
place??
Anyhow...now you'll have to loop through each ingress Object and see
if substr($obj-publisert,-2) matches the month you want.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today
a
little to support certain fields.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
It's an Apache2 / PHP bug. Upgrade to the latest versions of each
(although Apache2 and PHP are still not recommended).
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http
. Leaving them in there will allow you to
produce more stats on which keywords are most popular, etc.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP
or not.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
Is there an OOP (object oriented programming) structure for PHP? If
so,
could someone show me the basic structure of such an object? An exmple
with
definition and implementation would be great. Thanks!
http://us2.php.net/manual/en/language.oop.php
---John W. Holmes...
Amazon Wishlist: http
, also.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
of a link and use GET, or put them all into
COOKIEs to retrieve on the next page, or finally, put them all into the
SESSION to retrieve on the next page.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals
So does your code work? Here's a tip: Try a simple example, like what's in
the manual, and see which method works for you. If they both work, which one
do you understand? Use that one...
---John Holmes...
- Original Message -
From: Pushpinder Singh Garcha [EMAIL PROTECTED]
To: [EMAIL
Is it possible to tell PHP when converting a number to a string (i.e.
in
an echo or print command) to use x decimal places?
Yes, it is.
Specifically, if I
?php
echo '$' . $some_price;
?
And some_price is $1.50, it outputs:
$1.5
Thanks in advance,
You're welcome.
---John W
that backtick (`) is not the same as a single quote (').
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net
Just one question, is there any way that when a person logs in via the
htaccess popup that i can know via my php script...and can i also get
his
username?
Have you read the chapter on HTTP Authentication? No. Read the very
first paragraph:
The HTTP Authentication hooks in PHP are only
Agree 100%. Don't assume that just because you use JSP, or any other
language, your program is going to instantly scale well and be easy to
maintain. You can write crappy, inefficient code in any language. You can
also write good programs in most any language if you put the proper planning
into it
I have a blob in the database. I want to open a file=BLOB in the browser
such
a way as if I clicked on a link. So if it is pdf, its opened by pdf
plugin,
if it is doc, it is open by word plugin, if it is zip the dialog for
opening/saving to disk is opened, if it is jpeg it is directly
-Original Message-
MSSQL seems to be a little bit messier that MySQL..e.g limit clause etc
Anyone know of articles/examples that specifically deal with this issue?
Look into the Top() function for MSSQL. It goes something like:
SELECT Top(10) * FROM table
You should be able
I dont know how exactly to explain this but will do my best, i have many
of
the following lines in a page:
tdpinput type=checkbox name='id[]' value=23input type=hidden name
=package value=loco package/td
tdpinput type=checkbox name='id[23]' value=loco package/td
each line of course has a
Anyone know how to change the magic_quotes_gpc? I need it to be on in
PHP.
Running PHP 4.1.2
Change it in php.ini or in an .htaccess file.
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get
:
$_SESSION['id'] = $id;
Since you have register_globals on, I guess you'd use:
Session_register(id);
maybe... :)
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http
if a string is:
$x=A.B. XYZ;
and if I post it as a hidden form control and echo $_POST['x'] then I
get:
A.B.
and not A.B. XYZ !
What should I do?
Learn HTML. Use quotes around your attribute values:
input type=hidden name=foo value=A.B. XYZ
---John W. Holmes...
Amazon
id number.
Any help is appreciated
$next_number = $id + 1;
$link = http://xx/index.php?id=$next_number;;
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com
I am trying to create a very basic page where we can all easily work on a
document. I just have a huge textarea that inserts the text into a
longtext
field in the mysql db. I use nl2br to keep the formatting. Of course,
when
the document is viewed in the textarea, all of the br / are there.
Use stripslashes() to remove the slashes. Use htmlentities() on the text
before you put it into the textarea, also.
---John Holmes...
- Original Message -
From: Matt Palermo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 4:16 PM
Subject: [PHP] slash trouble when
snip
Sorry, I donĀ“t know that you needed an effective snipet. And you are
right,
I only writed for positive integers. Try something like apply 2 type
cast
simunltaneous.
if ( (string) ((int) $_POST[var_int]) == $_POST[var_int])
echo is int;
Why not just use the is_int()
I recently installed 4.3.1 and enabled the magic_quotes_gpc to deal with
quotes in mysql inserts.
However, I think I have run into a problem that might be related, and
was wondering if there is an easy way to fix it:
I have a script that gets user input from a drop-down, on the action
James E Hicks III wrote:
I am experiencing some weird problems with PHP. When I execute the following
query from within a PHP script, the description is set to 'EBCO' and not
'EBCO\030774-006\BUBBLER VALVE'. When I execute this query from the mysql
monitor the value is inserted correctly.
$query =
James E Hicks III wrote:
\0 is a NULL character, IIRC. Either use single quotes:
echo ('EBCO\030774-006\BUBBLER VALVE');
or use two slashes, like you did above:
echo (EBCO\\030774-006\\BUBBLER VALVE);
---John Holmes...
Problem is that this description is coming from a DB, that's
why I was
Tim Thorburn wrote:
I'm setting up a simple tracking program for a website I'm working on.
Currently it records a visitors IP address, but I would like to be able
to do a DNS lookup of these IP addresses. Is this possible with PHP and
if so, how is it done? I've been looking through Google,
James Hicks wrote:
The following variable needs to be escaped before it can be submitted as an
MySQL query. It seems that the \0 in this string is causing me the problem. I
have tried several functions in an attempt to escape this variable. Anybody
got any other suggestions. The resulting
[EMAIL PROTECTED] wrote:
doe anyone quickly have a working
4.3.1 php.ini file, under apache 1.3.27 and redhat 7.2
that I could take a look at...for reference...
you see, I think ours is missing some lines...
of commands or something...it just doesn't look right
something is missing...I think.
so
Ben Houlton wrote:
As the subject say, when putting or ' in text field, \' or \ is returned.
I'm not sure why, but it only happerns when it is returned in a input -
text field box.
Could you tell me how to fix this.
If you have magic_quotes_gpc enabled (which it is by default), then
quotes will
Sebastian wrote:
I posted this at several other discussion forums, and i haven't received any
real way of doing this.
i am about 3/4 done with a article management i am working on and came
across a problem i can't seem to figure out.
On to the question ..
I currently have this query:
$result =
I need a really simple function that retrieves the actual page file name
from a URL. So, if the URL is http://www.server.com/pagename.php, or if
it is http://www.server.com/directory/pagename.php, the function in both
cases will return pagename.php.
I'm sorry if this is a ridiculously easy
Frank Keessen wrote:
Still strugling with array's ; : Can you help me with this??
input type=\text\ name=\test1[$i]\ size=\6\
How can i put that value into an $_SESSION??
Something like $_SESSION[test1][$i]??
This is the way i put into a database
foreach($_POST['test1'] as $i = $Value) {
Rolf Brusletto wrote:
Just kind of curious what people think. In your opinion,
should a function avoid output? What I mean by that, is should a
function on do something without having echo or printf commands in it?
This is something I've been thinking about lately to improve my
Frank Keessen wrote:
Hi jason the rest,
Dit the session_write_close()! Nothing still displayed in step3, more
thoughts??
$_REQUEST[submit]=isset($_REQUEST[submit])?$_REQUEST[submit]:;
if($_REQUEST['submit']!=)
{
foreach($_POST['test1'] as $i = $Value) {
$_SESSION['test1'][$i] =
Ow Mun Heng wrote:
What I would like to do is to input multiple isbn numbers into a form, get
PHP to parse it into an array so that I can build the SQL query for multiple
insert. Currently I'm able to perform single inputs, one at a time, which is
time consuming.
I want to have a formtextarea
At 16:19 17-6-03, you wrote:
$sql = 'select * from db where apple = \'' . $_POST['foo'] . '\';';
Like that?
you missed some quotes:
$sql = 'select * from db where apple = \''' . $_POST['foo'] . '\'';
Go back and count the quotes again. The original post is correct as far as
quotes go. Yours
array[numrooms] = Array ( [3] = 2 [2] = 5 [1] = 1 )
I want to get a result like this:
2=5
3=2
1=1
( I want the keys to stay attached to the results)
perhaps asort()?
This function sorts an array such that array indices maintain their
correlation with the array elements they are
Is there a way to run a script (to check a table for new fields, or to
check time..etc) evrey few hours, without using programes souch as
crontab.
In addition to what others have said, you don't _have_ to set up the cron
job (or any scheduled job) on the same computer as your scripts. If you
One of the coolest things I have seen online, and some of you may not even
know this works, but if you type in the url: http://www.php.net/foo;
you'll be taken straight to the foo page of the php manual, if one exists.
If foo doesn't exist, you pull up a Google search-within-the-site page.
I
Jason Wong wrote:
On Wednesday 18 June 2003 18:27, Neil wrote:
I am trying to strip all HTML and other tags from a document, I have
read the docs and written a 4 line script that should do the job (from
my point of view ! ). However it seems to have literally no effect.
Heres the script :
?
Neil wrote:
I know that file() returns arrays, but i think
readfile() returns a string.
Stop thinking and read the manual. :)
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
PHP|Architect: A magazine for PHP Professionals www.phparch.com
--
PHP General
No, I'm all for a public flaming... let him serve as an example to others!!
:)
In all honesty, I have posted about the htmlentities/htmlspecialchars()
requirement when putting data in form inputs quite a lot recently. You
should have picked up on it sooner. :) Oh well, though... at least you know
Does anyone know about the ideal session filesize
limit? I am using the common functionality in the
entire application. So i am thinking to store data
into the session file once user logs into the system
rather retrieving the information from database on
each user request. But i dont know
nabil [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
when i use str_word_count() i got the following :
Fatal error: Call to undefined function: str_word_count()
and my PHP is Version 4.2.3
What is the problem ???
Reading English?
us2.php.net/str_word_count
PHP
Anyway, can any make a suggestion on how to connect to a c function from
a php app?
I have to connect to a sales tax calculation software. The function
is being written for me but I have to figure how to call it - get the
variable - and use it again in my php app.
I've been told there's
LISA, in collaboration with Lemoine International has made Software
Testing and Internationalization by Galileo Computing freely
available for download.
[snip]
To download a copy, please visit
http://www.lisa.org/interact/2003/swtestregister.html
How about a privacy statement on
Javier wrote:
Hi, I've upgraded to the latest version of php last week. Suddenly parts
of code that was working now displays error.
The errors I've found until now are related to Sybase (I use MSSQL 2k as
DB server)
Here is an example:
Warning: mssql_num_rows(): supplied argument is not a
What is the best way to validate a money input? For example, 3452.67
versus 3452..67.
if($value == (string)round((float)$value,2))
or
if(preg_match('/^[0-9]*\.?[0-9]+$/',$value))
appear to work. :) Assuming your value is a string to start with.
---John Holmes...
--
PHP General Mailing
I am new to PHP and am trying to get access to files that are uploaded.
I have RTFM ;-) and have noticed that PHP writes the file to disk in a
temporary location and provides a method/class with all of the
information needed to access it. I am loading (PDF's) into a binary
field in mySQL and
Vernon wrote:
Not for nothing, but every time I post to this group I get treated poorly.
It has to do with php and I've already gotten an answer from this group, off
the PHP web site no less!
http://www.php.net/manual/en/faq.html.php#faq.html.javascript-variable
Doesn't take much to spread a
try this:
?php
header(Content-type: image/jpeg);
fopen (d:/crushme/images/1.jpg, r);
Just my opinion, but maybe you should try reading the file and echoing the
data instead of just opening it. :)
---John Holmes...
I would like to pass an image throught
How do I trap a PHP error and display my own error message instead?
I have two PHP scripts - one that creates tables on MSSQL and one that
deletes tables on MSSQL. I wish to capture the message that appears if
the user attempts to create tables that already exist, or delete ones
that do not
How do i generate a unique random number?
You can use rand(), but there's no guarantee it'll be unique unless you
remember every number you've ever generated
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
setting up some pages to allow users to log in, and store their userID in
a
session var.
for development purposes, i've installed AMP on my windows box.
-everything parses fine
-register globals is on.
problem: session vars do not seem to be carrying over pages, even when i
set
the
Apache 2.0.40
PHP 4.2.2
Linux
I have a single php script for downloading requested files. It works
beautifully on http over port 80. It does NOT work at all over https on
port 443. I am using the exact same script (the very same file) for both
http and https connections. Apache has the
Can anyone tell me what is wrong with my PHP script? I am trying to add
information to an MSSQL database from a separate HTM file. The script it
as follows:
How about you tell us what the problem is? What is the result of this
script? What are you expecting the result to be? Take away the @
i am trying to send mail from a script, but i receive these error message:
Warning: mail() [function.mail]: Failed to connect to mailserver at
localhost port 25, verify your SMTP and smtp_port setting in php.ini
or use ini_set() in c:\apacheserver\apache\htdocs\work-net\serial.php on
line
I looked in the manual (twice now). I want to keep logging to the log
file but print to browser on this one script.
I have in my script:
error_reporting (E_ALL);
error_reporting (E_ERROR | E_WARNING | E_PARSE);
but they're still only being logged to file. I dont have access to
php.ini.
Is there any way I could loop thru and print all the month names (i.e.
January, February)?
Just make an array and loop through the array. You know the rest of the
names, right? :)
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
1. How do you setup a cookie that will not expire??
You can't.
2. How do you put 2 items that you want to save in
the cookie and retrieve?? Examples in the PHP manual
only show how to work with a single value.
You can't. Use an array or two cookies.
---John Holmes...
--
PHP General
1001 - 1100 of 2745 matches
Mail list logo