RE: [PHP] How do I remove a string from another string in a fuzzy way?

2013-05-20 Thread Daevid Vincent


> -Original Message-
> From: muquad...@gmail.com [mailto:muquad...@gmail.com] On Behalf Of shiplu
> Sent: Monday, May 20, 2013 9:03 PM
> To: Daevid Vincent
> Cc: php-general General List
> Subject: Re: [PHP] How do I remove a string from another string in a fuzzy
> way?
> 
> Is your ticketing system written from scratch? Because such type of logic
> is already implemented in existing help desk softwares.

Yes written from scratch years ago.

> I think you can also use a specific string in your email to define which
> part goes in ticket and which part not. For example, you can include
> "PLEASE REPLY ABOVE THIS LINE\r\n" in each of the email. When reply comes
> you can split the whole email with this string and get the first part as
> original reply.

We have like 20,000 tickets in there already. Asking the users (who are not the 
brightest people on the planet to begin with given the vast majority of tickets 
I've encountered. Most don't read simple instructions as it is and many don't 
even speak Engrish) to follow some instructions is probably not going to work. 
And even if it did, that doesn't solve the problem for previous tickets.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How do I remove a string from another string in a fuzzy way?

2013-05-20 Thread shiplu
Is your ticketing system written from scratch? Because such type of logic
is already implemented in existing help desk softwares.

I think you can also use a specific string in your email to define which
part goes in ticket and which part not. For example, you can include
"PLEASE REPLY ABOVE THIS LINE\r\n" in each of the email. When reply comes
you can split the whole email with this string and get the first part as
original reply.


-- 
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader


Re: [PHP] Question about session_id() and session_start()

2013-05-20 Thread Matijn Woudt
Op 21 mei 2013 03:59 schreef "David OBrien"  het
volgende:
>
>
> On May 20, 2013 8:45 PM, "Matijn Woudt"  wrote:
> >
> >
> > On Mon, May 20, 2013 at 10:46 PM, David OBrien 
wrote:
> >>
> >> On Mon, May 20, 2013 at 4:14 PM, Tim Schofield 
wrote:
> >>
> >> > Matijn
> >> >
> >> > There are well over half a million lines of source code in PHP. It
seems a
> >> > little unhelpful to tell someone to go and read half a million lines
of C
> >> > when you could just tell them the answer?
> >> >
> >> > Thanks
> >> > Tim
> >> >
> >> > Course View Towers,
> >> > Plot 21 Yusuf Lule Road,
> >> > Kampala
> >> > T +256 (0) 312 314 418
> >> > M +256 (0) 752 963 325
> >> > www.weberpafrica.com
> >> > Twitter: @TimSchofield2
> >> > Blog: http://weberpafrica.blogspot.co.uk
> >> > On May 20, 2013 6:24 PM, "Matijn Woudt"  wrote:
> >> >
> >> > > On Mon, May 20, 2013 at 5:33 AM, 孟远涛 
wrote:
> >> > >
> >> > > > I find the Note in PHP document.
> >> > > > http://www.php.net/manual/en/function.session-id.php
> >> > > >
> >> > > > "Note: When using session cookies, specifying an id for
session_id()
> >> > will
> >> > > > always send a new cookie when session_start() is called,
regardless if
> >> > > the
> >> > > > current session id is identical to the one being set."
> >> > > >
> >> > > > I feel puzzled about this feature. Even if the current session
id is
> >> > > > identical to the one one being set, session_start will send a new
> >> > > cookie. I
> >> > > > want to know why session_start behave in this way.
> >> > > >
> >> > > > Forgive my poor English. Thanks in advance.
> >> > > >
> >> > >
> >> > > You will find the answer in the PHP source code.
> >> > > If you don't want this to happen, check if the current session id
matches
> >> > > with the value you want to set it to, and don't set if they match.
> >> > >
> >> > > - Matijn
> >> > >
> >> >
> >>
> >> I guess it would be to help prevent session hijacks like explained here
> >>
> >>
http://stackoverflow.com/questions/12233406/preventing-session-hijacking
> >
> >
> > How would it help preventing session hijacking if it was sending the a
new cookie with the same session id?
> >
> > - Matijn
> >
>
> I was thinking if I was sitting in a cafe and someone was sniffing and
tried to use my session info they would get a new session id where I would
still have my original one so they wouldn't be able to hijack mine trying
to reuse the same id I have since php would generate a new one
>
> No?

