you can use it like that:
see the mysql's date_add() usage:
SELECT DATE_ADD(NOW(), INTERVAL 5 DAY)
or 5 YEAR or n MONTH
"Krushna Kumar R" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,
I have 2 fields on a table as shown below
1. period int
you can use JavaScript to do that...
alert('your message goes here');
embed this in your HTML source code.
it is not possible to do so in PHP since it is server side.
"Silvia Mahiques" <[EMAIL PROTECTED]> wrote in message
005101c15aec$9ccac280$1a9cd29b@tscpc6">news:005101c15aec$9ccac280$1a9c
try this:
ImageSetThickness()
"Ville Mattila" <[EMAIL PROTECTED]> wrote in message
009801c15a31$e7f56140$0100a8c0@ville">news:009801c15a31$e7f56140$0100a8c0@ville...
Hi there,
How it would be possible to draw a "thich" arc with PHP & GD? You can see a
picture here about thing I mean:
http://ww
maybe you have in your database a DATE field instead of DATETIME field?
"Beeman" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have inserted the date into MySQL using now() in the query. However,
when
> I retrieve the using MySQL_Date_Format in the query th
I think that the MySql's API allow to many queries to be executed w/o having
an open connection, example:
SELECT 1+1;
how can i issue such statments w/o opening a connection?
like SELECT NOW() ..
whenever I first run mysql_query() it tries to connect w/ default connection
settings.
--
$mysql_installed = function_exists('mysql_query');
as for the version, you can then do:
$r = mysql_query("SELECT VERSION()");
$r = mysql_fetch_array($r);
$ver = $r[0];
"Chris" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there a way to detect, using PHP,
I'm afraid there is no way to do so!
"Impex Holidays Maldives / Hasan" <[EMAIL PROTECTED]> wrote in message
0beb01c15bcb$f0becf50$c6c801ca@hasan">news:0beb01c15bcb$f0becf50$c6c801ca@hasan...
> Hi everyone,
>
> I can use javascripts onunload to run PHP file with a new window.
> Is there anyway i
This can be done...but what if the user closes the whole browser?
the frame won't work cause it will also be closed i guess!
The popup window will assure that in all cases it will be poped up.
"Kodrik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > >You cou
1)Install PHP w/ the installer or manually
2)In PWS add a new virtual directory and give it Script+Execute rights.
3)Create a simple script there (where the virtual directory points) and
write just to see if everything is fine.
you may want to try to ask in php.install group too.
"Nicolas Llamo
SELECT 1+1 doesn't really need a connection...
or any other statments that doesn't address a table or database,
SELECT SUBSTRING('test', 1, 2);
etc etc..
I guess it is not possible though...
"Kodrik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > how can i
the page won't ever showup unless the webserver finishes processing the PHP
file, therefore the "Loading ..." will appear while the page is waiting for
its component to finish loading (images, javascripts, flash files, )
therefore what you're asking for has a javascript solution:
1)make a w
bar or is the html (including graphics etc) just very big?
>
> Anyway,
>
> Hope this helps
> Derek
>
> - Original Message -
> From: "Daniel Alsén" <[EMAIL PROTECTED]>
> To: "php" <[EMAIL PROTECTED]>; "_lallous"
> <[E
this should do!
"Alawi" <[EMAIL PROTECTED]> wrote in message
008f01c15da2$ddf4fd30$d43f47d4@php">news:008f01c15da2$ddf4fd30$d43f47d4@php...
i have txt file have this words
--
bla bla bla
[phpcode]
[/phpcode]
bla bla bla
---
now I want to convert the code that are between [ph
there are lots of classes on http://phpclasses.upperdesign.com
just search there.
"Nigam Chheda" <[EMAIL PROTECTED]> wrote in message
006e01c15d43$63351620$26a8a8c0@bravo">news:006e01c15d43$63351620$26a8a8c0@bravo...
>
> Hi
> For sending mail php has a function mail()
> But how to receive mails(i
did you check www.zend.com and their caching/optimizing products?
"Thomas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello there,
> I was wondering if there was any intermediate format I could compile my
> PHP scripts to in order to gain speed.
>
> For e
hmm...weird! is that the code?
if you show us your real code...maybe you're missing a small detail...
"Spunk S. Spunk III" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm assigning a variable a value from an associative array.
> $variable = $array["key"
$string = "hey there!";
$out = '';
for ($i=0; $i if output is to
browser
}
echo $out;
"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Strings are arrays, so you can print out a string by doing something like
> this:
>
> $string = "hey ther
to tail a file use the "+" flag when opening that log file,
and write a simple PHP script that spits that file to you, ie:
showlog.php
"Yamin Prabudy" <[EMAIL PROTECTED]> wrote in message
003901c15de4$82f0cb70$fe2796ca@dusak">news:003901c15de4$82f0cb70$fe2796ca@dusak...
> Hi there I need help her
> "$b"=>array("$surname,$init"), // does it work
like
it does work like that, but you're creating an array of one item which is a
string holding to values comma seperated.
you can do this too:
> "$b"=>array($surname,$init), // does it work like
w/o
go for it...even if someone did a visual tool for that.
my question goes, has anyone made a *nix program to configure php.ini ? ;)
before i
"Jtjohnston" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Has anyone made a Windows executable to configure the
$ceiling is too big.
try to do this and see:
echo getrandmax();
you might get 32767 as an output!
therefore, $ceiling must be <= getrandmax();
try to scale down your floor and ceiling,
ie:
$max = $ceiling - $floor;
$random = rand(0, $max) + $floor;
"Andrew Duck" <[EMAIL PROTECTED]> wrote in me
> $values[$i]['id'] = $co_id;
you didn't initialize the $i did you?
should put $i =0; before the while loop.
> echo "$id" ; # Doesnt wanna work
what is $id ? i don't see it defined in your code, i see $cid instead.
> list($a,$b,$c,$d) = $values[$i];
sure won't work,
see http://www.php.net/fopen
"Michiel Van Heusden" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> anybody help me please...
>
> how can I open a file from php (something like require, but without
closing
> the php-file)
> and then send some string to that file
it happened to me when i enter the page for the very first time and I use
session_start()
I suggest to make the page reload itself w/ a parameter so that the first
pass to the site will screw the javascript and then automatically 2nd pass
(which is self called) is okay.
"Moloko" <[EMAIL PROTECT
try http://phpclasses.upperdesign.com
"Alberto" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Any1 knows about a good class for DB abstraction? I need some scripts to
> work with mysql/pgsql.
>
> Thnx
>
>
--
PHP General Mailing List (http://www.php.net/)
$string = preg_replace('/]*>/si', '', $string);
"Richard S. Crawford" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
All I need to do is strip out IMG tags from strings; I don't want to strip
out all of the HTML, just the IMG tags, so the strip_tags() function won't
be adequate.
Hello,
Is is advisable that I mail lots of users from a database via one call to
mail() ?
Or else, how do you think I should split the list and send my mails?
Is there is a way to tell if the mail was returned because the email address
was invalid?
Thanks.
--
PHP General Mailing List (htt
timestamp is an integer.
you can convert it to hex string via sprintf("%x", timestamp) and store it.
so if timestamp is a 32bit integer than it's hexadecimal representation will
take 8 characters.
"De Necker Henri" <[EMAIL PROTECTED]> wrote in message
3A8ED7A62794D311AA7700508B6164EC08DCA384@SCPT
sending one by one will take ages no?
"Phpgalaxy.Com" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I just finished making a bulk emailer script with the mail() function. I
would probably recommend doing a loop,
> sending one email at a time. Seems that way y
strtotime('yesterday') should work!
"Harry Lau" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> It is easy to use the function getDate() to obtain the date of today.
> But instead of writing plenty of conditions,
> is there any easy way to get the date of yeste
viele Grüße,
lallous!
"Ewald Schoeller" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hello
> we want to save every word of a text in an array field.
> we want to solve the problem without "split".
>
> Here's our code:
>
> $str="eins zwei drei vier fünf sech
I guess that is not possible with PHP yet.
"Jason G." <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> Does anyone know of a way, that from within a function, you can determine
> what line number and file the function was called on?
>
> I did try:
> f
from the manual
this will grab a file too using the socket functions, the
socket_set_timeout()'s first param is expected to be a socket handle.
"Jean-Arthur Silve" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi !
I use the file function for accessing to pag
try that!
New Document
';
if (preg_match('/(.+?)<\/title>/is', $mem, $matches))
{
echo "title is:$matches[1]";
}
?>
"Richard S. Crawford" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am trying to get the title of an html file... you know, t
you must set the cookie's expiry time!
of-the manual:
setcookie ("TestCookie", "Test Value");
setcookie ("TestCookie", $value,time()+3600); /* expire in 1 hour */
setcookie ("TestCookie", $value,time()+3600, "/~rasmus/", ".utoronto.ca",
1);
"Phpgalaxy.Com" <[EMAIL PROTECTED]> wrote in message
[
Yes, I guess you can't make it foreever but you can give it a higher expiry
date.
"Phpgalaxy.Com" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> well yeah, thats always true..but this's at least as good as it gets =)
ya suppose
> there's any limit on how many
You can do that only if you've got a reference to the window you want to
change its properties.
the reference is obtained like this:
var w = window.open('file.htm');
w.document.theform.theControl.theProperty = someValue here;
"Carlo loiudice" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTEC
Hello!
Is there is anyway to copy from a table to another but by applying a filter?
Example:
SELECT * FROM table1 WHERE (condition)
INSERT INTO table2 (the results of the last query)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
this code seem incomplete:
> window.opener.document.celkem.cena_celkem.value = " blábol"); ?>
> }
here's a fix:
function zmen_cenu() {
window.opener.document.celkem.cena_celkem.value = "";
}
"Pavel NováK" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello
take the query string as is:
$QUERY_STRING
in this case:
$qstring = "myfield1=&myfield2=aaaccc&myfield1=";
and then pass it on as is again to whoever you want!
or you can parse it like:
$qstrings = split('&', $qstring);
then split each pair:
$pairN = split('=', $qstrings[$i]);
et
name the checkbox as:
' name='selectedplayers'>
where ID is used to identify this current field!
then read in the posted page as:
"P. Roescher" <[EMAIL PROTECTED]> wrote in message
01c16eab$65226360$015a@cc48693a">news:01c16eab$65226360$015a@cc48693a...
> The script I have:
>
you can fopen() remote files!
$fp = fopen("www.site.com/infodir/exchange.txt","r");
$rates = fread($fp, ...);
fclose($fp);
"Mindhunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Lets say I want to get the current exchangerate from anot
you can use regluar expressions, or single character scanning via for loop,
1)RegExp:
if (ereg('[^a-z0-9]', $name)) print 'error!';
2)For loop
for ($i=0;$i wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Anyone know a good PHP function or script to scan a string for Valid
> Chara
haven't you tried to add a CC to the header?
$mailheadrs .="Cc: [EMAIL PROTECTED]\n";
"Anthony Ritter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there any way to add an *additional* e-mail address - a cc - besides
the
> one that is already in the $to v
try using the date() with the field content.
string date (string format [, int timestamp])
"David Mitchell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey Guys and Girls,
>
> I'm selecting a datetime value from SQL Server. In the database the data
> looks
Never tried that, But i'm afraid that by reading a binary file like:
join('', file('binfile'))
will brake the file!
try using fopen('binfile', 'rb') and fread() and filesize()
good luck.
"Daniel Reichenbach" <[EMAIL PROTECTED]> wrote in message
01c17111$02617a50$796010ac@danielmob">news:000
hmm...never tried it but maybe this works:
try to include the class via eval()
like: @eval("include ('$filetoinclude');");
and use the control operators w/ them?
"Aaron" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ok what I want to do if possible is
>
I have made this a small script called SQL2PHP,
---
SQL2PHP
---
file3.sql can contain:
---
DROP DATABASE t;
CREATE DATABASE t;
USE t;
#
# Table structure for table 'brands'
#
DROP TABLE /*!32200 IF EXISTS*/ brands;
CREATE TABLE /*!32300 IF NOT EXISTS*/ brands (
id int(10) unsigned NOT
Basically I have PHPMyAdmin...
If I am to paste the 33,000+ lines SQL query the PHPMyAdmin would take more
than 30secs to execute it which will make everything fail!
Anyway, I solved it. Check the recent post in the same thread about SQL2PHP
script.
"Alnisa Allgood" <[EMAIL PROTECTED]> wrote in m
I have PHPMyAdmin 2.21
I only see "GO" button, where can I upload my SQL file?
"Alnisa Allgood" <[EMAIL PROTECTED]> wrote in message
news:p05100309b79edae8263f@[63.202.15.82]...
> At 4:05 PM +0200 8/14/01, _lallous wrote:
> >Basically I have PHPMyAdmin...
&g
Hello,
Is there is a way with PHP (most probably headers) to go HTTPS mode?
I don't want to specify https://www.myserver.com/secured_page.php
I just want it normal but in it's header to tell the browser to initiate an
HTTPS mode.
Thanks
--
PHP General Mailing List (http://www.php.net/)
To uns
It all depends on you, I basically get used on using mysql_fetch_array which
returns an associative array.
example:
$result = mysql_query("SELECT name, lastname, age FROM table");
$ra = mysql_fetch_array($result);
or
$ro = mysql_fetch_object($result);
or
$rr = mysql_fetch_row($result);
now:
echo
zend.com
php.net
and lots more..
"Ivo Stoykov" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello
>
> I wonder whether there is any tutor about PHP objects. Could you help me
> with a URL?
>
> Thank you
>
> Ivo
>
>
--
PHP General Mailing List (http://ww
Yes...
get inspired from this simple HTML example even!
Inline Image generation (via JavaScript)