[PHP] regexp problem

2003-07-10 Thread Taylor York
First,
I need the code to replace the link in a string, like

 with 

ereg_replace("''", "''",
$old);

That was the closest i got, but (.*) makes it take the first BASE HREF, and
the last ">, which sucks.
Can anyone help?

Second,
I hate asking for help on Regexps...I would like a tutorial online that
steps me through one method of them at a time, and then lets me move
on...kindof like math. You have to know the basics befor you can get
advanced.  Any help there either?



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



Re: [PHP] Please dirrect me -- headers ????

2003-07-14 Thread Taylor York
Cant you edit the httpd.conf?
I know there might be plenty of reasons why not to...but im just checking.
=)

Server mydom1.com
Alias mydom.com


"Anthony" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks for the links, I'm going through them now
> as far as the location thing.  I don't acutaly want to send the user to a
> different site, I just want to change what apears in the user's address
bar.
> in my example, both www.mydom1.com and www.mydom.com point to the same
site
> and weberver.  It's simply that one is the old address, and I want users
to
> see teh new address, even if they type in the old one.
>
> - Anthony
>
> "Ryan Gibson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> >
> > Headers have nothing to do with the  tag, the headers are sent
> before
> > the html page, ie they are not part of the html document, but something
> sent
> > by the web server before the page is sent to the user
> >
> >
> > Try:
> >
> > http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
> >
> > And
> >
> > http://www.cs.tut.fi/~jkorpela/http.html
> >
> > As for question 2, if you want to redirect the user to the other website
> use
> > the location header to redirect them to the other site (otherwise you'll
> > have to redirect them to the other site, then use frames to open the
> content
> > on the original site)
> >
> >
> > On 14/7/03 5:16 pm, "Anthony" <[EMAIL PROTECTED]> wrote:
> >
> > > This isn't necessarily PHP specific, but I'm looking for more
> information on
> > > HTTP headers.  I'd like to know what headers I should send and why.  I
> want
> > > my code to send out w3c compliant HTML.  I'm confused on exactly what
> > > headers do, and the difference between HTTP headers and information
> > > contained within the  tag.  Multiple google searches have gotten
> me
> > > only more confused.  Someone please send me in the right direction :)
> > >
> > > on an a possible similar note, I have a domain name www.mydom1.com
and
> when
> > > the user goes to it, I want it so say www.mydom.com in the browser
> address
> > > bar.  Can I do this by sending certain headers? (I have both domains
> > > pointing to the same server) ... should/could I do something like this
> > > through PHP or is there something I can set in Apache to do the same
> thing?
> > >
> > > Simply confused,
> > > - Anthony
> > >
> > >
> >
> > Ryan Gibson
> > ---
> > [EMAIL PROTECTED]
> >
>
>



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



[PHP] MySQL passwords dont work.

2003-03-18 Thread Taylor York
I have recently made a server on FreeBSD.  I've run into 2 problems.

1. I cant get PHP to compile with mysql
2. I can use mysql in PHP, but if i use phpMyAdmin, with user/pass...I
ALWAYS get No databases.  If i do user/no pass, it works.

wth?



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



[PHP] XML vs Everything Else

2002-09-03 Thread Taylor York

Ok, Help me out on this one.

As far as i can tell, xml documents store data..pretty much just a dababase.
Now please, correct me on anything I say incorrectly...But i just cannot
seem to grasp the point of using XML over MySQL.

Can anyone direct me to a page with xml in use? Something that can help me
grasp what its all about.

Thank you,

Taylor York
DreamStar Group



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




[PHP] Reg Exp issue

2002-09-20 Thread Taylor York

Hello, I am trying to find a string in another string with mysql. Normally,
this would work.

select 'foo' REGEXP ('foo');

And that would simply return 1, since it found it.  But, my strings are more
complicated than that.
One good random example is something like this..Ya i know, its wierd but go
with me on this.

ok/2.0 (hah 3.0; BAM oh 5.1; .hi CLR 1.0.4725)

so you would do a select like..

select 'ok/2.0 (hah 3.0; BAM oh 5.1; .hi CLR 1.0.4725)' REGEXP ('ok/2.0 (hah
3.0; BAM oh 5.1; .hi CLR 1.0.4725)');