If you read the original question correctly, it's about a *new cookie* with
the *same session id*.

Second, if somebody is sniffing you he would also be able to grab the new
session id, and yours (old and new one) will be useless if he uses the new
session id before you do.
Avoiding session hijacking is not that easy, it's much easier to just use
an SSL connection. At least that protects you from someone sniffing on a
public wifi, but it does not help against sniffing viruses, malicious
browser extensions or cross site scripting attacks. Since it's off topic,
I'll end here. If you want to learn more, Google is your best friend!

- Matijn


[PHP] How do I remove a string from another string in a fuzzy way?

2013-05-20 Thread Daevid Vincent
We have a support ticket system we built and customers can reply via email
which then posts their reply into our database. The problem is that when you
read a ticket, you see each ticket entry (row in DB) but they tend to
accumulate the previous entries text since the customer replied to an email.
A thread if you will.

I'm trying to strip out the "duplicate parts" (cosmetically on the front end
via a checkbox, in case the support person needs to see the actual unaltered
version such as in cases where the algorithm may be too aggressive and rip
out important pieces inadvertently).

One challenge I'm running into are situations like this, where the text is
embedded but has been slightly altered.

ENTRY 1:

For security and confidentiality reasons, we request that all subscribers
who are requesting cancellation do so via the website of the company billing
their account. You can easily cancel your membership on our billing agent
website

(just in case THIS PHP list software mangles the above, it is just one long
string with no CR breaks as the ones below have)

ENTRY 2: (which was mangled by the customer's email client most likely and
formatted for 72 chars)

For security and confidentiality reasons, we request that all
subscribers who are requesting cancellation do so via the website of
the company billing their account. You can easily cancel your 
membership on our billing agent website

This is a simple example, but the solution logic might extend to other
things such as perhaps a prefix like so:

ENTRY 3: (again mangled by email client to prefix with ">" marks)

> For security and confidentiality reasons, we request that all
> subscribers who are requesting cancellation do so via the website of
> the company billing their account. You can easily cancel your 
> membership on our billing agent website

Keep in mind those blobs of text are often embedded inside other text which
I *do* want to display.

Initially I was thinking that somehow I could use a simple regex on the
needle and haystacks to strip out all white space and str_ireplace() them
that way, but then I don't have a way to put the whitespace back that I can
see.

Currently I'm just sort of brute forcing it and comparing the current
message to previous ones and if the previous message is found in this
message, then blank it out. But this only works of course if they are
identical.

get_message(false); 

foreach($my_ticket->get_entries() as $eid => $entry) 
{ 
$i++;
$output_message = $entry_message[$i] = trim($entry['message']);
//var_dump('OUTPUT MESSAGE:', $output_message);

for ($j = ($i - 1); $j >= 0; --$j)
{
//echo "\nsearching for
entry_message[$j] in [i = $i]:\n$output_message\n";
$output_message = str_replace($entry_message[$j], '',
$output_message);
//var_dump('NEW OUTPUT MESSAGE:', $output_message);
}

( ^ you have to start from the bottom up like that or else you have altered
your $output_message so subsequent matches fail ^ )

Would these be helpful? 

http://us2.php.net/manual/en/function.similar-text.php
http://us2.php.net/manual/en/function.levenshtein.php
http://us2.php.net/manual/en/function.soundex.php
http://us2.php.net/manual/en/function.metaphone.php

It seems like similar_text() could be, and if it's a high percentage,
consider it a match, but then how do I extract that part from the source
string, since str_replace() requires an exact match, not fuzzy.

I am also thinking maybe something with preg_replace() where I break up the
source string and take the first word(s) and last word(s) and use .*? in
between, but that has its' own challenges for example...

  /For .*? website/

On this text doesn't do the match I really want (it stops on the second
line)...

  For security and confidentiality reasons, we request that all
  subscribers who are requesting cancellation do so via the website of
  the company billing their account. You can easily cancel your 
  membership on our billing agent website
  More stuff goes here website

By putting more words before and after the .*? I could get better accuracy,
but that is starting to feel hacky or fragile somehow.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Question about session_id() and session_start()

