As part of a user input filter (coming from a text area)
I use the following regular expression
but it does not allow for text area line breaks <br> or <br />
I cannot figure how to include those line breaks in my regex
could you show me the way in such manner I will understand for futur...
What I need to achieve:
Out of an Ajax cascade of DD boxes (php MySQL driven) a user may select a unique tag
And figure if in a given category something similar exits
The existing tags are stored in my table as serialized array
Ex: a:3:{i:0;s:6:"asasas";i:1;s:4:"dddd";i:2;s:10:"ddddd mmmm";}...
I am not able to come with a logic for merging multiple serialized arrays
Each serialized array contains any num of tags
I need to avoid in result any tag/tags duplicate that could possibly exists in each other array (I do not seek removing dupes)
I think that starting by merging the...
Trying to add a var date instead of hard coded date
// this hard coded format works
$cal->addEvent('example Event 2', 2007, 12, 3, 'http://www.example.com');
// trying to make the date a variable (here is today)
//For test purpose I broke the requested date format in three pieces
// Add event...
I need three FCK editor instances
Which carries quite a “heavy foot print”
I found a way to collapse and expend the editor
By using OnBlur and OnFocus
My forte is PHP and MySQL but my JS is very much lacking
I would like the default to be set on "collapsed"
is it possible? and if yes how...
This is within a PHP page
// some php then
echo <<<CONTENT
any HTML
the following line ends the html section
CONTENT;
// back in php, I try to make the following php snippet working
// but it throws an error where I restart a new heredoc and the php snippet is not parsed
// instead the...
I run a dedicated server that will be soon updated from Apache 1.3+ to the newer 2 version
I already run the most recent php5
is there anything I shall do from my php side in order to make sure that the transition will run smoothly
FYI the upgrade will be performed by the server admin...
Inserting in Db results of multiple radio
<input type='checkbox' name='aa[]' value='1'> WORKS
<input type='radio' name='aa[]' value='1'> Does not
AND
<input type='radio' name='aa[$counter]' value='1'> Does not.
The two radio result in "Undefined offset:0" at line ... whis is a !preg_match...
I am working on a dynamic quiz manager system
This is called by AJAX and build as many for rows as the php/ajax calls for
$counter =1;
while( $counter <= $num)
{
echo"<tr>
<td align='left' width='80%'>
Question: {$counter}<input type='text' name='quest[]' value='$quest' size='50'></td>...
Is there a way using PHP to communicate with MS OUTLOOK?
And trigger the export of some email fields such as email and EmailAsItAppears in a CSV
If not what could be the language to achieve this?
Further whatever the chosen language it needs to be able to allow PHP grabbing that CSV
This does well the job
but I may not find why it generates an "Undefined var" error?
$result_final .= "<img src='".$thumb_dir. "/tb_".$new_pic."' /($counter)> File Added<p>";
thank you
Well, I tried adding simple and double quote to my
preg_match but without success.
I tought it was not required to escape them in the regex.
Tried that, tried escaping.. no result
How may I allow for htose quotes?
if (!preg_match("/^[a-zA-Z0-9 \,\;\.\-\$\:\!\/?\/\<...
Hello,
I could not figure why this works in IE and FF but not in Safari
there is no query error, the DD box feature the query results, this is a small segment of a long script
but not only the submit button is not dislplaid but the rest of the script is stopped (Which could be expected)...
This really is bugging me
as you see even in debugging mode I do ne get any mysql error
If I echo the query I obtain the expected result
further even if below the script excerpt if I echo the values I again get the expected result
so where is the error for something so basic
what am I...
This mailer (Bottom script) is CRON activated and as is, it does fine.
but I would like sending the emails in bacthes and pausing in between each batch
if this was procedural I could use
<<<<<<<
<?
$between_delay = 10; $send_delay = 30;
for ( $sent=0; $row = mysql_fetch_array($result)...
I need to run a PHP script every day, once every 3 hours
before doing it wrong I would like verifying if I my syntax is fine:
* 3,6,9,12,15,18,21,24 * * * wget ..etc...php
Are the hours set correctly
It works fine when I test it every 5 minutes but before running further tests I would like to...
How will you envision populating a TEMPORARY TABLE
With existing rows from a non TEMPORARY table?
I am not to sure about the best method.
What is the most efficient way?
Read the existing table in an ARRAY and loop through for inserting or …?
Thanks
Is there a way to retain a “browsed” value
In a form including <input type="file" name="imagefile">
Within a HEREDOC.
Reason is: If I check for other value and a value for example does not pass my regex then
The user is offered a link back to the form
I know how to retain “text” values but do...
Why do I get a warning when it all goes fine
After the script excerpt are a bunch of inserts or updates and rating math
all are ok.
If I echo the query and paste it in phpMyadmin
I get the expected results
so where is my problem?
existing in the DB are the values id and phone
in my "while" I...
I am putting together a one-size-fits-all function
could you give it a look and let me know about possible errors/flaws/mistake
thank you
function CleanDb($value)
{
// Stripslashes
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
}
else
if...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.