That of course doesnt work.  All of the () 's, and /'s, and .'s, mess it all
up.   And suggestion on what to do? any function to convert all of the
special regexp characters ()[];.^*$ etc to work correctly?

Thank You,
Taylor York



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




[PHP] any string function to...

2002-09-23 Thread Taylor York

Is there any string function to put backslashes on any characters that are
used in regular expressions? IE ()[];.^*$ etc.

Thank you,
Taylor



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




[PHP] Re: phpmyadmin - moving data from one database to another

2002-06-18 Thread Taylor York

Just dump the data and structure to an SQL file, choose save as file, then
run all the code in the file on the next server.


Taylor York

"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The lazy and worthless a-holes at www.infinitehost.com (my host server)
> are forcing me to move all my MySQL data from one server to another
> because they are too dumb to fix it.
>
> I need to use phpmyadmin to move the data but i'm not %100 sure how to
> do it.  There are some "view dump" commands.  It looks like I can
> somehow download all the data and structure to my local computer, then
> upload it to the new server.
>
> Anyone have any info on this?
>
> THanks!
>



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




[PHP] redeclaring functions

2002-06-26 Thread Taylor York

I am having a problem with two scripts that use the same function name.
The two functions do the exact same thing...but when the include files are
called, the second file recieves a redeclare error.

Suggestions?



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




[PHP] Re: Passing Form Values

2002-06-26 Thread Taylor York

I would suggest posting the vars to a page, which will open up a new
javascript window, then .write("") the values into the javascript window
from the main page.


OpenWindow = window.open("", "newWindow", "height=400,
width=300,toolbar=yes,scrollbars=yes,menubar=yes");
OpenWindow.document.write("Debugging")
OpenWindow.document.write()


"Phillip S. Baker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Greetings All,
>
> Another question for today.
>
> I have a form.
> When the form is submitted I want to values passed to a pop-up window.
> I am aware of the need for Javascript for the pop-up window, but how do I
> get the values from the form passed to the new window so I can use them in
> further scripts.
> I can write the javascript to do the popup window and use the onSubmit
> command, but I cannot figure out how to pass the values with a regular
> submit button.
> Thanks
>
> Phillip
>



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




[PHP] Re: redeclaring functions

2002-06-26 Thread Taylor York

And sorry but no, I can't just delete one of the functions...these scripts
are used in many other places by themselves without the other..so script A
has to be able to have this function on its own page, and so does script B
on its own page.


"Taylor York" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am having a problem with two scripts that use the same function name.
> The two functions do the exact same thing...but when the include files are
> called, the second file recieves a redeclare error.
>
> Suggestions?
>
>



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




[PHP] header()

2002-07-09 Thread Taylor York

I'm trying to change some information in the header...lets say that User
Agent for example...but it just wont change.

putenv() will change the User Agent..but nothing else will

user agent: ";
echo getenv("HTTP_USER_AGENT");
?>

Suggestions?



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




[PHP] Replacing text on page, but not in tags

2003-11-06 Thread Taylor York
Lets say im trying to replace every occurance of 'hello' with 'hi'.
heres a sample page

  hello there!


This would simply change to

  hi there!


but what if it had an img?

  hello there!
  


It would then be,
hi there!
  


It would then be completely jacked up. Not only would it do the wrong img,
but the tag in general would be screwed be cause of the bold tag.  So what
can I do?

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



Re: [PHP] Replacing text on page, but not in tags

2003-11-06 Thread Taylor York
Ya, i know it will be done with regular expressions, but how?
I dont know how to format that kind of expression

>>
[snip]
It would then be completely jacked up. Not only would it do the wrong
img,
but the tag in general would be screwed be cause of the bold tag.  So
what
can I do?
[/snip]

Skip the image tag by using regex.

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



[PHP] PHP commands inside a MySQL Database

2002-05-30 Thread Taylor York

I am inserting html/php code into a database that would look something like

default page 

now the problem is, I am getting the field, title, and echoing as so (after
using mysql_fetch_array and extract

echo "$title\n";

the acual title of the page in IE is

default page 

It doesnt parse or execute any of the php.  Any suggestions?

Thanks
Taylor York



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