2013-05-20 Thread David OBrien
On May 20, 2013 8:45 PM, "Matijn Woudt"  wrote:
>
>
> On Mon, May 20, 2013 at 10:46 PM, David OBrien  wrote:
>>
>> On Mon, May 20, 2013 at 4:14 PM, Tim Schofield 
wrote:
>>
>> > Matijn
>> >
>> > There are well over half a million lines of source code in PHP. It
seems a
>> > little unhelpful to tell someone to go and read half a million lines
of C
>> > when you could just tell them the answer?
>> >
>> > Thanks
>> > Tim
>> >
>> > Course View Towers,
>> > Plot 21 Yusuf Lule Road,
>> > Kampala
>> > T +256 (0) 312 314 418
>> > M +256 (0) 752 963 325
>> > www.weberpafrica.com
>> > Twitter: @TimSchofield2
>> > Blog: http://weberpafrica.blogspot.co.uk
>> > On May 20, 2013 6:24 PM, "Matijn Woudt"  wrote:
>> >
>> > > On Mon, May 20, 2013 at 5:33 AM, 孟远涛  wrote:
>> > >
>> > > > I find the Note in PHP document.
>> > > > http://www.php.net/manual/en/function.session-id.php
>> > > >
>> > > > "Note: When using session cookies, specifying an id for
session_id()
>> > will
>> > > > always send a new cookie when session_start() is called,
regardless if
>> > > the
>> > > > current session id is identical to the one being set."
>> > > >
>> > > > I feel puzzled about this feature. Even if the current session id
is
>> > > > identical to the one one being set, session_start will send a new
>> > > cookie. I
>> > > > want to know why session_start behave in this way.
>> > > >
>> > > > Forgive my poor English. Thanks in advance.
>> > > >
>> > >
>> > > You will find the answer in the PHP source code.
>> > > If you don't want this to happen, check if the current session id
matches
>> > > with the value you want to set it to, and don't set if they match.
>> > >
>> > > - Matijn
>> > >
>> >
>>
>> I guess it would be to help prevent session hijacks like explained here
>>
>> http://stackoverflow.com/questions/12233406/preventing-session-hijacking
>
>
> How would it help preventing session hijacking if it was sending the a
new cookie with the same session id?
>
> - Matijn
>

I was thinking if I was sitting in a cafe and someone was sniffing and
tried to use my session info they would get a new session id where I would
still have my original one so they wouldn't be able to hijack mine trying
to reuse the same id I have since php would generate a new one

No?


Re: [PHP] Question about session_id() and session_start()

2013-05-20 Thread Matijn Woudt
On Mon, May 20, 2013 at 10:46 PM, David OBrien  wrote:

> On Mon, May 20, 2013 at 4:14 PM, Tim Schofield 
> wrote:
>
> > Matijn
> >
> > There are well over half a million lines of source code in PHP. It seems
> a
> > little unhelpful to tell someone to go and read half a million lines of C
> > when you could just tell them the answer?
> >
> > Thanks
> > Tim
> >
> > Course View Towers,
> > Plot 21 Yusuf Lule Road,
> > Kampala
> > T +256 (0) 312 314 418
> > M +256 (0) 752 963 325
> > www.weberpafrica.com
> > Twitter: @TimSchofield2
> > Blog: http://weberpafrica.blogspot.co.uk
> > On May 20, 2013 6:24 PM, "Matijn Woudt"  wrote:
> >
> > > On Mon, May 20, 2013 at 5:33 AM, 孟远涛  wrote:
> > >
> > > > I find the Note in PHP document.
> > > > http://www.php.net/manual/en/function.session-id.php
> > > >
> > > > "Note: When using session cookies, specifying an id for session_id()
> > will
> > > > always send a new cookie when session_start() is called, regardless
> if
> > > the
> > > > current session id is identical to the one being set."
> > > >
> > > > I feel puzzled about this feature. Even if the current session id is
> > > > identical to the one one being set, session_start will send a new
> > > cookie. I
> > > > want to know why session_start behave in this way.
> > > >
> > > > Forgive my poor English. Thanks in advance.
> > > >
> > >
> > > You will find the answer in the PHP source code.
> > > If you don't want this to happen, check if the current session id
> matches
> > > with the value you want to set it to, and don't set if they match.
> > >
> > > - Matijn
> > >
> >
>
> I guess it would be to help prevent session hijacks like explained here
>
> http://stackoverflow.com/questions/12233406/preventing-session-hijacking


