Forwarded message is available.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hi all,
does someone ever hear of an internet explorer alert "pcinfinity"?
I really didn´t find anything in forums and search engines, so maybe
somebody in this list knows better...
thanks for answers
heiko
---
lernen ist wie rudern gegen den strom
hört man damit auf, treibt man zurück!
(laotse)
---
heiko sudar
kranzhornstraße 4a
85567 grafing
08092 860585 (t)
08092 860587 (f)
0179 6863181 (m)
www.countingstation.de
www.applico.biz
www.lokalitaeten.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Andrei wrote:
Hi list,
I have a class which I use to parse simple bbcode inside some comments.
I noticed on PHP5 that scope of preg_replace function is changed
when function is called inside a class. To the point:
[CODE]
class PHS_editor
{
...
function parse_content( $str = null )
{
$from_arr = array( "@\[B\](.*?)\[\/[EMAIL PROTECTED]",
"@\[U\](.*?)\[\/[EMAIL PROTECTED]", "@\[I\](.*?)\[\/[EMAIL PROTECTED]",
"@\[URL=([^\]]*)\]([^\[]*?)\[\/[EMAIL PROTECTED]",
"@\[IMG=([^\]]*)[EMAIL PROTECTED]",
"@\[QUOTE=([^\]]*)\]([^\[]*?)\[\/[EMAIL PROTECTED]"
);
$to_arr = array( '\1', '\1', '\1',
'\2',
"'get_image_location*( '\\1' ) ).'\" border=\"0\">'",
"'".
"".
"'.stripslashes(
\*$this->remove_mytags*( '\\2' ) ).'".
"".
"'"
);
if( is_null( $str ) )
$str = $this->editor_content;
return preg_replace( $from_arr, $to_arr, str_replace( " ", "
", nl2br( $str ) ) );
}
...
}
[/CODE]
When it gets to parse [IMG] tags I get "Fatal error: Using $this
when not in object context in ...". So it seems they changed the scope
for preg_replace callback functions. As this function is called inside
the method shouldn't it have the scope of the class?
Is there a workaround for this? I cannot declare a function
get_image_location which will staticly call the method bcuz I use
variables from instanced class.
How are you trying to use this class? It sounds like you're trying to
use the method statically. When a method is called statically it does
not have a $this.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Heiko Sudar wrote:
does someone ever hear of an internet explorer alert "pcinfinity"?
I really didn´t find anything in forums and search engines, so maybe
somebody in this list knows better...
I'm not sure what you mean by "internet explorer alert", but it sounds
like either advertising or you have some malware. Either way this is
definitely not the right place to ask.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Stut wrote:
> Andrei wrote:
>> Hi list,
>>
>> I have a class which I use to parse simple bbcode inside some
>> comments.
>> I noticed on PHP5 that scope of preg_replace function is changed
>> when function is called inside a class. To the point:
>>
>> [CODE]
>> class PHS_editor
>> {
>> ...
>>
>> function parse_content( $str = null )
>> {
>> $from_arr = array( "@\[B\](.*?)\[\/[EMAIL PROTECTED]",
>> "@\[U\](.*?)\[\/[EMAIL PROTECTED]", "@\[I\](.*?)\[\/[EMAIL PROTECTED]",
>>"@\[URL=([^\]]*)\]([^\[]*?)\[\/[EMAIL PROTECTED]",
>>"@\[IMG=([^\]]*)[EMAIL PROTECTED]",
>>
>> "@\[QUOTE=([^\]]*)\]([^\[]*?)\[\/[EMAIL PROTECTED]"
>> );
>>
>> $to_arr = array( '\1', '\1', '\1',
>>
>> '\2',
>>
>> "'> \*$this->get_image_location*( '\\1' ) ).'\" border=\"0\">'",
>>
>> "'> cellpadding=\"1\" cellspacing=\"0\" border=\"0\" class=\"form_type\">".
>> "".
>> "'.stripslashes(
>> \*$this->remove_mytags*( '\\2' ) ).'".
>> "".
>> "'"
>>
>> );
>>
>> if( is_null( $str ) )
>> $str = $this->editor_content;
>>return preg_replace( $from_arr, $to_arr, str_replace(
>> " ", "
>> ", nl2br( $str ) ) );
>> }
>>
>> ...
>> }
>> [/CODE]
>>
>> When it gets to parse [IMG] tags I get "Fatal error: Using $this
>> when not in object context in ...". So it seems they changed the scope
>> for preg_replace callback functions. As this function is called inside
>> the method shouldn't it have the scope of the class?
>> Is there a workaround for this? I cannot declare a function
>> get_image_location which will staticly call the method bcuz I use
>> variables from instanced class.
>
> How are you trying to use this class? It sounds like you're trying to
> use the method statically. When a method is called statically it does
> not have a $this.
>
> -Stut
>
Yes, method was called staticly. Strange tho in php 4 it worked.
Thnx for enlighting me with this.
Andy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
i would like to test
www.3viso.com/addurl
try to input your link and categories and tell me what you think about it
thank a lot
Hi there,
I am wondering if it is possible to track links on for example google
adsense as exit URLs with PHP. You can track referers, I know, but what
about the adsense banner on your pages. Did you ever wonder which page
exactly leads to a click?
I would like to track which adsense link they clicked on what page.
Is this even possible? The ads are implemented into the publisher pages,
but the ad itself is delivered by there adservers, so there is no
logentry or similar on my server.
Any ideas on how to track that?
Thanx for any hint.
Best regards, Merlin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
When in-scope and using static functions, use self:
class Static_Ex {
private static $variable = 'This is a static variable';
public static function tryStatic() {
return self::$variable;
}
}
echo Static_Ex::tryStatic();
If you think about it, there is no $this in a static function. If static
functions do not need an instatiated object to access class code, you don't
refer to them the same, nor do you use $this internally inside the functions
that are static.
Using static functions and variables is quite tricky. Static methods and
variables make tasks like programming a singleton to point to a single
database connection for all database activities on a website simple and
easy. But if it has to interact with the internals of an instantiated object
within it's own class, then you need to either pass in all variables
(Static_Ex::method($this) when in scope to an instantiated object should
work), and/or make it work entirely on it's own without $this.
--
Jared Farrish
Intermediate Web Developer
Denton, Tx
Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$
Any ideas on how to track that?
Two things:
1) This is probably going to have to some kind of javascript spy that
reports to a (php/asp/python/ruby) page for recording onUnload().
2) You might read the Google AdSense legalese to see if they allow it, or if
they provide it (maybe for a fee). What you want is access to their redirect
page log.
You also might look into Urchin and the ISP's that support it.
--
Jared Farrish
Intermediate Web Developer
Denton, Tx
Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$
On 5/28/07, Merlin <[EMAIL PROTECTED]> wrote:
Hi there,
I am wondering if it is possible to track links on for example google
adsense as exit URLs with PHP. You can track referers, I know, but what
about the adsense banner on your pages. Did you ever wonder which page
exactly leads to a click?
I would like to track which adsense link they clicked on what page.
Is this even possible? The ads are implemented into the publisher pages,
but the ad itself is delivered by there adservers, so there is no
logentry or similar on my server.
Any ideas on how to track that?
Thanx for any hint.
Best regards, Merlin
You would need to edit the javascript code from google, this is
possible, but I don't think google will be happy with it, and they
will probably say that you were doing illegal actions by modifing the
code and you won't get any money ...
Tijnema
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I can not figure out way this is not working can somebody help?
Untitled
function createRequestObject() {
var req;
if(window.XMLHttpRequest){
// Firefox, Safari, Opera...
req = new XMLHttpRequest();
} else if(window.ActiveXObject) {
// Internet Explorer 5+
req = new ActiveXObject("Microsoft.XMLHTTP");
} else {
// There is an error creating the object,
// just as an old browser is being used.
alert('Problem creating the XMLHttpRequest object');
}
return req;
}
// Make the XMLHttpRequest object
var http = createRequestObject();
function sendRequest(action,arg) {
// Open PHP script for requests
http.open('get', 'eventaction.php?takeaction='+action+'&uid='+arg);
http.onreadystatechange = handleResponse;
http.send(null);
}
function handleResponse() {
if(http.readyState == 4){
var response = http.responseText;
var update = new Array();
if(response.indexOf('|' != -1)) {
update = response.split('|');
document.getElementById(update[0]).innerHTML = update[1];
}
}
}
Delete this
event';
echo $event['deleteevent'];
?>
this is the 'eventaction.php script yo test if the ajax script works
Hi
I would like to have a unknown number of generated check boxes like
this:
And the name will be generated "chk01 to chk99", but how do I make
the receiving PHP script that "scans" for post variables that are
sent, so that I can work on this information?
Best regards
Søren
smime.p7s
Description: S/MIME cryptographic signature
Hi Gang:
I can upload a text file and an image file via a html form, but I am
having problems uploading a PowerPoint file. Apparently, that's a
different critter.
Does any have any references or an example to show me?
Thanks,
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Søren Neigaard wrote:
I would like to have a unknown number of generated check boxes like this:
And the name will be generated "chk01 to chk99", but how do I make the
receiving PHP script that "scans" for post variables that are sent, so
that I can work on this information?
The form posting agent will only return values for boxes that are checked.
You can do isset in a loop up to the maximum possible value.
But I suspect that you are generating the form dynamically. If that is
the case, add a hidden input with a value of the number of checkboxes.
That would be the upper limit of your loop.
Stephen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Does any have any references or an example to show me?
Well, I think we need a description of the error or the invalid response
you're having. It could be a file-size issue (your php.ini configuration
won't allow file sizes > 8mb's, for instance).
Have you googled it?
--
Jared Farrish
Intermediate Web Developer
Denton, Tx
Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$
Not even slightly a PHP question, but since it's a bank holiday I seem
to temporarily be in a more helpful mood.
Richard Kurth wrote:
$event['deleteevent']='
href="javascript:sendRequest(delete,32423434234234234324)">Delete this
event';
echo $event['deleteevent'];
?>
I'm thinking you need some quotes aroung delete, and possibly around the
number given its size.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/28/07, Richard Kurth <[EMAIL PROTECTED]> wrote:
I can not figure out way this is not working can somebody help?
Untitled
function createRequestObject() {
var req;
if(window.XMLHttpRequest){
// Firefox, Safari, Opera...
req = new XMLHttpRequest();
} else if(window.ActiveXObject) {
// Internet Explorer 5+
req = new ActiveXObject("Microsoft.XMLHTTP");
} else {
// There is an error creating the object,
// just as an old browser is being used.
alert('Problem creating the XMLHttpRequest object');
}
return req;
}
// Make the XMLHttpRequest object
var http = createRequestObject();
function sendRequest(action,arg) {
// Open PHP script for requests
http.open('get', 'eventaction.php?takeaction='+action+'&uid='+arg);
http.onreadystatechange = handleResponse;
http.send(null);
}
function handleResponse() {
if(http.readyState == 4){
var response = http.responseText;
var update = new Array();
if(response.indexOf('|' != -1)) {
update = response.split('|');
document.getElementById(update[0]).innerHTML = update[1];
}
}
}
Delete this
event';
echo $event['deleteevent'];
?>
this is the 'eventaction.php script yo test if the ajax script works
Try firefox and take a look at the javascript console, it points you
to any javascript syntax errors.
Tijnema
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Stephen Neigaard wrote:
I would like to have a unknown number of generated check boxes like this:
And the name will be generated "chk01 to chk99", but how do I make the
receiving PHP script that "scans" for post variables that are sent, so
that I can work on this information?
Inspect this code example to see a way to handle this problem using magic
form variables in contained POST arrays:
Test of Multiple Checkboxes
0; $i--) {
$tr = $i % 5 === 0 ? Array('','') : Array('','');
$str .= " Input
#$i\n";
}
return $str;
}
echo(getCheckBoxes());
?>
Consuming of form post
An example of inverting a posted checkbox array to support $checked[45]
=== true behavior, making it easier to access and test the posted
content
Please select some random checkboxes above' .
' and submit the form');
}
?>
--
Jared Farrish
Intermediate Web Developer
Denton, Tx
Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$
On 5/28/07, Jared Farrish <[EMAIL PROTECTED]> wrote:
$tr = $i % 5 === 0 ? Array('','') : Array('','');
Ignore this line, it was from an earlier iteration of that function.
--
Jared Farrish
Intermediate Web Developer
Denton, Tx
Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$
On 5/28/07, tedd <[EMAIL PROTECTED]> wrote:
Hi Gang:
I can upload a text file and an image file via a html form, but I am
having problems uploading a PowerPoint file. Apparently, that's a
different critter.
Does any have any references or an example to show me?
Thanks,
Cheers,
tedd
It should work with the same form you used for image & text files, but
make sure you still have enctype set to multipart/form-data.
Also, like Jared said, make sure it isn't limited by any option, this
could be the upload filesize limit, but also memory limit if you were
planning to upload big files :)
Tijnema
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I saw this on article on Digg.
Reposting here in case anyone is interested or missed it being a holiday
today and all...
http://digg.com/programming/Optimize_PHP_and_Accelerate_Apache
Direct links:
http://www.ibm.com/developerworks/linux/library/l-tune-lamp-1/index.html
http://www.ibm.com/developerworks/linux/library/l-tune-lamp-2.html
and it seems there will be one more on the way...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello -
I'm looking for recommendations on literature which will give me ideas
on best practices for design and implementation of web applications,
with if possible, PHP as its core reference language.
Syntax has never been the challenge for me, like for most, it's always
been the most practical and intelligent way to break up an application
and focus on how to putting it all together for reusability and
maintaining the application.
Anyhow, suggestions are appreciated.
Cheers!
- sf
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hi, i want to do a svn update (subversion) from php using exec (or system)
now, this works:
exec("ls; pwd",$out);
foreach($out as $line)echo"$line\n";
and this also works and print me the help from subversion:
exec("svn help",$out);
foreach($out as $line)echo"$line\n";
but this doesnt work:
exec("svn update",$out);
foreach($out as $line)echo"$line\n";
dont print anything... dont update the files, pwd returns me the
correct path...
any ideas? im using cpanel... php5 and fedora 4 php runs as nobody...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'm looking for recommendations on literature which will give me ideas
on best practices for design and implementation of web applications,
with if possible, PHP as its core reference language.
Syntax has never been the challenge for me, like for most, it's always
been the most practical and intelligent way to break up an application
and focus on how to putting it all together for reusability and
maintaining the application.
Anyhow, suggestions are appreciated.
Check out www.opensourcecms.org and look for the type of app you need for
suggestions of different prebuilt php projects.
http://www.opensourcecms.com/
I like the Harry Fuecks books on sitepoint, as well as the O'Reilly books.
Professional PHP5 from Wrox is pretty good, too.
For a general framework-style, I like seagull:
http://www.seagullproject.org
If you're going to be doing object-oriented programming techniques, keep in
mind PHP is quite a bit different from other languages (such as C#) in the
way it implements some details of objects, and that PHP4 and PHP5 are quite
significantly different versions, vis-a-vis objects and classes.
Good luck!
--
Jared Farrish
Intermediate Web Developer
Denton, Tx
Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$
hi ppl :)
i run apache 2 on ubuntu feisty with php 5, i have website on which i have 2
links, the first is a
php which should start a vlc stream server on my server (see below), streaming
from my tvcard, the
vlc command itself executed on my machine from the console shows that the
command works fine, this
probably means that somehting is wrong with my php file.
the second command opens the vlc stream from the server, which works fine too
anyhow back to the first command the vlc stream server executer, i can see it
in the list of the
running processes on my machine, but the stream does not work, i don't know
why, either there is
somehting wrong with my php:
or does the www-data (apache) user needs special user permissions to access the
devices
/dev/video0 /dev/dsp ? i have no clue, is there a way to see some output? thx
for the help :)
katie
Get news delivered with the All new Yahoo! Mail. Enjoy RSS feeds right
on your Mail page. Start today at http://mrd.mail.yahoo.com/try_beta?.intl=ca
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi! I am developing a site with some authenticated users only features.
I would like to know if the following is true:
1. script for login process is located on a SSL-enabled server, so
usernames and passwords are encrypted.
2. upon successful login, user is relocated to a non-SSL-enabled server
which hosts the scripts that contain the authenticated-user-only features.
So, while usernames and passwords are protected by SSL, the PHPSESSID is
not. In other words, anyone who captures that HTTP GET packet can get
the session ID. Is that true?
Another question is while that session ID is valid only before an
unset() and a session_destroy(). So the attacker who has the session ID
must fake the session before the real user logout. Is that true?
Thanks in advance for any help offered.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
1. script for login process is located on a SSL-enabled server, so
usernames and passwords are encrypted.
https:// is an envelope encryption, so POST data, which is a part of the
packet data, not packet headers, is encrypted. As long as you POST or COOKIE
data that needs encryption, you're fine. GET is not secure.
2. upon successful login, user is relocated to a non-SSL-enabled server
which hosts the scripts that contain the authenticated-user-only features.
If this is what you're doing (header() or a meta-refresh html tag).
So, while usernames and passwords are protected by SSL, the PHPSESSID is
not. In other words, anyone who captures that HTTP GET packet can get
the session ID. Is that true?
There are a few different attack vectors with SESSION data. Needless to say,
never store or authenticate by a PHP SESSION id only; use cookies or encrypt
a page with script and include() the content per page, and force users to
login every page change.
Another question is while that session ID is valid only before an
unset() and a session_destroy(). So the attacker who has the session ID
must fake the session before the real user logout. Is that true?
Before the session is destroyed and the temp file where it is stored is
deleted from the harddrive. Do not store sensitive information or use a
SESSION id to authenticate a user.
--
Jared Farrish
Intermediate Web Developer
Denton, Tx
Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$
Hi, as always, I'm trying to connect to a MySQL database in the following
way:
mysql_connect('host','user','password');
In my local PC this Works perfectly, but in the server I receipt the
following error:
mysql_connect(): Client does not support authentication protocol requested
by server; consider upgrading MySQL client
Which can the cause of this error be?
Am I able to make something to solve it or does a problem belong exclusively
to the administrator of the server?
Thank you very much,
Tom.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tom wrote:
Hi, as always, I'm trying to connect to a MySQL database in the following
way:
mysql_connect('host','user','password');
In my local PC this Works perfectly, but in the server I receipt the
following error:
mysql_connect(): Client does not support authentication protocol requested
by server; consider upgrading MySQL client
Did you search google and look at the mysql website to see what the
problem is?
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi all.
I'm streaming a file ( location of which is to be hidden from clients,
hence the need to stream ). Basically I'm doing:
---
session_start();
// some authentication stuff and figuring out the path goes here
// ...
// ...
$source = "/accounts_reports/" . $_GET['id'] . ".bin";
header( "Content-Disposition: attachment; filename=\"" . $orig . "\"" );
header( "Content-Length: " .filesize( $source ) );
header( "Content-Type: application/octet-stream" );
header( "Pragma: no-cache" );
header( "Expires: 0" );
readfile( $source );
---
This works *perfectly* with firefox. It doesn't work at all with
Internet Explorer. Also ( not sure if this matters or not ), the site is
accessed via https ONLY.
When I click the link to my download php script, I get a dialog asking
if I want to open or save the file, and then whnatever I click, I get:
> Internet Explorer cannot download download.php?id=32 from IP_ADDRESS.
>
> Internet Explorer was not able to open this Internet site. The
> requested site is either unavailable or cannot be found. Please try
> again later.
However, a quick check of apache's ssl access log shows that IE did in
fact 'find' the site. Also, IE is producing the download dialog, which
suggests that it's 'found' the download.php script fine.
Now, before I get a litany of 'just use firefox then' responses, rest
assured that I would take this approach if I could, but the site is for
a customer, and they are in turn doing it for their customers, and this
just isn't going to fly. It MUST work with IE.
Who knows WTF is wrong and how I can work around it?
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Firstly always CC the mailing list - others can learn from the info as well.
Ing. Tomás Liendo wrote:
Yes, but the solutions that figure in the Web are only applicable if one
has access like administrator to the server.
I can't make things like upgrade versions or configure MySQL or PHP.
What I want to know is if I can make something as programmer or I need
to contact the administrator of the server.
Basically you have a mismatch between the client library and the server
version.
eg you have something like:
mysql5-client
mysql4-server
which isn't going to work.
Nothing you can do as a programmer but point the server-admin to the
mysql site and say "please fix".
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/28/07, Jody Gugelhupf <[EMAIL PROTECTED]> wrote:
or does the www-data (apache) user needs special user permissions to access the
devices
/dev/video0 /dev/dsp ? i have no clue, is there a way to see some output? thx
for the help :)
You can become the user you want to test permissions for:
sudo su -
su - www-data
On my Feisty install the www-data user does not have the permissions
you require.
cat /dev/dsp
cat: /dev/dsp: Permission denied
To access /dev/dsp the www-data user needs to be a member of the audio
group. You can use usermod to add the audio group to the www-data
user:
usermod -G www-data,audio www-data
After this I begin to get output from /dev/dsp as the www-data user.
Hope that help.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/28/07, Manolet Gmail <[EMAIL PROTECTED]> wrote:
but this doesnt work:
exec("svn update",$out);
foreach($out as $line)echo"$line\n";
dont print anything... dont update the files
Is it possible you need to provide some type of authentication? `svn
update` may be asking for input your exec call isn't providing.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Kurth wrote:
I can not figure out way this is not working can somebody help?
Untitled
function createRequestObject() {
var req;
if(window.XMLHttpRequest){
// Firefox, Safari, Opera...
req = new XMLHttpRequest();
} else if(window.ActiveXObject) {
// Internet Explorer 5+
req = new ActiveXObject("Microsoft.XMLHTTP");
} else {
// There is an error creating the object,
// just as an old browser is being used.
alert('Problem creating the XMLHttpRequest object');
}
return req;
}
// Make the XMLHttpRequest object
var http = createRequestObject();
function sendRequest(action,arg) {
// Open PHP script for requests
http.open('get', 'eventaction.php?takeaction='+action+'&uid='+arg);
http.onreadystatechange = handleResponse;
http.send(null);
}
function handleResponse() {
if(http.readyState == 4){
var response = http.responseText;
var update = new Array();
if(response.indexOf('|' != -1)) {
So, if it doesn't find a | (pipe) in the returned page, it won't do
anything!
update = response.split('|');
document.getElementById(update[0]).innerHTML = update[1];
}
}
}
$event['deleteevent']='
href="javascript:sendRequest(delete,32423434234234234324)">Delete this
event';
echo $event['deleteevent'];
?>
this is the 'eventaction.php script yo test if the ajax script works
Does your server allow for short_tags = On ???
if($_GET['takeaction']=="delete"){
$uid=$_GET['uid'];
echo $uid;
Well, as mentioned above, where is the | (pipe) that your JS code is
expecting???
Plus, where is the name of the object that you are wanting to take
action upon? Looks like your JS is needing something like this.
echo "{$div_id}|{$uid}";
Hope this helps
exit;
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I am working on a script to upload files into MySQL db. The following
script uploads to a file system how do I go about uploading the file
into the DB? Where do I put the SQL statement in the code below?
move_uploaded_file($_FILES['myfile']['tmp_name'],
"/var/www/".$_FILES['myfile']['name']);
Right here you would read the file into a string with
file_get_contents(), then write an SQL query to insert the string.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Søren Neigaard wrote:
Hi
I would like to have a unknown number of generated check boxes like this:
Then one the processor page, have it grab the "array" of indexed results
being submitted.
if (isset($_REQUEST['chk']) &&
is_array( $_REQUEST['chk']) &&
count($_REQUEST['chk']) > 0 ) {
foreach ( $_REQUEST['chk'] AS $index => $value ) {
//Do something here with the checkboxes submitted
}
}
And the name will be generated "chk01 to chk99", but how do I make the
receiving PHP script that "scans" for post variables that are sent, so
that I can work on this information?
Best regards
Søren
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/24/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
*lol* You must have missed the other thread... hence the wink on the
end :)
I'm guessing not everyone uses a threaded email client. And some
people always feel the need to post their 'thoughts' no matter how
well the question has already been beaten to death. :)
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php