I copied this thread to some co-workers with the subject line "Be glad
that you're not programmers".
Is it Friday yet?
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
session_start(); // genesis
// do stuff
session_destroy(); // revelation
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I just googled up "php tedd form validation" and can't find a single
reference. What does this mean, that I respect tedd's skills or that
he needs better SEO?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> What are you are looking for?
I'm working on a new form and after reading a few threads on this list
since I've subscribed I realized that validating input is a weakness
of mine. I figured you would have an example online somewhere covered
some of the main security concerns.
Marc
--
PHP Gene
> Dinna know bats even _had_ eyelids
They increase the effectiveness of evil spells by 50%, especially when
coupled with Frogs Tears (tm).
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Does anyone have any ideas?
Sounds like it's getting caught in a loop. Post the whole script for
best results.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> $one = array(0 =>'golf', 1 => 'field');
> $two = array(0 => "On the golf course or in the field of clover");
> $array_exp = explode($one, $two);
What's the desired result?
array('golf' => "On the golf course or in the field of clover",
'field' => "On the golf course or in the field of clover")
Hi folks,
I'm running some code locally which should produce this fun error we
all know and love: Warning: Cannot modify header information -
headers already sent by... but does not. Switching from 5.3 to 5.2
reveals the error and running it on another server with 5.2 also shows
the error. I do
Thank you Balint but if you read my message I have a good
understanding of what causes this error. My confusion is why it is
not being thrown in this partciular instance.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> See if output_buffering and output_handler are set the same in
> your php.ini and/or phpinfo() output between working and non-working
> versions.
Thanks Daniel. With output_buffering On the error was not displayed
and the re-location fired, while Off caused it to display the error
and continu
To everyone who did not read my original message but responded to it,
Thank you.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I imagine this one's been done before, but maybe not in the same way
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Unsubscribe! Unsubscribe! Unsubscribe!
Can I detonate() the future of this thread before it goes where it's
about to go?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What's PHP? I thought this was the
top-posting-etiquette-discussion-and-simmering-race-war group.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I bought a 1GB external hard drive for $1000. Did I just choke on my lunch?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> If that was about 20 years ago, then it would be fine!
Would have been around 1992, good guesswork!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi folks,
I'm working on a project that will only be run locally on a WAMP
server. A mobile browser/app will call a certain page which should
silently trigger a print job to a printer connected to the printer.
Does anyone have advice on how to accomplish this? I've seen
implementations involving
Bonus feature: The server is running Windows 7. I suspect the
crickets are going to win this one.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Take a look at http://www.php.net/printer -- this might be what you're
> looking for.
Hi Ken,
Thanks for trying but I've been down that road and from my
understanding that PECL extension is really out of date and
unsupported (the page that hosts it doesn't even have a downloadable
DLL). Also t
> What type of file are you trying to print?
HTML.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> What type of file are you trying to print? I'm not very familiar with
> Microsoft Windows but I know a little about it. Have you considered Windows
> Powershell? Unfortunately you would essentially have to write a powershell
> script and use the PHP exec functions. Windows 7 shipped with Powe
>> What type of file are you trying to print? I'm not very familiar with
>> Microsoft Windows but I know a little about it. Have you considered Windows
>> Powershell? Unfortunately you would essentially have to write a powershell
>> script and use the PHP exec functions. Windows 7 shipped with
> 4 - And just found it. WordPad comes with Windows, so, maybe
> PHP+COM+WordPad
> (http://msdn.microsoft.com/en-us/library/51y8h3tk(v=vs.80).aspx) could
> be another option here. I think WordPad is just a visual wrapper for
> the RichEdit20 ActiveX component which is controllable via COM.
>
> By u
That low-hanging fruit is too hard for some to resist...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Another theoretical approach, given the grey areas, would be to add a
field to your table to indicate these "special" users. I would call
the field "is_awesome" and have it default to zero, because that's
just the way it is. Then you can make your query "SELECT * FROM users
WHERE is_awesome=1".
You could store the accented characters in your DB if you set
everything to UTF-8, including calling the "SET NAMES utf8" MySQL
command after connecting. I find this much easier than
encoding/decoding.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.
> Anyone know a smart way to order file names?
Nope, but I know a "natural" way:
http://ca.php.net/manual/en/function.natsort.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> use natsort.
For the "repetitive answers" specialists: Is it possible that 15
hours later someone is still only seeing the original question?
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
http://translate.google.com/#auto|ja|%20vanilla%20hotdogs
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Howdy,
I'm looking for a FOSS equivalent to PHPMaker, or at least something
which comes close to it. For those who don't know the program, it
syncs with your database and allows you to generate an entire CMS
system based on it. To be clear, I am not looking for a CRUD code
generator, I'm looking
Hi Ashley,
That's an interesting looking project, but wouldn't it require me to
switch to CodeIgniter? I'm not interested in changing my entire
working method for this.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> I assumed that as you'd mentioned trying Drupal that you would be OK with
> trying out various PHP-based solutions?
True enough. Maybe I'll sharpen the focus then and ask if anyone
knows of a solution that does not require a reworking of method; a
stand-alone CMS generator similar to PHPMaker
Hi folks,
Let's say that I have 2 constants
DEFINE('DESKTOP_URL_en', "http://www.website.com/index.php?page=home";);
DEFINE('DESKTOP_URL_fr', "http://www.website.com/index.php?page=accueil";);
and I would like to populate the value of an href with them depending
on the us
> $var = constant('DESKTOP_URL_' . $_SESSION['lang']);
Very nice, thank you.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is it just me or does it not work unless you agree to the "extra"
information sharing stuff?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> I want to write a script that requests a URL and then reads that website
> .. I'm interested to map web structures. My web host is saying I'll need
> URL file access enabled but that it's a) a security risk and b)
> deprecated.
simplehtmldom is pretty great for this, if I understand your needs
Hi folks,
I'm trying to convert the contents of an array from utf8 to utf16
(thanks for the headache MS Excel!). I originally created a "user
function" that just ran the text through
mb_convert_encoding($text,'utf-16','utf-8') but now I'm wondering if I
can't just use the internal function direct
> You need to pass a second and third array to array_map() with the same number
> of elements as the first array. The arguments to the callback function are
> the elements from each array at the same offset.
Wow, thanks for the clarification. I've decided to create my own
function and use that
> Thanks. That was the problem. I spent a day trying to debug this.
Smash head against wall first, ask questions later. That's my
methodology as well. :)
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> if(!myself->IsTrue())
> {
> delete myself;
> _exit(-1);
> }
I like this part...
> And on a serious note... To any Past, Present, Or Future service man (Or
> woman) Thank you for your sacrifice in defending our ability to send out
> these Frivolous Friday emails!
> "Our" does not automatically become all-inclusive, but rather
> suggests that the individual is part of a larger group. Please watch
> your presumptions of being force-included into said group, as the
> statement is valid regardless of anyone's personal opinion. ;-P
Crap, you're right.
My
> Hi Friend!I knew things couldnt get any worse I consider myself lucky
> to have found this now im in this for the long run you should consider trying
> it href="http://lacadenasport.es/profile/31AlanWalsh/";>http://lacadenasport.es/profile/31AlanWalsh/see
> you.
>
This list is for PHP discuss
Hi folks,
Let's say that I have the following array:
[0]=>
array(35) {
["contact_id"]=>
string(3) "356"
["contact_first_name"]=>
string(4) "Marc"
}
[1]=>
array(35) {
["contact_id"]=>
string(3) "247"
["contact_first_name"]=>
string(4) "Marc"
}
[2]=>
a
Holy mother of multidimentionality there are a ton of suggested
solutions to this scenerio on the array_unique manual page..
http://php.net/manual/en/function.array-unique.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> If the contact_id is the primary key, you could also use that as array
> index, which would automatically filter duplicates.
Thanks for this, it's so obvious I didn't see it. I was adding items
to the array with $array[] = $contact when I could have just as easily
used $array[$contact['id']] =
> BBEdit. Is this just a preference choice or is one method better than the
> other?
As far as I know it's just preference. Your choice of editor could
influence your decision; one form might be given nicer highlighting.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
> Assuming you want to make things unique based on the "contact_first_name"
> field,
> how would you decide which record to keep? The first one you run in to, the
> last one you come across, or some other criteria?
The unique field is actually the contact_id.
Marc
--
PHP General Mailing List (
> Give it a try, should do what you are wanting.
Hi Jim,
I appreciate your dedication to this problem but it was solved 2 days ago! :)
Thanks
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> $saving_list = $_POST['custom'] == 'FR' ? 148 : 147;
Hi there, here's a quick translatation of this code that might help
you understand it better:
if ($_POST['custom'] == 'FR'){
$saving_list = 148;
}
else{
$saving_list = 147;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscr
Just forwarding Carlos' response to the list...
-- Forwarded message --
From: Carlos Sura
Date: 17 December 2011 01:15
Subject: Re: [PHP] dealing with this code $_POST['custom´]
To: Marc Guay
On 16 December 2011 15:57, Marc Guay wrote:
>
> > $saving_li
Hi folks,
I just wanted to add a little something to this thread as I reworked
some of the code and came across an interesting tidbit. I was trying
to merge many result sets which now had the table's primary key as the
array key, but found that when array_merge() was done, all of the
array's keys
> Also try dompdf from digitaljunkies.ca. It allows you to pass an HTML doc to
> the code to provide a PDF
I think in this case it should say "It doesn't work!". :)
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> some pretty natives php functions exists to do the job :
But how many times in my life will I have write echo ""; ???
Does anyone have a handy solution? (Make this the default behavior?
Add a "even more human-readable" flag to the function? Create a
simple macro in Aptana 3?)
Argz,
Marc
--
P
> 1) Do smart phones use the same browsers as the desktop, or do they have
> their own stripped down versions of browsers?
Different browsers, some of which are worse than IE (see Blackberry).
> 2) When a browser broadcasts its header telling the server what kind of
> browser is involved, do the
> the way your site renders should be purely based upon the size of the display.
Although I mostly agree with this statement, it ignores the most
interesting aspects of mobile technology, such as being able to ask
the user for their GPS location and deliver content accordingly. I
worked on some r
> There is only one drawback to using CSS media queries to alter the way a
> page is displayed on different resolutions, and that is that any media
> (i.e. background images, etc) referenced in a stylesheet is downloaded,
> regardless of if it is ever used.
Another one worth mentionning is that a
>> if (!strpos($t_product,$t_p)) {print "checked";}
It could have something to do with the function returning 0 because
it's finding the comma in the 0 index, but it's not really false, it's
still finding the string. I've run into a similar problem before...
Marc
--
PHP General Mailing List (h
Based on the terms you're using it sounds like this is a Wordpress
question. You'd have a lot better chances of getting an answer if you
query a group of WP gurus/geeks.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How about "long" dayname?
I find it interesting that the character for "Day of the month without
leading zeros" is j, which makes sense to me as a half-Francophone who
sometimes calls days "jours". Not that it helps me remember it, I
have to refer to that page pretty much every time I use date().
> I'm a teacher. I want to use PHP to interface with Google and see if a
> student has plagiarized.
Hi. Why not just enter the suspected text into a search engine and
see if any close matches come up? If you use the advanced search
tools you can choose "verbatim" and see if the exact phrase matc
> If you use the advanced search
> tools you can choose "verbatim" and see if the exact phrase matches.
Just correcting myself here, the way to do this is by simply wrapping
the words in quotes "like this, hey now". The verbatim tool is
something else.
Marc
--
PHP General Mailing List (http://w
This is the first time I've been surprised that a Drupal module
existed for something...
http://drupal.org/project/authenticate
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sort of off topic but here's a list of existing services (some of
which are free) in case you don't want to reinvent the wheel.
http://www.justfitstudio.com/articles/plagiarism-detection.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi folks,
I've constructed simple conditions based on DB data and would like to
actually evaluate them with PHP. For example, the coded string "$x <
$y" has been str_replaced into "4 < 5", but now I would actually like
to use that string in an if() statement. I tried eval() but got an
unhelpful
> It sounds like you have a string "$x < $y" in the database that you then
> replace into a string "4 < 5" which you want to test a conditional on. If
> this is the case, why are you storing conditionals in the database?
The user will be able to construct their own query strings, it's
complicated
> I just added the return statement and the semicolon, because the error was
> complaining about it not being a proper PHP statement basically.
That's beautiful, thanks. I just stumbled across a forum post that
said it wasn't possible and was about to give up for the day.
Marc
--
PHP General
> It shouldn't be that hard to parse this type of expressions.
I appreciate your concern, and will do my best to validate the input,
but there are two things:
1) The application will only be used by selected users.
and
2) The range of possibilities are broader than I indicated. They
would like
Hi everyone,
Thanks for all the great ideas and links.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> But has anybody had any experience of translating the asp code over?
I've gone the other way and translated some PHP to ASP, which felt
pretty dirty. Are you dealing with simple includes and small bits of
logic? That's all that I had (also fairly static sites) and I found
the process quite sim
Hi,
So I decided to give one of those PHP math classes a go and have come
across a joyful character encoding problem. He's the deal:
$rule = "1 < 2";
$rule = html_entity_decode($rule, ENT_QUOTES, 'UTF-8');
echo $rule;
And the result is still "1 < 2". I've tried different combinations
of charac
Answering myself sort-of, I think I'm on the wrong track with
html_entity_decode(). Does an HTML "entity" refer to an HTML code
like rather than the encoded format of characters? It seems
like htmlspecialchars_decode() is actually what I'm looking for, but
I'm getting the same results with that.
This info might be helpful. If I copy and paste the example from the
manual directly, it works as described:
$orig = "I'll \"walk\" the dog now";
$a = htmlentities($orig);
$b = html_entity_decode($a);
echo $a; // I'll "walk" the dog now
echo $b; // I'll "walk" the dog now
But if I modify
It actually works for me as well if I run it in the browser. The
structure of the app is a bit strange, though, so debugging character
encoding issues is quite difficult. The code is being run by Code
Igniter in the backend and the response passed via JSON to a ExtJS 4
frontend, so what I'm looki
Ugh. The problem is that the EvalMath class doesn't death with
comparisons between numbers, it only performs calculations. Barking
up the wrong tree for 2 hours is fun on a Friday!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Does this work?
No?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
And if you change your input type to "date", because it's a date, does
that bring up the numeric keys as well?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is this a "Fun Friday" trolling?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Did I accidentally subscribe to the mediabeez website development
mailing list? Hello?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
101 - 178 of 178 matches
Mail list logo