How would it help preventing session hijacking if it was sending the a new
cookie with the same session id?

- Matijn


Re: [PHP] Question about session_id() and session_start()

2013-05-20 Thread Maciek Sokolewicz

On 20-5-2013 22:14, Tim Schofield wrote:

Matijn

There are well over half a million lines of source code in PHP. It seems a
little unhelpful to tell someone to go and read half a million lines of C
when you could just tell them the answer?

Thanks
Tim

Course View Towers,
Plot 21 Yusuf Lule Road,
Kampala
T +256 (0) 312 314 418
M +256 (0) 752 963 325
www.weberpafrica.com
Twitter: @TimSchofield2
Blog: http://weberpafrica.blogspot.co.uk
On May 20, 2013 6:24 PM, "Matijn Woudt"  wrote:


On Mon, May 20, 2013 at 5:33 AM, 孟远涛  wrote:


I find the Note in PHP document.
http://www.php.net/manual/en/function.session-id.php

"Note: When using session cookies, specifying an id for session_id() will
always send a new cookie when session_start() is called, regardless if

the

current session id is identical to the one being set."

I feel puzzled about this feature. Even if the current session id is
identical to the one one being set, session_start will send a new

cookie. I

want to know why session_start behave in this way.

Forgive my poor English. Thanks in advance.



You will find the answer in the PHP source code.
If you don't want this to happen, check if the current session id matches
with the value you want to set it to, and don't set if they match.

- Matijn





Tim,

first of all, please bottom-post on this list.
Secondly, a simple google search for "php c session_start" resulted in 
this: https://github.com/php/php-src/blob/master/ext/session/session.c#L1303


- Tul

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Question about session_id() and session_start()

2013-05-20 Thread David OBrien
On Mon, May 20, 2013 at 4:14 PM, Tim Schofield  wrote:

> Matijn
>
> There are well over half a million lines of source code in PHP. It seems a
> little unhelpful to tell someone to go and read half a million lines of C
> when you could just tell them the answer?
>
> Thanks
> Tim
>
> Course View Towers,
> Plot 21 Yusuf Lule Road,
> Kampala
> T +256 (0) 312 314 418
> M +256 (0) 752 963 325
> www.weberpafrica.com
> Twitter: @TimSchofield2
> Blog: http://weberpafrica.blogspot.co.uk
> On May 20, 2013 6:24 PM, "Matijn Woudt"  wrote:
>
> > On Mon, May 20, 2013 at 5:33 AM, 孟远涛  wrote:
> >
> > > I find the Note in PHP document.
> > > http://www.php.net/manual/en/function.session-id.php
> > >
> > > "Note: When using session cookies, specifying an id for session_id()
> will
> > > always send a new cookie when session_start() is called, regardless if
> > the
> > > current session id is identical to the one being set."
> > >
> > > I feel puzzled about this feature. Even if the current session id is
> > > identical to the one one being set, session_start will send a new
> > cookie. I
> > > want to know why session_start behave in this way.
> > >
> > > Forgive my poor English. Thanks in advance.
> > >
> >
> > You will find the answer in the PHP source code.
> > If you don't want this to happen, check if the current session id matches
> > with the value you want to set it to, and don't set if they match.
> >
> > - Matijn
> >
>

I guess it would be to help prevent session hijacks like explained here

http://stackoverflow.com/questions/12233406/preventing-session-hijacking


Re: [PHP] Question about session_id() and session_start()

2013-05-20 Thread Tim Schofield
Matijn

There are well over half a million lines of source code in PHP. It seems a
little unhelpful to tell someone to go and read half a million lines of C
when you could just tell them the answer?

Thanks
Tim

Course View Towers,
Plot 21 Yusuf Lule Road,
Kampala
T +256 (0) 312 314 418
M +256 (0) 752 963 325
www.weberpafrica.com
Twitter: @TimSchofield2
Blog: http://weberpafrica.blogspot.co.uk
On May 20, 2013 6:24 PM, "Matijn Woudt"  wrote:

