Hi Col,
Interesting problem.
> Are there any other approaches I've missed?
Off the top of my head, how about this:
1. Add a new unsigned int column called "SortOrder" to the table of widgets
or whatever it is you're listing
2. Fill this column with randomly-generated numbers between 0 and wha
Hi Jordan,
> Do you somebody know some simple text editor with buttons
> for bold italic etc.
TinyMCE is worth a look:
http://tinymce.moxiecode.com/
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Tris,
> But is there an easy was to calculate 90 days
> from the timestamp...
There are 86400 seconds in a day... can't you just do something like:
$timestamp -= (86400 * 90);
Or even
$timestamp -= 7776000; // 90 days
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To
Hi Fernando,
> I have a PHP application that passes variables (values) from a form.
> I get these using $_POST
>
> However I do also post some variables via a link. Which ofcourse requires
> register_globals to be ON.
Do you mean variables in a URL, like this:
www.example.com/index.php?foo=1&bar
Hi Tris,
> reset the session variable:
> $_SESSION['details_captured'] == FALSE;
>
> Re-asign it to yes:
> $_SESSION['details_captured'] == "yes";
You're using ==, which is the comparison operator - give it a go with just a
single = instead.
Cheers
Jon
--
PHP General Mailing List (http://www.p
Hi,
> How can I get the values of 'max_execution_time',
> 'max_input_time' and 'memory_limit' from my php script ?
Use the ini_get function:
http://php.net/ini-get
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
> Good coder will understand this at a glimpse:
[snip horrible code]
> if($pos_params!=false)
Assuming it's a boolean, $pos_params is *already* true or false, so testing
it like this is pretty much pointless. It makes more sense (and is much more
readable IMHO) to do something like this:
i
Hi Steve,
> $pfile = str_replace('get.php?file=','','$file');
> $p = explode('.', $pfile);
> // How do I say look at the extension and put it into the switch?
> $extension = $p;
> // end of the bit I'm stuck on.
At this point $p is an array rather than a variable, so you'll need to get
the last e
Hi Ryan,
> $tireqty = $_POST['tireqty'];
> $oilqty = $_POST['oilqty'];
> $sparkqty = $_POST['sparkqty'];
That'll certainly fix the problem, but it kind of defeats the point of using
$_POST :-)
Ideally you'd clean the data at this point to make sure no-one's trying to
submit anything nasty (Googl
Hi Ryan,
Sounds like register_globals is turned off on your server (this is generally
a Good Thing). Rather than having all your form fields converted directly
into variables - which your book is assuming, as it's how PHP used to do
it - you'll need to access them via the $_POST array.
Try changi
Hi,
> I have this database with this fields; id and
> number_attacks. And every 10 minutes
> number_attack to be increased by 1.
You'll need to set up some sort of scheduled task (if you're on unix, your
best bet is probably cron) - this task should call a script that connects to
your database an
Hi,
> is it possible to pass an Object to another php page?
Have a look into serialization:
http://php.net/manual/en/language.oop.serialization.php
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Harry,
> can someone explain this for me:
> ...
> $sFont =submit("font") ? SITE_ROOT . PROG_PATH . submit("font") : "";
> ...
It's called the "ternary operator", and it's a shorthand for if...else...
The line you're asking about is equivalent to:
if (submit("font")) {
$sFont = SITE_ROOT .
Hi,
> It might even be possible that Winamp itself provides
> hooks to a running instance of itself via command line
> parameters (one can hope) which would simplify the
> task greatly.
Winamp (v2 at any rate, I haven't worked with v3) has a great API, including
hooks via the command line, which
Hi Elliot,
> I need a function to create the dates of previous
> Fridays, in 21-JUL-2003 format.
It'll be different depending on what you want to happen if you pass a Friday
timestamp to the function, but it should be something like:
function friday($ts)
{
while (date("w", $ts) != 5)
$ts
Hi David,
> Could someone advise me of a good news reader.
Agent is pretty good:
http://www.forteinc.com/agent/
Mozilla has a mail and news component, which you can download on its own if
you don't want the browser, IRC client, HTML editor, etc:
http://www.mozilla.org/projects/thunderbird/
Chee
Hi Haseeb,
> i.e. divide the functions into files. and then include
> only that file that has the function.
That's how I usually do it - for example, I have a file called
"dates.lib.php" which contains all my functions for handling dates and
times, a file called "db.lib.php" which has my database
Hi Tony,
> The UPDATE command does not seem to support
> the ORDER BY part despite it being listed in the
> instructions on the mysql.com website.
This is only supported in versions 4 and above - if you're using 3.23 you
can get away with LIMIT in your update queries, but not ORDER BY.
Cheers
Jo
Hi Sharat,
> How do I communicate betwen an HTML page
> having JavaScript and a PHP server code without
> having to refresh the HTML page.
I don't think this is possible: once PHP has run (and sent your Javascript
to the browser), it's finished - you can't use it again until the next time
the pag
Hi Gary,
> Is there a default variable built into PHP that has
> today's date?
Have a look at http://php.net/date for this - http://php.net/mktime will
probably be of interest as well.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/un
Hi Roy,
> If $amount equals for example 52., how do I get
> that to print as "52.00" similarly, if amount =
> 52.5 how do I get that to print as "52.50"
Have a look at the number_format() function, it should do what you want.
It'll also add commas to break up any thousands in your number (you ca
Hi Chinmoy,
> 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?
Try something like this:
";
echo sec2hms(60). "";
echo sec2hms(66). "";
echo sec2hms(3600). "";
echo
Hi Mukta,
> I want action of a form to be PHP_SELF untill user
> presses "continue" button. If continue button is
> pressed than "next.php" should be the action of the
> form. how to do this?
One way would be to have two buttons in your form, but submit to only one
page:
... and then, o
Hi Dan,
> the ini file looks like: hostip&user&password&databasename
> after I import it, I split it up, and assign each to a variable
> name. I also have it outside the doc root, and it gives a
> generic error msg for every error in the system.
Should do it - it's a bit of a long-winded route, t
Hi Dan,
> I would like to get some opinions here on a method I'm doing
> to grab connect information for a mysql connection. Currently
> I am doing:
> $pinfo = fopen ("/director1/directory2/filename.ini","r");
Does this filename.ini contain the code to connect to your database? If so,
I usually
Hi Tomás,
> What's the meaning of this error?: FTP_PUT: Could not
> determine CWdir: No such directory.
^
Are you trying to save a file in a directory that doesn't exist?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Hi Siva,
> checkdate function verifies whether the date is valid or
> not by taking month, day and year as arguments.
> The problem is when someone enters a three digit year by
> mistake (200 instead of 2003), this function does not catch it.
Yes, I've been bitten by this as well :-)
> We are se
Hi Sebastian,
> $variable = $id;
> // some other stuff
> @mysql_query here
> $id = mysql_insert_id();
>
> How do I get $id from insert_id() to pass to $variable
> above? Hard to explain the situation i am in, but the
> query has to be below $variable
::blink::
Perhaps something like:
Hi Ryan,
> when configuring php i use --with-mysql and it configures just
> fine. i've even added an =/path/to/php after it to no avail.
Try --with-mysql=/path/to/mysql instead of --with-mysql=/path/to/php.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi Bobby,
> In my code I am trying to send an email (containing a password)
> to a user when he has forgotten his password.
[...]
> The problem is that security leads to needing to encrypt
> passwords in the database. Im using the password function
> within mysql. Is there any way of reversing the
Hi Haseeb,
> if i can get something from user end that is unique
> for that user.for e.g. his/her IP .
Firstly, an IP address can be shared between multiple users, or it can
change constantly for one user.
Here's what a page request from an AOL user looks like (I've snipped the
request paths, b
Hi Iggy,
> I mean the difference between having that code on
> every page or calling it from an external page
> doesn't tell me if it is realy necessary to do it
> all the time.
Yes, you do have to connect to the database in every script that needs to
access it. Usually this is done at the st
Hi,
> function gen_password($length = 8) {
>
> $chars =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
[snip]
Just as a tip - if you want to save hassle for yourself and your users,
remove the following characters from that string:
- 1 (number one)
- l (lower-case letter L
Hi Jason,
> $sql = "select * from table where age>=$age1 and age<=$age2";
> what if i don't know which is value is greater, age1 or age2?
PHP has a couple of handy functions for this: min() and max()
$min = min($age1, $age2); // get smallest of two values
$max = max($age1, $age2); // get large
Hi Coert,
> > There is one field that I whant to stop them from changing
>
> You can put READONLY in your TEXTAREA tag
While this would probably keep the honest people honest (assuming it's
supported across all browsers), it won't stop anyone who wants to pollute
the database. What's to st
Hi Larry,
> Why would they have take up visible space?
It's a block-level element, like a paragraph or a div.
> Hmm, I guess I'll have to find a new angle or hide
> the closing form beyond the table.
You don't have to resort to kludges, just tell the browser what you actually
want:
Hi Luis,
> how can i uploads files to my server by php script ?
The manual explains this (read the user notes as well, though):
http://www.php.net/manual/en/features.file-upload.php
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Shaine,
> ok question: 7days in a week.
> day 1-2 costs $10,
> day 3-5 cost $15,
> day 4-7 costs $10.
I'm assuming you meant 6-7 here instead of 4-7, otherwise you've introduced
a contradiction with days 3-5.
> how can I work out the total if someone stays from say day 2-5?
> or what about d
Hi John,
> Nothing fancy. Can't get it to echo ¶
Is that a pilcrow sign? If so, have you tried "¶" instead, like this:
$inputresult = str_replace('\n', '¶\n', $testtextarea);
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Victor,
> Warning: session_start() [function.session-start]:
> open(/tmp\sess_f4aa3ef3c537bb6327d5e7b991e91be7, O_RDWR) failed: No such
> file or directory (2) in c:\inetpub\wwwroot\picoblog\admin.php on line 2
Pay attention to the error messages. This one explains exactly what you're
doing wr
Hi Diksha,
Please excuse the line wrapping in my last post - you may have to copy 'n'
paste into a text editor to see it as it should be :-)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
> 1) Can we display an alert box using PHP.
No, you need to use Javascript's alert() function. PHP is server-side only.
> 2) I would like to know the max. number of records or max. space
> a database (mentioned below) can provide.
Oracle, MySQL and SQL Server are limited only by the space
Hi Diksha,
> Parse error: parse error, expecting `','' or `';'' in
> /var/www/html/bdoi_change/f1.php on line 11
>
> the code is:
>
> echo"
> Please enter other login id:
> ";
You need to escape the quotes inside the string, or use single quotes to
define it. Either this:
echo "Please ente
Hi Diksha,
> Parse error: parse error in /var/www/html/bdoi_change/f1.php on
> line 10
>
>
>
>
>
>
>
> Business Directory Of India
>
>
You can't use HTML directly when you're inside a PHP block - het rid of the
"";
// etc
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/
Hi Danny,
> > I need to clean up the capitalisation of user-entered personal names.
>
> Well it's hardly rocket science - a flick through the manual and I
> came up with :
> $name=ucwords(strtolower($name));
While that would work in many cases, how do you catch exceptions such as the
following?
Hi,
> $_SERVER[HTTP_REFERRER] does not help.
Not sure if you've got it that way in your code, but that might be because
it's spelt "HTTP_REFERER" - yes, it's wrong, you're right, but you have to
live with it :-)
I think you may also need to quote it like this, but I'm not sure:
$_SERVER['HTT
Hi Bryan,
> > $t = mktime(0,0,0,date('m')+1,1,date('Y'));
> >
> > Gives you timestamp of first day, next month.
> > Format accordingly with date().
>
> is there such a say to now get the date of the first
> weekday after that date?
You can brute force it:
// grab the timestamp
$t = mktime(0,0,
Hi Fredik,
> I have to dates that i want to check who is biggest.
>
> This does not work:
> if( $date1 > $date2){
>
>
> How can i check them?
Presumably they're in SQL format, or something similar?
The easiest way is to convert them to unix timestamps (look into the date()
and mktime() f
Hi Robbert,
> Is there an easy way to find out what the auto_incremented
> number is so I can use it to update the other table?
Sure, have a look at mysql_insert_id:
http://php.net/mysql_insert_id
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.p
Hi Frank,
> I have a form where the user selects for example; how many cars
> you have: 4. Then it most dynamicly create 4 input fields
[...]
Using only PHP, you'll have to make this a two-step process where page 1
collects the number of cars and posts to page 2, which generates the form
accor
Hi Adam,
> Is it possible to have PHP read cd label information?
Where is the CD?
If it's in the CD-ROM drive of the webserver: probably.
If it's in the CD-ROM drive of a visitor to your website: no.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
Hi Hardik,
> I worked on educational intranet and library management system. I
> did comment my code but i dont know how to document functional
> and technical specification as well as database schema.
Theoretically, you should write the specs before the program (that way, the
program matches
Hi Brian,
> What would the SQL be to find a record where:
>start_date < today <= end_date
... WHERE start_date < today AND today <= end_date
If you're asking "how do I get today's date into an SQL statement", there
are two ways:
- use your DBMS's built-in function to get today's date
- use
Hi Bob,
> I want to display an HTML page if PHP can't load an
> include file or otherwise has an error or just doesn't work.
> How do I do this?
Not sure you can, especially not for the "just doesn't work" scenario.
FWIW, you can test for the existence of a file before including it:
if (file_e
Hi,
> Yes, the field in the mssql database is > 1073741824,
> but i want only to grab a few byte.
I think you'll need to do this in the database, then.
If you try and grab the whole field and then parse it in your script, you
have to actually get that gig of data into your script - I assume thi
Hi Per,
> I try to use a SQLqry in PHP, but i get this anwser in my browser:
> FATAL: emalloc(): Unable to allocate 1073741824 bytes
1,073,741,824 bytes is exactly 1 gig - that's a *lot* of memory...
Is this an astonishingly large query? Seems the PHP interpreter can't grab
enough memory to do w
Hi Scott,
> Just curious, is there a PHP function that will break up the
> string for us?
http://php.net/explode
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Greg,
> But the buttons are outside of the iframe, so that no matter how
> large the frame gets, the buttons are always in the same place :/
So stick an image of the button outside the , wrap it in an , and
use the onclick handler to call a javascript function that submits the form.
Of course
Hi,
> I originally had a link #1, #2, and #3. I obviously deleted them.
> I was wondering if there is a way to use PHP/MySQL to get the
> indexed numbers to re-assign so that the first link you see is
> always #1 the second link you see is always #2 and so on?
(apologies for previous incomplet
Hi,
> I originally had a link #1, #2, and #3. I obviously deleted them.
> I was wondering if there is a way to use PHP/MySQL to get the indexed
numbers to re-assign so that the first link
you see is always #1 the second link you see is always #2 and so on?
Thanks in advance,
Roger
PS
The orig
Hi Per,
> Anyone who knows why get variables whit spaces in looking like this in
> the URL blah.php?aa+bb=1 is changed to aa_bb in $_GET resulting in
> $_GET['aa_bb'] instead of $_GET['aa bb']?
I don't think spaces are legal in variable names - PHP's probably just
trying to recover from the dod
Hi Denis,
> if the field is "Jane Enterprises", the textbox shows only "jane".
At the moment, if you view the HTML, you'll see:
Your browser sees this as an input with a value of "jane" and an attribute
called "enterprises", which it doesn't recognise (and therefore ignores
completely).
Wh
Hi,
> I keep getting errors in my script that says 'x' function
> is undefined or 'y' function is undefined. I defined it as
> 'function test ($a, $b)' and call it using 'test($a, $b)'
You need to post code :-)
Try this:
";
echo "a is $a";
echo "b is $b";
}
test(1, 2);
?>
C
Hi Diana,
> If a user inputs a date into a form, what function can I
> use to validate that he put in a valid date?
You can't. Here are two dates in two different formats. Only one is valid.
- 13/04/01
- 13/04/01
Can you spot which is which?
> I want to use checkdate but that needs the da
Hi Kevin,
> I am trying to find out what the best way is to display only
> the first 20 or so characters of a comment.
[...]
> I am not sure if it is best to do it with the select statement
> or format it with the PHP. Either way I am not sure how.
If you only want the first 20 characters, an
Hi Somesh,
> > > This works fine for small files of like some
> > > Kbs but fails to upload larger files near to 1MB.
> >
> > What's your upload_max_size set to in php.ini?
>
> It is as follows
> ; Maximum allowed size for uploaded files.
> upload_max_filesize = 8M
I don't have a clue then
Hi Somesh,
> This works fine for small files of like some
> Kbs but fails to upload larger files near to 1MB.
What's your upload_max_size set to in php.ini?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Cesar,
> Jon, thanx for the fast response, but the problem is
> that the link is made dynamically from a DB and the varvalue
> changes on every link... if it helps, I make this link
> list with a FOR loop in PHP and the varvalues
> I want to pass are the IDs of a table elements.
You probabl
Hi Cesar,
> I want one of my links to open a brand-new
> pre defined window using a javascript
> but I don't know how to pass a variable so
> the opened PHP file knows which info to get
> from MySQL...
In your launchinfopage() function, presumably you're specifying the url of
the page ("foo.
Hi Michael,
> All of the PHP scripts hosted on a Linux server
> I'm working with have suddenly begun producing
> an error message:
>
> undefined variable 'variablename'
Looks like someone's tweaked the error reporting level so it's on E_ALL,
which can be a somewhat alarmist setting :-)
R
Hi John,
> Can anyone tell me why this doesn't seem to work ??
It probably is working, but it's obviously not doing what you want :-)
> if (($stelle_who != '1') OR ($stelle_who != '2') OR
> ($stelle_who != '3') OR ($stelle_who != '5') ) {
This will always evaluate to true:
if $stelle_who
Hi Oliver,
> ich want to install php.4.2.3 with gd-suport.
> Any hints are welcome.
You'll need to look it up, or do a configure --help or something, but I
imagine you compile with something like --with-gd=/path/to/gd
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscrib
Hi David,
> If I have lets say 30 items that match the query,
> I would like the page to display this at the bottom
>
> Previous 10 page 1 2 3 Next 10 of 30
To get the 20 results starting at #100, your query will be something like
"SELECT foo FROM bar LIMIT 100, 20"
To do paged results wit
Hi,
> "Notice: Use of undefined constant id - assumed 'id' in ..."
Try changing this:
> if(isset($_GET[id])){
to this:
if(isset($_GET['id'])) {
note quotes
PHP thinks you're trying to use a constant called "id", which you haven't
defined - hence the "unde
Hi Karel,
> > > mysql entries: at least 2M
> > > php code: at least 1M lines
> >
> > More than a million lines of code? That's a *big* app.
>
> 1megabyte of code :)
> not 1M lines
Aha :-)
> and the problem began slow, not noticable...
> But it's now worse then ever.
Are you doing something th
Hi Karel,
> mysql entries: at least 2M
> php code: at least 1M lines
More than a million lines of code? That's a *big* app.
> And now we are experiencing a really heavy
> load on the server. (no root access, but we think
> it's PHP).
You're running it on a server with no root access? Is it a
> > > if you want a partial list of offensive terms - try looking
> > > at the meta keywords on a few porn sites ...
> >
> > Excellent idea!
> > Unfortunately I'd have to explain that to my boss... "No,
> > really, I'm doing some research..."
>
> but won't your gateway/web server's filter prevent
Hi Sean,
> if you want a partial list of offensive terms - try looking
> at the meta keywords on a few porn sites ...
Excellent idea!
Unfortunately I'd have to explain that to my boss... "No, really, I'm doing
some research..."
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To
Hi,
> I think we've seen this discussion on the list before
> (so Christopher, check the archives!)
Quite :-)
> > The problems that others have experienced in the past are:
> > - what happens with "mis"spellings, e.g. "fsck"?
> > - what happens with dodgy formatting, e.g "f s c k"?
> > - what ha
> Following up to my own post
And again...
> I wonder if it was "Shorpe" I suppose I'll
> find out when/if I get another bounce :-)
I got another bounce :-)
Whoever is running this filter obviously doesn't want to do business with
any of the 70,000 odd people who live in a particul
minutes later:
> Trend SMEX Content Filter has detected sensitive content.
> Place = 'Christopher Raymond'; [EMAIL PROTECTED];
> Sender = Jon Haworth
> Subject = RE: [PHP] Filter vulger / controversial words
> - need word source
> Delivery Time = December 11, 2002 (Wedne
Hi Christopher,
> I'm wondering if someone has a great source for a master-list
> of controversial and vulger words that I can use on my site.
> I would like to pattern match input text against this master-list
> in order to prevent vulger and controversial words from appearing
> on my site.
Hi Shane,
> I can pass variables till I am blue in the face, even
> see them in the URL but they are still showing up as (!isset)
Are you accessing these variables through $var or $_GET["var"]?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.
Hi Diana,
> After I run a query lik this,
> $db->query($sql);
>
> what is the quickest way to find out how many
> records result?
Look into mysql_num_rows (or the equivalent if you're not using MySQL)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
Hi Rodrigo,
> Hi guys I need a way to know how to know from wich
> page the visitor came
echo $_SERVER["HTTP_REFERER"];
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Todd,
> Is there a "report generator" that will give me the
> flexibility to use fonts and fontfaces that works with
> PHP and MySQL?
I don't know of a PHP-based report generator (although a hunt round
sourceforge might turn something up), but you can:
1. use PHP scripts to output your repo
Hi Joskey,
> Who can tell me the best php-base webmail?
IMP (http://www.horde.org/imp/) is pretty good, I use it for my webmail and
don't have any complaints.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Hacook,
> I have a mySQL database called "srchresult" in a "srchresult" base.
> In it, i have 9 fields. Everything works perfectly.
> I would like to know how can i list in a HTML table 30 results for
example
> but only with 7 columns (7 fields only) ?
Try this:
;
// loop through the resul
Hi Luke,
> I'm trying to find out how to run a command on the
> server as root. Does anybody know how to do this?
How about using a combination of exec() and sudo (assuming you're in the
sudoers file, that is)?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
Hi Jonathan,
> Do you mind to tell me how to make a PHP programme
> to execute a centian routine at a given time ? Thank you !
PHP doesn't have anything built in that'll do this for you (at least,
nothing that I'm aware of).
The best solution is to call your script from your OS's scheduler - cr
Hi Paul,
> I just need to know how to get the url of the page
> calling the function so I can delete the information
> from the appropriate table.
Does $PHP_SELF not give you what you're after?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.p
Hi Martin,
> I would like to know how can I put ' character to case in switch...
>
> switch ($action) {
>case about:
>code
>break;
>
>case what's new: <-- i want this...
>code
>break;
Try wrapping the cases in quotes:
switch ($action) {
case "
Hi,
> Are you interested in this?!
> New generation of PHP Program, reaction to ASP.NET
I saw it when you posted it yesterday and tried it out, but it didn't work
for me. I imagine this is because I've disabled Javascript.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
Hi,
> I made a script that works on a very long charachter
> chain and its process is lnggg about 5 minutes !
> Do you have any tips to make it faster ?
My mysterious ninja PHP developer powers have told me that you need to
fiddle with lines 23 and 72, that's where it's slowing down.
I
Hi Phil,
> would like to hear some recommendations of some
> good companies that host PHP/MySQL and also JSP.
http://34sp.com/ are great if you don't mind .uk-based hosting. I've heard
good things about http://oneandone.co.uk/ but haven't used them myself.
At the other end of the scale, you s
Hi,
> I want to take an array and get the soundex() for each element
> in that array and return the results into another array.
How about:
$color = array("blue", "green", "orange", "purple", "red", "yellow");
$soundex = array();
foreach ($color as $foo) {
$soundex[] = soundex($foo)
}
HT
Hi,
> > > How do i make an upload script?
> >
> > http://us.php.net/manual/en/features.file-upload.php
>
> ok, this is upload.php:
>
>
>
> Send this file:
>
>
Yup, copied and pasted from the manual page, that should work.
>
> what else do i need?
1. A script to receive the uploads
2. A
Hi Eddie,
> I am working on a php page where I need some airport codes
> data, I have seen a few places online where you can buy this
> data so I was wondering if anyone has used any of these databases
> and if anyone had a good source for a mysql airport code db.
Google is your friend.
http:
Hi,
> How do i make an upload script?
You need an HTML form with an element, and a script to
handle the upload.
Post your code and tell us what problems you're having. If you haven't
written any code yet, go and read this section of the manual:
http://www.php.net/manual/en/features.file-uplo
Hi Tamas,
> > > for ($i=1; $i<=6; $i++)
> > $x[] = mt_rand(1, 90);
> > foreach ($x as $current)
> > echo $current. "";
> > ?>
>
> Thanks for help, but your program may generate same numbers between
> the 5 generated numbers, hovewer I want to generate different numbers
> such as lottery-numb
1 - 100 of 368 matches
Mail list logo