Looks very promising !!!
On Tue, Feb 2, 2010 at 1:12 PM, Robert Cummings rob...@interjinn.comwrote:
Cesar D. Rodas wrote:
Hello,
Have you guys checked this PHP to C++ converter from the Facebook People?
http://developers.facebook.com/news.php?blog=1story=358
Very interesting... I heard
, but I pointed it out just in case it was contributing to your
pain.
Adam
On Sun, Jan 31, 2010 at 8:02 PM, Allen McCabe allenmcc...@gmail.com wrote:
Notepad++ also has session saving capabilities. This means you can save
which files you're working on, close Notepad++, and reload those files
= preg_replace($pattern
= /li[^]*style=DISPLAY: none[^]*/i','',$bl);
(Note the i after the search pattern above.)
Adam
--
Nephtali: PHP web framework that functions beautifully
http://nephtaliproject.com
well.
Adam
On Sat, Jan 23, 2010 at 12:44 PM, Nathan Rixham nrix...@gmail.com wrote:
Ben Miller wrote:
Is there a PHP function that will return whether the request was http or
https? I have functions that need to cURL other servers - sometimes over
SSL, sometimes not, depending whether
On Fri, Jan 15, 2010 at 6:25 PM, Michael A. Peters mpet...@mac.com wrote:
Adam Richardson wrote:
Hi,
I've developed a framework that requires PHP 5.3 (it takes a more
functional
approach.) I'm hosting my own apps on a dedicated server running cpanel
(thanks to their recent upgrade
their shared hosting options, and I've only
found a couple that accommodate PHP 5.3 so far. Anybody have
recommendations for shared hosting providers that are supporting php 5.3
(many of the smaller sites I'm working with don't merit a VPS?)
Thank you very much for your help,
Adam
--
Nephtali
When you set the date to -00-00, you start the following sequence:
1. strtotime returns false, because -00-00 isn't a date it can
parse into a timestamp.
2. date returns 1969, because it's not passed a valid timestamp and it
works from December 31, 1969 for any invalid date.
lets you easily identify an error.
Again, I didn't read this anywhere, though, and I could be wrong.
Adam
On Thu, Jan 14, 2010 at 3:47 PM, Kim Madsen php@emax.dk wrote:
Hi guys
I have a question:
snip
Ashley Sheridan wrote on 14/01/2010 19:20:
MySQL uses a default -00-00 value
On Mon, Jan 11, 2010 at 7:45 PM, Mattias Thorslund matt...@thorslund.uswrote:
tedd wrote:
At 2:55 PM -0500 1/11/10, Rick Dwyer wrote:
I have been asked to further modify the value to the nearest half cent.
So if the 3rd decimal spot ends in 1 or 2, it gets rounded down to 0
If it ends in
' ) ) == 'Alive';
var_dump( $alive );
I use a variant of the above with good success on Gentoo.
Adam.
On Sun, Dec 27, 2009 at 1:53 PM, robert mena robert.m...@gmail.com wrote:
Hi,
I need to develop an interface that will, for example, ping IPs from a
remote server. So the php script will be hosted
to know that the guys making your bridges more earthquake resistant are
the ones who are the cheapest.
Adam.
On Wed, Dec 23, 2009 at 7:34 AM, John Meyer
johnme...@pueblocomputing.comwrote:
On 12/22/2009 9:10 PM, Daevid Vincent wrote:
http://thedailywtf.com/Articles/Maybe-I-Needing-Later.aspx
/unsub.php
--
- Adam Shannon ( http://ashannon.us )
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
size=2PFDsb
Adam.
On Sun, Nov 8, 2009 at 5:39 PM, Ernie Kemp ernie.k...@sympatico.ca wrote:
Need some help here with checkboxes in an html form.
My issue is I have a form that needs to be viewed with checkboxes filled in
depending on the values in the table.
I tried:
INPUT class=text
, visit: http://www.php.net/unsub.php
--
Adam Randall
http://www.xaren.net
AIM: blitz574
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-freezers/ I Esco on
Twitter http://twitter.com/escoglobal I Esco on You
Tubehttp://youtube.com/escoglobal
I Esco Bio Safety Cabinet Micro-Site http://biologicalsafetycabinet.com/
I
--
Xu Han-Jie
--
Adam Randall
http://www.xaren.net
AIM: blitz574
--
PHP General Mailing List (http
).
If you want to do basic sanitization to your incoming values, such as
trimming them, you can do something like this too:
foreach( $_GET as $k = $v ) $$k = trim( $v );
None of this is best practices, FYI.
Adam.
On Wed, Oct 28, 2009 at 10:29 AM, David Otton
phpm...@jawbone.freeserve.co.uk wrote:
2009
for the UID and GID then it will just
display the UID or GID number.
Adam.
On Fri, Oct 16, 2009 at 1:13 PM, Augusto Flavio afla...@gmail.com wrote:
Humm.. thanks for the replies. But i have another problem about rsync again.
When i deploy a project using the rsync the permissions of all home
on commission I'd love
to discuss that with you.
If anyone wants to help me with this I'd greatly appreciate it.
Regards,
Adam.
--
Adam Randall
http://www.xaren.net
AIM: blitz574
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have users enter support tickets into a a textarea form and then it
emails it to me, I'm trying to get the emails to display when they hit
enter correctly, so i'm changing the \r\n to br, but in the email i'm
getting, its displaying the br instead of a line break: here is the code:
Thanks, i'll try that. what is the difference in using '' and ? I
thought they were interchangeable.
Jonathan Tapicer wrote:
\r\n should be between double quotes: \r\n
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
oh nevermind, i see double quotes translate the \r\n to its appropriate
EOL character.
Adam Williams wrote:
Thanks, i'll try that. what is the difference in using '' and ? I
thought they were interchangeable.
Jonathan Tapicer wrote:
\r\n should be between double quotes: \r\n
This question might give away the fact that I am a php noob, but I am
looking for the best way to test for form submission in PHP. I know in
Perl this can be done with
if (param)
but I don't know if that will work with PHP. I have read the Learning
PHP 5 book and the only thing that was
On 08/27/2009 11:09 PM, Adam Jimerson wrote:
This question might give away the fact that I am a php noob, but I am
looking for the best way to test for form submission in PHP. I know in
Perl this can be done with
if (param)
but I don't know if that will work with PHP. I have read
:
echo sum=2 or 1\n;
break;
case 0:
echo sum=0\n;
break;
default:
echo sum=3/4/5\n;
break;
}
Regards,
Adam.
On Thu, Aug 20, 2009 at 8:40 PM, Keithsurvivor_...@hotmail.com wrote:
Hi,
I
it looks like it was sent :) That's
assuming that they were able to figure out the math question before
hand. Maybe not fort knox, but it does help out for me at least.
Adam.
On Thu, Aug 20, 2009 at 6:11 AM, Garygwp...@ptd.net wrote:
I have a client with a form on his site and he is getting
.
You should in pretty much all cases be safe with just using the
mysql_real_escape_string, which takes care of the - for you as well.
Adam.
On Sun, Aug 16, 2009 at 11:42 AM, Dotan Cohendotanco...@gmail.com wrote:
I am sanitizing user-entered data before storing in mysql with this function
/)
To unsubscribe, visit: http://www.php.net/unsub.php
Oh, I think it's part of the spec. You could always use .htaccess rules to
parse .css files as .php, this will keep search engines happy and browsers
happy as well.
--
- Adam Shannon ( http://ashannon.us )
suddenly turned
into
something of a matter of a minute rather then seconds.
Has anyone ever experienced such an issue?
Can anyone please advise?
Thanks
I wonder if loading the script/page with an absolute path would fix the
problem.
--
- Adam Shannon ( http://ashannon.us )
://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Take the if (!headers_sent()) out and always send the headers.
--
- Adam Shannon ( http://ashannon.us )
That should be !== not !===
Adam.
On Mon, Aug 10, 2009 at 12:17 PM, Ralph Deffkeralph_def...@yahoo.de wrote:
for the same story there are the
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://us3.php.net/manual/en/language.operators.comparison.php
Find Ternary on that page.
It's a shortened conditional:
cond ? true : false
Adam.
On Mon, Aug 10, 2009 at 6:27 PM, John
Butlergovinda.webdnat...@gmail.com wrote:
echo something . (($a = $a^1) ? red\n : green\n);
Re
No...not zerowing...no...
But yes, the ternary operator is the bomb, which you can get carried
away with. Daevid knows what I mean :)
Adam.
On Mon, Aug 10, 2009 at 6:59 PM, Daevid Vincentdae...@daevid.com wrote:
Pretty much the best operator ever invented IMHO. And Since PHP 5.3
Funny, I just had to figure out today how to nicely do HTML e-mails. I
ended up using PEAR:Mail_mime, and it worked pretty well. It will also
work for your attachments. I believe that PHP itself recommends it on
their mail() function reference page.
Adam.
On Mon, Aug 10, 2009 at 6:49 PM, Skip
I'm expecting is not in the shared library I am
using).
You know, looking at the error messages that you posted again I now
realize that the incompatability is not between imap and php, but imap
and /libexec/ld-elf.so.1. That's where you need to look it seems.
Adam.
On Sat, Aug 8, 2009 at 1:34 AM
on in the ../../store/files path.
Adam.
On Fri, Aug 7, 2009 at 5:05 PM, Brian Dunningbr...@briandunning.com wrote:
Correct, the files on the server have not changed either, and have been
working fine for a long time. No funny characters.
On Aug 7, 2009, at 4:59 PM, Adam Randall wrote:
Sorry for replying
php.ini
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
- Adam Shannon ( http://ashannon.us )
On Sat, Jul 18, 2009 at 7:54 PM, Govinda govinda.webdnat...@gmail.comwrote:
On Jul 18, 2009, at 6:36 PM, Adam Shannon wrote:
On Sat, Jul 18, 2009 at 7:01 PM, Govinda govinda.webdnat...@gmail.comwrote:
Hi all,
..sitting here thinking this is so easy, and I must have been over
/ to treat .html files as .php
Just add this to your root .htaccess
AddType x-mapp-php5 .html
Thank you
-Govinda
Govinda
govinda.webdnat...@gmail.com
--
- Adam Shannon ( http://ashannon.us )
I have a page where a user authenticates, fills in some information in
an HTML form, and then when clicking on the submit button, will need to
execute a php schell script as that user to write some data to their
/home/username directory. Since apache web server runs as the user
nobody, how
found the list by the link on php.net (lists.php.net), I mainly joined to
grow in my experience with PHP.
--
- Adam Shannon ( http://ashannon.us )
that allows them to enter a range?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
- Adam Shannon ( http://ashannon.us )
General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
- Adam Shannon ( http://ashannon.us )
I have staff fill out a form that contains a textarea with their
problem description and emailed to me when they click submit. Staff
will press enter in the text area, but I'm having problems converting
the \r\n into a new line in the email that is sent to me, here is the code:
$subject =
Daniel Brown wrote:
In a cursory glance, I've noticed the following code:
htmlspecialchars(nl2br(str_replace('\r','',$_POST[problem])))
You are using a literal '\r' in your str_replace() function. This
should instead be replaced with double quotes to translate the \r to
its
With the wide range of users on the list, I'm sure there are plenty of
opinions on what are good graphical IDE's and which ones to avoid. I'd
like to get away from using notepad.exe to code with due to its
limitations. Something that supports syntax/code highlighting and has
browser previews
I have a form where users submit search terms and it explodes the terms
into an array based upon spaces. But, how can I have explode() keep
words in quotation marks together? For example, if someone enters on
the form:
John Jill Judy Smith
and I run $termsarray = explode( , $_POST[terms]);
Jan G.B. wrote:
You could try it with regular expression matching..
for example:
?php
preg_match_all('/([a-z]+|[a-z ]+)/i', $searchstring, $resultarray);
?
Regards
Thanks. That seems to create 2 duplicate arrays, though. Can it be
narrowed down to just array [0]?
Jan G.B. wrote:
Yes, preg_match_all returns all matches and the subpattern matches
(the stuff inside the brakes)
You can ommit stop it by using (?:) instead of ()..
So: preg_match_all('/(?:[a-z]+|[a-z ]+)/i', $_POST[terms], $termsarray)
You might want to check out the regular expression
Andrew Hucks wrote:
I've been coding PHP for about a year, and I'm running out of things to code
that force me to learn new things. If you have any suggestions, I'd greatly
appreciate it.
I'm currently writing an in-house PHP helpdesk ticket system. I looked
at all the open source ones i
Ron Piggott wrote:
How do I specify an actual SMTP server? (Like mail.host.com)
This is what I have so far:
mail($email, $subject, $message, $headers);
I was to http://ca2.php.net/manual/en/function.mail.php and saw this
syntax:
mail ( string $to , string $subject , string $message [,
Is there a way to determine if a mysql query returns an empty set? I am
selecting 10 results at a time with a limit statement and need to know
when i've ran out of rows. I've only got 2 rows in the database, so
when I start with row 10, it returns an empty set. I have the following
code:
Nitsan Bin-Nun wrote:
mysql_num_rows() maybe? if not I probably haven't understood your question.
Thanks, I never thought of trying that. This code works!
$mysqli_get_requests = mysqli_query($mysqli,$get_requests);
if (!mysqli_num_rows($mysqli_get_requests))
Andrew Ballard wrote:
It won't be any of those because the query is successful even if it
returns no records. You could use
http://us2.php.net/manual/en/mysqli-stmt.num-rows.php to determine how
many rows were returned.
Andrew
Oh ok, thanks that makes sense. Thanks for the link also
--
I have the code:
$mysqli_get_support_types = Select types from support_types order by
types;
$mysqli_get_support_types_result =
mysqli_query($mysqli,$mysqli_get_support_types) or
die(mysqli_error($mysqli));
while (mysqli_fetch_array($mysqli_get_support_types_result))
{
echo
Shawn McKenzie wrote:
No. How about:
while ($row = mysqli_fetch_array($mysqli_get_support_types_result))
{
echo option.$row['types'];
}
thanks, now that you provided that, I see that I left out the $row variable!
--
PHP General Mailing List (http://www.php.net/)
I need some help passing a session variable with a header() function.
According to www.php.net/header, the documentation states:
*Note*: Session ID is not passed with Location header even if
session.use_trans_sid
session.configuration.php#ini.session.use-trans-sid is enabled. It
must by
abdulazeez alugo wrote:
Hi,
Well I'ld say the reason is quite obvious. You have simply not set
$_session[username] . I'ld have done something like:
-- option.php --
?php
session_start();
if ($_POST[option] == View Pending Requests)
{
$_session[username]= true; //sets the session
have you looked into this? http://postgis.refractions.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
would this not work? :
?php
$string = http://www.zshare.net/video/541070871c7a8d9c;;
$replaceWithThis = 'HELLYES-';
echo $string.\n;
echo preg_replace('/\S+video\//',$replaceWithThis,$string).\n;
echo $replaceWithThis.substr($string, strripos($string, '/')+1,
strlen($string)).\n;
echo
just clean up your code and it will work:
?php
$qString = 'http://www.google.ca/search?hl=enq=php+rocks%21%21%21meta=';
if (isset($qString))
{
$buffer = str_replace(,amp;,$qString);
}
echo $buffer.\n;
?
OUTPUT:
C:\php test.php
I have staff inputting email addresses into a textarea named $list on
a form and when they click submit, my php script sorts the email
addresses and writes to disk. The problem is, lets say they enter the
email addresses
b...@mdah.state.ms.usstaff hits enter
ama...@mdah.state.ms.usstaff hits
Shawn McKenzie wrote:
This may be best handled in your sorting code. What does it look like?
yeah just a second ago a big lightbulb went off in my head and i fixed
my code to add a \r\n on saving, and strip it on viewing. I sort on
viewing, not sort on saving. The viewing code looks
into
smaller single or multipage documents.
Has anyone ever heard of anything that might help me in this process?
Adam.
--
Adam Randall
AIM: blitz574
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-0800, Adam Randall wrote:
I'm amazed that this either doesn't exist, or is hard to find. I
basically am looking for a way to read in an image into PHP, or shell
out to something on the Linux side, and determine, and see if it has a
barcode in it or not. If it does, I need to decode the barcode
This completely internal, and highly sensitive. Also, the documents
themselves will different every time likely as they can either be
faxes with who knows what type of skewing/quality/orientation. I need
to be able to read them and find out what the barcodes are, if any.
Adam.
On Wed, Dec 17
I would have thought so too, but haven't found anything yet. Maybe
there is an answer there (I have Imagick installed for example).
iText, a java utility, has the ability to write barcodes nicely to
PDF, too bad that there's no some reverse there either.
Adam.
On Wed, Dec 17, 2008 at 4:42 PM, Al
Yeah, I have played with JOCR/GOCR, but it seemed somewhat inaccurate.
Does anyone have any examples of working with it in code so that I can
figure out how to incorporate it into my solutions?
Adam.
On Wed, Dec 17, 2008 at 5:17 PM, Bastien Koert phps...@gmail.com wrote:
On Wed, Dec 17, 2008
2008/11/28 Adam Lewis [EMAIL PROTECTED]
2008/11/28 bruce [EMAIL PROTECTED]
Hi.
I've got a few tbls that I'm testing. I'd like to have a simple web app to
be able to iterate through the tbls to test out what I have in them.
I'd like to be able to have each tbl as a drop-down/select box
I have a file that looks like:
1. Some Text here
2. Another Line of Text
3. Yet another line of text
340. All the way to number 340
And I want to remove the Number, period, and blank space at the begining
of each line. How can I accomplish this?
Opening the file to modify it is easy, I'm
Thanks Boyd, your code did exactly what I wanted!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
When I first saw it, I thought of a stem and leaf graph:
http://cnx.org/content/m10157/latest/#table3
http://www.nervenet.org/papers_images/cb2.jpg
However, your stem remains constant (10), so I'm not really sure what you're
graphing.
Adam
On Fri, Aug 8, 2008 at 1:11 PM, tedd [EMAIL PROTECTED
of the solutions I've undertaken. Recently, I've been avoiding LIKE
conditions and using INSTR, LOCATE, CHARINDEX, etc. to avoid the potential
for unescaped wildcards.
Adam
On Mon, Aug 4, 2008 at 12:33 PM, Larry Garfield [EMAIL PROTECTED]wrote:
On Mon, 4 Aug 2008 11:48:39 -0400, Andrew Ballard
Like I said, I'm not 'especially pleased' with any idea up until now. I'm
certainly open to any other ideas.
Adam
On Mon, Aug 4, 2008 at 6:57 PM, Larry Garfield [EMAIL PROTECTED]wrote:
Hm. So your solution is don't use LIKE? I can't say I'm wild about
that. :-/
--Larry Garfield
display_errors = Off. What else can I do?
Thanks,
Adam
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The 'new' keyword has to apply to the object created in the constructor (and
not the return value of any of the follow-up calls.) To establish this
precedence, chaining wasn't allowed on constructors.
On Fri, Jun 6, 2008 at 11:04 AM, Eric Butera [EMAIL PROTECTED] wrote:
On Fri, Jun 6, 2008
I was wondering if anyone knew of some books/tutorials/howto's, etc on
going from procedural style coding to object orientated coding with
PHP? I've been using PHP since version 3 and am used to the procedural
style, but I'm noticing that PHP's trend is going to the object
orientated style,
, the controller sets the headers, retrieves the file,
and then outputs the file contents to the output stream.
Otherwise, the controller redirects the visitor to a page that let's
them know they don't have access, but prompts them to pay/sign up to
get the access for the product.
Adam
On May 28
of the time, though, I'd probably start out with a class method instead
of a namespaced function so I could more readily adapt to OOP practices if
desired as the implementation evolves.
Adam
On Wed, May 28, 2008 at 11:33 AM, Iv Ray [EMAIL PROTECTED] wrote:
In which situation would somebody use
pages with javascript quite easily.
I'm pleased with this approach after using for it for a while now, and
I recommend it to others.
Adam
On May 14, 2008, at 10:48 PM, Chris W wrote:
I was wondering what others think of my approach to form
validation. I know many use Java script to do
.
You can read more at the site below:
http://www.regular-expressions.info/lookaround.html
Adam
-Original Message-
From: Jorge Peña [EMAIL PROTECTED] [mailto:=?ISO-8859-1?Q?
Jorge_Pe=F1a _[EMAIL PROTECTED]?=]
Sent: Monday, May 12, 2008 12:27 AM
To: php-general@lists.php.net
Subject: [PHP] Re
And, at some hosts you have to change the settings in htaccess as opposed to
php.ini.
On Fri, May 9, 2008 at 12:53 PM, André Medeiros [EMAIL PROTECTED]
wrote:
I'm not sure PHP5 would read php.ini from that directory.
You should take in account that your hosting company may _NOT_ allow
you to
,
Adam
Adam Richardson
Envision Internet Consulting, LLC
Phone: (517)623-0485
Services and insight for building effective, user-oriented websites.
framework. However,
It sounds like this is going to cause a fatal error in PHP6. Is this
in fact true? And, if the behavior is going to change, can somebody
explain what the impetus for this change was?
Thank you very much for your time,
Adam
Adam Richardson
Envision Internet Consulting, LLC
Where do I change the setting to print PHP errors to the screen when
running in a web browser?
Thanks,
Adam
--
Adam Gerson
Assistant Director of Technology
Apple Certified System Administrator (ACSA)
Columbia Grammar and Prep School
phone. 212-749-6200 ex. 321
fax. 212-428-6806
[EMAIL
solution that thus-far evades
me :(
Any ideas are appreciated.
-Adam
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Assume that you should accept any string that PHP itself would accept,
though no processing of the actual escapes is required nor desirable.
On Mar 29, 2008, at 8:34 PM, Robert Cummings wrote:
On Sat, 2008-03-29 at 19:16 -0400, Adam Jacob Muller wrote:
Hi,
Have a potentially interesting
Yes, php source code.
On Mar 29, 2008, at 8:54 PM, Robert Cummings wrote:
On Sat, 2008-03-29 at 20:41 -0400, Adam Jacob Muller wrote:
Assume that you should accept any string that PHP itself would
accept,
though no processing of the actual escapes is required nor desirable.
Sorry, I
token_get_all, fantastic!
Thanks.
- Adam
On Mar 29, 2008, at 10:02 PM, Robert Cummings wrote:
On Sat, 2008-03-29 at 21:31 -0400, Adam Jacob Muller wrote:
Yes, php source code.
You will not be able to do this with PCRE. You need something that can
track state because double quotes can
http://search.mnogo.ru
Jason Pruim wrote:
Hi Everyone! :)
Just a quick question, I've done some googling but haven't been able
to find what I need... I am looking at doing a search function for
someone's website, the website is just static HTML files, and she
doesn't want to redo the entire
I'm having users enter dates in MM-DD- format. is there a way to
check if what they have entered is invalid (like if they enter 1-15-2008
instead of 01-15-2008) ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks, I think I have it:
$dateexplode = explode(-, $_POST[date_entered]);
if (!preg_match(/^(\d{2})$/, $dateexplode[0],$data1) ||
!preg_match(/^(\d{2})$/, $dateexplode[1],$data2) ||
!preg_match(/^(\d{4})$/, $dateexplode[2],$data3))
{
die (you have entered an invalid date);
Andrew Ballard wrote:
Just curious why you won't take 1-15-2008. Once you validate it, you
can always assign it to a variable as either a timestamp or a DateTime
object and then format it however you want when you display it, send
it to a database, or whatever you are doing with the date.
Andrew Ballard wrote:
All the more reason I would turn it into a timestamp or DateTime
object in PHP first. That will prevent trying to insert something like
what I used above. Then I would get rid of the MySQL STR_TO_DATE
function in the $mysqli_insert_sql value just replace it with
something
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which stores it in the mysql format of -MM-DD. However, I need the
output of my select statement to show it in MM-DD- format. I can
select
nevermind, figure it out, had to take the ' ' away from
contract.length_start :)
Adam Williams wrote:
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which stores it in the mysql format of -MM
In my form, I am parsing all the text inputs through
mysql_real_escape_string() before inserting the data. however, when I
look at the SQL query in PHP, when I type the word blah's to my text box
variable, and then insert it into mysql after being ran through
mysql_real_escape_string(), it
I'm running PHP 5.2.4 and getting the error:
*Warning*: Wrong parameter count for imap_open() in
*/var/www/sites/intra-test/contract/login.php* on line *9
*My code is:
$mbox =
imap_open(\{mail.mdah.state.ms.us/imap/novalidate-cert:143}INBOX\,
\.$_POST[username].\, \.$_POST[password].\); //
I'm getting the following error and I don't see whats wrong with my
line. Any ideas?
*Fatal error*: Function name must be a string in
*/var/www/sites/intra-test/contract/perform.php* on line *57*
and my snippet of code is:
if ( $_POST[perform] == View Contracts )
{
I'm going to be inserting data from a PHP form into a mysql field. The
data could contain special characters like ' \ /, etc. How do I
handle that? just $data = addslashes(htmlspecialchars($data)); before
the insert query? because later on the data will be read back from the
mysql db
Thanks for all the replies everyone. I have a question on
mysql_real_escape_string(). The PHP example page shows:
$query = sprintf(SELECT * FROM users WHERE user='%s' AND password='%s',
mysql_real_escape_string($user),
mysql_real_escape_string($password));
and I
301 - 400 of 1386 matches
Mail list logo