> On Mon, May 20, 2013 at 5:33 AM, 孟远涛  wrote:
>
> > I find the Note in PHP document.
> > http://www.php.net/manual/en/function.session-id.php
> >
> > "Note: When using session cookies, specifying an id for session_id() will
> > always send a new cookie when session_start() is called, regardless if
> the
> > current session id is identical to the one being set."
> >
> > I feel puzzled about this feature. Even if the current session id is
> > identical to the one one being set, session_start will send a new
> cookie. I
> > want to know why session_start behave in this way.
> >
> > Forgive my poor English. Thanks in advance.
> >
>
> You will find the answer in the PHP source code.
> If you don't want this to happen, check if the current session id matches
> with the value you want to set it to, and don't set if they match.
>
> - Matijn
>


Re: [PHP] pass parameter via URL

2013-05-20 Thread Matijn Woudt
On Mon, May 20, 2013 at 3:17 PM, iccsi  wrote:

> I would like to know how can I pass a parameter via URL using control
> value on the form.
> something like myPage.php?MyID=txtMyID.value
> I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.
>
> Your help and information is great appreciated,
>
> Regards,
>
> Iccsi
>
>
How about just using ?
Put a normal submit button there and you're done (and as a bonus it takes
care of character escaping)

- Matijn


Re: [PHP] Question about session_id() and session_start()

2013-05-20 Thread Matijn Woudt
On Mon, May 20, 2013 at 5:33 AM, 孟远涛  wrote:

> I find the Note in PHP document.
> http://www.php.net/manual/en/function.session-id.php
>
> "Note: When using session cookies, specifying an id for session_id() will
> always send a new cookie when session_start() is called, regardless if the
> current session id is identical to the one being set."
>
> I feel puzzled about this feature. Even if the current session id is
> identical to the one one being set, session_start will send a new cookie. I
> want to know why session_start behave in this way.
>
> Forgive my poor English. Thanks in advance.
>

You will find the answer in the PHP source code.
If you don't want this to happen, check if the current session id matches
with the value you want to set it to, and don't set if they match.

- Matijn


Re: [PHP] Symfony?

2013-05-20 Thread Ken Robinson

Drupal 8 is being built using Symfony, which means I have to learn it.

Ken

At 12:44 PM 5/20/2013, Bastien wrote:



Bastien Koert

On 2013-05-20, at 12:40 PM, Tedd Sperling  wrote:

> Hi gang:
>
> Who uses Symfony?
>
> Cheers,
>
> tedd
>
>
> _
>

I do. It's not my preferred framework. It's very powerful, but very 
complex and has a ton of yaml config files for the app. The learning 
curve is steep.


What's the question?

Bastien
--
PHP 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



Re: [PHP] Symfony?

2013-05-20 Thread Bastien


Bastien Koert

On 2013-05-20, at 12:40 PM, Tedd Sperling  wrote:

> Hi gang:
> 
> Who uses Symfony?
> 
> Cheers,
> 
> tedd
> 
> 
> _
> 

I do. It's not my preferred framework. It's very powerful, but very complex and 
has a ton of yaml config files for the app. The learning curve is steep. 

What's the question?

Bastien
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Symfony?

2013-05-20 Thread Jose Nobile
Hi, I'm using Symfony 1.4 Templating
Component


Saludos,
José Nobile


On Mon, May 20, 2013 at 11:40 AM, Tedd Sperling  wrote:

> Hi gang:
>
> Who uses Symfony?
>
> Cheers,
>
> tedd
>
>
> _
> t...@sperling.com
> http://sperling.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] Symfony?

2013-05-20 Thread Tedd Sperling
Hi gang:

Who uses Symfony?

Cheers,

tedd


_
t...@sperling.com
http://sperling.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: pass parameter via URL

2013-05-20 Thread Jim Giner

On 5/20/2013 10:06 AM, iccsi wrote:

Thanks a million for helping,
I just need to have a JS function to return a string var which contains
my variable from sending page and call the function onClick on the button.
Please let me know if I am wrong,
Thanks again for helping,

Regards,

Iccsi,

"Jim Giner"  wrote in message news:40.54.04612.03b2a...@pb1.pair.com...

On 5/20/2013 9:17 AM, iccsi wrote:

