Javier Huerta wrote:
I am wondering if there is a way to block out email addresses in specific
format from a form? We ahve a form that people have to enter an email
address, and the form has been getting used by bots to send spam to a
listserv. The email address they enter is in this type of
$query = 'SELECT * FROM eChart WHERE clientNo = "2" ORDER BY ChartNo
DESC';
If you want just one record:
$query = 'SELECT * FROM eChart WHERE clientNo = "2" ORDER BY ChartNo
DESC LIMIT 0, 1';
BTW, you'd better ask the MySQL mlist: http://lists.mysql.com/
HTH, cheers
Silvio
--
PHP Genera
Uhm, a shot in the dark - try:
select date_format(contract.length_start, '%m-%d-%Y') as length_start
HTH, cheers!
Silvio
Adam Williams wrote:
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which s
Magnus Anderson wrote:
...snip...
This will not work (I expect this to work since _USER['level'] is 5)
if($_USER['level'] => 5)
Try
if($_USER['level'] >= 5)
maybe it helps ('=>' is used when assigning values in an hash, maybe you
are triggering something strange...)
--
Antinori and Partn
You should benchmark and tell us - anyway, just looking at the code, I'd
say 'is_prefix2()' is faster since there's 1 function call instead of 2
AmirBehzad Eslami wrote:
In case you haven't realized it, I have already written two functions to
check
for a prefix !! The question is: Which functi
Jeremy Privett wrote:
I'm looking for a method that would be able to extract the user's true
document root (e.g. /home/jeremy/public_html/) so that I can use it for
some filesystem scanning functions. I'm trying to avoid hard-coding
supported document roots in favor of being able to dynamically
[EMAIL PROTECTED] wrote:
hah.. I'll stop now. Think you get the idea. The convenient management of
multiple domains with a hosting provider is my ultimate goal.
Go with http://www.hub.org
I've got a couple of domains with them - and I think they are great.
Silvio
--
tradeOver | http:/
Barry wrote:
Simple reg help please
i want to match the last "," in "a,b,c,d" and replace it with " and "
Without using a regexp, you could do:
$string = 'a,b,c,d';
$letters = explode(',', $string);
$last_letter = array_pop($letters);
$final_string = implode(',', $letters) . ' and '
Tod Thomas wrote:
Is their a list of portability problems to be aware of when switching
from v4 to v5? Maybe a table that compares the two?
Thanks.
You can start here:
http://www.zend.com/php5/migration.php
Silvio
--
tradeOver | http://www.tradeover.net
...ready to become the King of the
[EMAIL PROTECTED] wrote:
If I have columns type ENUM('live', 'hidden', 'pending'), $flags will show
ONLY 'enum'.
How can I get all ENUM values?
Thanks for any help or direction.
-afan
This doesn't really seem a PHP question... BUT... give a look here:
http://dev.mysql.com/doc/refman/5.0/en/
Angelo Zanetti wrote:
(...)
Why does the < > cause that not to be displayed? or is it retrieving it
correctly but not showing it because of the < > (which might be
conflicting with HTML tags?
When showing things in an HTML page it's always a good idea to use
'htmlspecialchars' (or htmlenti
Barry wrote:
Gregory Machin wrote:
Hi
I would like to know how i would hide my index page so that it is not
shown
at the end of the url like how gmail does it and many cms do it ..
And what is it called when one does this ..
Thank you
If you use Apache, what you are looking for is probably
Diana Castillo wrote:
does anyone know of a command in php that will give you a list of the files
already included . Something that would tell you whether a file is already
included before you do the require_once ?
Try this:
http://php.net/manual/en/function.get-included-files.php
Oh, and
Ross wrote:
This was a page I did ages ago
http://www.ecurry.net/menu2.php
The problem with it is when you add or subtact an item is it always button
press behind.
This must be because of the way the page self submits or something?
The script is here
http://www.ecurry.net/calculat
David Grant wrote:
Murray,
I can't think what else it might be. Sorry!
David
What does
date("I", $datevalue)
return? (it's a capital 'i')
I guess you already checked out this page...
http://php.net/date
--
tradeOver | http://www.tradeover.net
...ready to become the King of the World?
--
William Stokes wrote:
> Hello,
>
> I need to check that user input text is less than 300 characters long. How?
>
> Thanks
> -Will
>
Try with strlen:
http://php.net/strlen
Silvio
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Mathijs wrote:
> Hello there,
>
> I Have a problem with some file writeing.
>
> I Use fopen to create a new file, but that file gets the owner and group
> the same as the apache owner and group.
>
> How can i change it so that the file gets the same owner/group as the
> files i upload with FTP?
Nilanjan Dasgupta wrote:
> Hi,
> Is there any way to client's IP address inside a php document. I am
> trying to generate a code that depends on the IP address of the client.
>
> thanks a lot,
> Nilanjan
>
Give a look at $_SERVER, and more specifically $_SERVER["REMOTE_ADDR"]
http://php.net/
Mark wrote:
> Hi can any one show me how make another form appear below another once the
> 1st form has been submitted.
>
[not really a PHP solution...]
You can do like this: the 'SUBMIT' button of the first form only makes
visible the (hidden) DIV where the second form is, and only *that*
'SUBM
[EMAIL PROTECTED] wrote:
> Is there any easy php script to run to view an xml file such as new
> headlines like so: http://news.google.com/?output=rss or can anyone point
> me in the right direction for good online tutorials or books.
>
You can start here:
http://magpierss.sourceforge.net/
Magp
Anas Mughal wrote:
> Here is a PHP5 hosting company:
> http://www.a2hosting.com/
>
Aaargh! I wouldn't suggest that one, I've had a really really bad
experience with them (they shut down my site *w/o any notice* because
they said I was using too much of their resources - while this was not
true).
Christian Ista wrote:
> Hello,
>
> Could you tell me a efficient solution for change page (new location) in
> PHP? I tried this code : header("Location: mypage.php");
>
note: HTTP/1.1 requires an absolute URI
http://php.net/header
> But in some case, I have error message "heade already send". T
Ross wrote:
> Hi,
>
> I am trying create a multiple file upload to a mysql server.
>
Google is your friend...
http://www.google.com/search?hl=en&q=multiple+upload+php&btnG=Google+Search
And, by the way, if you are uploading and storing images in your MySQL
DB, you might want to consider that th
Adrian Bruce wrote:
> Hi
>
> Does anyone know where i can get some decent gdf fonts for using in the
> imageloadfont() function, i have found some on the net but they are all
> a bit naf so far. I'm really just looking for something like Arial or
> verdana. Im creating pie charts on the fly but
Anders Norrbring wrote:
>
> I'm writing a filter/parsing function for texts entered by users, and
> I've run into a problem...
> What I'm trying to do is to parse URLs of different sorts, ftp, http,
> mms, irc etc and format them as links, that part was real easy..
>
You might want to consider u
Barry wrote:
> Hello everyone!
>
> I have a problem sending POST vars via fopen.
> It was possible for me to send some xml data but that's all.
>
> Anyone know how to send POST vars?
> Big probleme here is also that i have to connect via SSL.
>
cURL can be your friend...
http://php.net/curl
ht
Jay Blanchard wrote:
> [snip]
> I am trying to develop a testing framework for a bunch of php scripts. These
>
> files expect various kinds of data from the $_POST array. They work fine
> when invoked from the browser.
>
> But I am wondering if I can programmatically pass these values so that I
Jose Borquez wrote:
> I installed PHP from the ports and did not do any configuration. I set
> up the phpinfo page and the configuration line did not set disable session.
>
> Thanks in advance,
> Jose
>
Maybe you have this:
'--disable-all'
(not sure, thou, this should enable sessions anyway, II
Silvio Porcellana [tradeOver] wrote:
>
>
> $file = "images.txt";
> $openFile = file($file);
> $num_images = 10;
> # don't need this is PHP > 4.2.0
> srand((float) microtime() * 1000);
> $random_keys = array_ran
Jared Williams wrote:
> Hi,
> Just unset the ones you've picked
>
> #random images example
> #this is your file
> $file = "images.txt";
> #open the file
> $openFile = file($file);
> #generate a random number
> srand((double)microtime()*100);
> #get one of the entries in the file
> for
Sandy Keathley wrote:
>
> Is there a way to detect that a script is being accessed by curl, and
> not by a browser? ENV ($_SERVER) variables won't work, as
> those can be forged.
>
Use a CAPTCHA test:
http://en.wikipedia.org/wiki/Captcha
HTH, cheers!
Silvio
--
tradeOver | http://www.tradeo
[EMAIL PROTECTED] wrote:
>
> include ("../utils.inc");
>
> $date = date("U");
> $dateExpire = $date + 90 * 86400;
>
> $code = "jack";
>
> $query = "INSERT INTO CouponTable VALUES
> ('','$date','0','$code','preset','$dateExpire','3.75')";
>
> $result = mysql
Tommy Jensehaugen wrote:
>
>
>
> The reason why I want to do this is because separate_script.php has to be
> fully executed even if the request for example.php is stopped in the middle
> of "more logic".
> I am using PHP Version 4.3.11.
>
You might also want to give a look at this:
http://php
Murray @ PlanetThoughtful wrote:
>
> Out of curiosity, does anyone know if it's possible to tell whether an
> individual session is still alive from PHP? I don't mean from within
> code being run for a particular user, but in code that, for example,
> might be executed by a cron job, which would e
A.J. Brown wrote:
>
> [code]
> $values = join(', ', $array);
> $query = "SELECT * FROM client WHERE clientaccountmanager IN ('$values')"
> [/code]
>
Actually this doesn't seem right, the join should be:
$values = join("', '", $array); # notice the ' inside the "
In addiction, I would (SQL)escape
Scott Fletcher wrote:
>What I want this to work instead is
>[code]
> $array = array();
>
> $array['col1']['col2'] = "Test #1";
> $array['col3']['col2'] = "Test #2";
>
> $prefix = "['col3']['col2']";
>
> echo $array.$prefix; //Spitted out result as "Test #2"...
>[/code]
>
>
Try something li
Jake Gardner wrote:
> This is a stretch and I doubt you can do this very easily, but I was
> wondering if there is a way to define behaviors that happen throughout
> a script before execution for example if the OS is windows, all
> strings are terminated with \r\n, if Linux, then \n without adding
FSA wrote:
> Hi all, i have a question :), i need to display the instant value of a
> variable (think at a variable that stores the interface trafic at one
> moment) in browser, without having to refresh browser. I was wondering
> if i can do that with php (not perl, cgi, etc).
> If i missed someth
Jim Moseby wrote:
>
> Hi Bruce!
>
> MySQL and PHP both have extensive built-in date functions that are clearly
> documented and extraordinarily easy to use. For the vast majority of
> situations, there is no need to manually write any custom date-handling
> code. The decision to use MySQL or PHP
Ross wrote:
>Hi,
>
>I am using php mailer and am trying to find a new way to make the html email
>body instead of the old
>
> $mail_body = " src=\"my_logo3.gif\" width=\"100\" height=\"139\">";
> $mail_body .= "";
>$mail_body .= "sans-serif\">$mail_text ";
>$mail_body .= "";
>$mail_b
Sabine wrote:
> Thanks you very much Silvio, for your answer.
> Yes, it seems to be complicated. Especially regarding the time I have
> to do the programming for this part of my work.
> Now I reduced the time the preparing of the mailtext needs and hope
> for the moment that the servers time my sc
Sabine wrote:
> Thanks for your answer, Gustav,
>
> now I see I didn't explain good enough what my problem is.
> My problem is not how to construct a status bar, but not it is
> possible to provide any output before the headering (*Warning*: Cannot
> modify header information - headers already sen
Richard Lynch wrote:
>
>
Actually, you want a few SPARE MySQL connections, so you can use the mysql
command line monitor to do things -- Particularly in case of a run-away
PHP/MySQL script which slams the server into over-drive... If you don't
have a connection available cuz they're all used up b
also "edit" permissions, kinda
like the ones you have on files on Linux): anyway, I hope it helped a bit.
Silvio Porcellana
Pablo D Marotta wrote:
Hi, I´m developing an intranet on Apache-PHP-Mssql.
I need to know if there´s any way of managing users to have access to specific
area
; the file with 'ftp_fput()' [http://php.libero.it/manual/en/function.ftp-fput.php].
That is, he opens the files he wants to copy and PUTs it via this function. Since he is
logged in - using 'ftp_connect()' and 'ftp_login()' - the files will be owned by the user
he used to l
HP FTP functions.
Check out these pages: http://php.libero.it/manual/en/ref.ftp.php
HTH, cheers!
Silvio Porcellana
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
($ArrayName); ?<>/pre<>?
This is what you are asking PHP to do.
Actually - to achieve this - it would be better to use the 'htmlspecialchars()' function
[http://php.libero.it/manual/en/function.htmlspecialchars.php]
Anyway, probably I didn't understand what you want from your code...
Cheers!
Silvio Porcellana
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Uhm, I guess you are looking for links (following a 'href') in your HTML page, so why
don't you just do something like:
preg_match_all('/href=[\"\']?([^\"\'>\s]*)[\"\']?/i', $url, $matches)
(note the '\s' added inside the bracket that should match the link, as you could have:
- that is, a link "
br>
function check_form(form) {<br>
if (form.foo.value == '') {<br>
alert("C'mon!!!");<br>
return false;<br>
}<br>
}<br>
and in your HTML you need to add something like this to the tag:
Anyway, this has more t
I don't think this is the best list to ask questions about SQL, try
http://lists.mysql.com
Cheers!
Silvio Porcellana
Harlequin wrote:
Morning everyone.
I've read around the subject of searching and although using the FULLTEXT
capability of MySQL might be the proper way of doing this I
You can solve it totally with SQL, using the FOUND_ROWS() function
[http://dev.mysql.com/doc/mysql/en/Information_functions.html]
I think this is the most efficient way of doing it...
HTH, cheers
Silvio Porcellana
Nick Patsaros wrote:
I'm trying to build a bulletin style system right no
>
> $ok = setcookie("client_id", "argh", 259300); //* expire in a month ish
>
Nope, it expired a long time ago... :-)
Read the manual for setcookie:
http://php.libero.it/manual/en/function.setcookie.php (mainly the part about
the "expire" parameter)
HTH, cheers
Silvio
--
PHP General Mailing Lis
ould get 'three') all you
have to do is:
$out[1][1][1] => 14
Just my .2 euros...
Silvio Porcellana
- Original Message -
From: "Brian Dunning" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 22, 2004 5:54 PM
Subject: [PHP] Split h
53 matches
Mail list logo