I would like to know how can I pass a parameter via URL using control
value on the form.
something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use
myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,

Regards,

Iccsi

Yes - this is a JS question.  But - the answer is:

var url="myPage.php?MyID="+txtMyId.value;

Now the variable 'url' contains your url


Then put my sample statement in the function that your onclick= is 
calling.  Although - I don't know what you mean by 'sending page'.  This 
all has to be done in the same page.  Or if you want the 'value' to be 
sent to the 'myPage.php' script, you could just make 'txtMyID' a hidden 
input field and use a POST action instead of a GET.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] pass parameter via URL

2013-05-20 Thread shiplu
On Mon, May 20, 2013 at 7:49 PM, iccsi  wrote:

> Thanks for the message and helping,
> Your js looks like to parse URL.
> Please let me know if I am wrong,
> Do you have any code to generate the URL parameter using control value?
>
> Thanks again for helping,
>
> Iccsi,
>
>
> "shiplu"  wrote in message news:**CADO5mDCVbRquXCviuaY9fVajJb+**
> 6Ba872LbHrRHTdD8bJOATLg@mail.**gmail.com...
>


You can generate the url using string concatenation operator +.

To keep it consistent and out of error you need to reverse the same
function i have given then you can perform both. The idea is there.

-- 
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader


[PHP] Re: pass parameter via URL

2013-05-20 Thread iccsi

Thanks a million for helping,
I just need to have a JS function to return a string var which contains my 
variable from sending page and call the function onClick on the button.

Please let me know if I am wrong,
Thanks again for helping,

Regards,

Iccsi,

"Jim Giner"  wrote in message news:40.54.04612.03b2a...@pb1.pair.com...

On 5/20/2013 9:17 AM, iccsi wrote:

I would like to know how can I pass a parameter via URL using control
value on the form.
something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,

Regards,

Iccsi

Yes - this is a JS question.  But - the answer is:

var url="myPage.php?MyID="+txtMyId.value;

Now the variable 'url' contains your url 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] pass parameter via URL

2013-05-20 Thread iccsi

Thanks for the message and helping,
Your js looks like to parse URL.
Please let me know if I am wrong,
Do you have any code to generate the URL parameter using control value?

Thanks again for helping,

Iccsi,


"shiplu"  wrote in message 
news:cado5mdcvbrquxcviuay9fvajjb+6ba872lbhrrhtdd8bjoa...@mail.gmail.com...


On Mon, May 20, 2013 at 7:17 PM, iccsi  wrote:


I would like to know how can I pass a parameter via URL using control
value on the form.
something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,



This is more a js question. Because form.controlname.value is only
available in javascript. A similar question I answered long ago on
Stackoverflow is
http://stackoverflow.com/questions/9009311/get-change-remove-url-parameters-with-jquery/9009558#9009558

And here is function I wrote that does it using pure javascript.
http://shiplu.mokadd.im/61/parse-query-string-by-pure-javascrirpt/



--
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: pass parameter via URL

2013-05-20 Thread Jim Giner

On 5/20/2013 9:17 AM, iccsi wrote:

I would like to know how can I pass a parameter via URL using control
value on the form.
something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,

Regards,

Iccsi

Yes - this is a JS question.  But - the answer is:

var url="myPage.php?MyID="+txtMyId.value;

Now the variable 'url' contains your url

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] pass parameter via URL

2013-05-20 Thread shiplu
On Mon, May 20, 2013 at 7:17 PM, iccsi  wrote:

> I would like to know how can I pass a parameter via URL using control
> value on the form.
> something like myPage.php?MyID=txtMyID.value
> I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.
>
> Your help and information is great appreciated,
>
>
This is more a js question. Because form.controlname.value is only
available in javascript. A similar question I answered long ago on
Stackoverflow is
http://stackoverflow.com/questions/9009311/get-change-remove-url-parameters-with-jquery/9009558#9009558

And here is function I wrote that does it using pure javascript.
http://shiplu.mokadd.im/61/parse-query-string-by-pure-javascrirpt/



-- 
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader


[PHP] pass parameter via URL

2013-05-20 Thread iccsi
I would like to know how can I pass a parameter via URL using control value 
on the form.

something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,

Regards,

Iccsi 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php