[PHP] a regular expression problem - split text
Hi all I am sorry for the very simple question but I can't doing this. I have a text like this: $text= !-- 1 -- this is January !-- 2 -- this is February !-- 3 -- this is March !-- 4 -- this is April ; OK.. i want to show e.g. this is January in my var $sub_text. How can i doing this using a regular expressions? ?php ereg((help-me-with-a-regulars-expressions-sentence),text,$sub_text); echo $sub_text[0]; ? thanks a lot Juan Pablo Aqueveque [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html input and php (newbie)
What is of your PHP version? I guess of your directive register_globals = off in your php.ini, so your code would be run OK like this: ?php if ($_POST['submit'] ) { echo 'Hello'.$_POST['UserName']; } ? --jp At 21:31 24-09-2002 +0200, Anna Gyor wrote: Hi, I just began to learn php and I have te following code. How can I get the input field value in the php script? Because my script doesn't work. $UserName is always an empty string. ?php if ($submit == click){ echo Hello, $UserName; } else{ ? htmlbody form method=post action=input.php3 Enter Your Name input type=text name=UserName/inputbr input type=submit name=submit value=click/input ? echo Hello, $UserName; ? /form /body/html ? } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] links into DB
Hi all, I want to do this: When somebody do click in this url : http://somehost.somedomain/mailtolinks.php?id=45 the script 'mailtolinks.php' should open my e-mail client (like mailto:[EMAIL PROTECTED] sentence) Any idea? thanks Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] links into DB
Oh yeah ...I thought this same, I simply wanted to know if somebody could give a better solution. Thank you for your quick answer Jacob!.. greetings!, --jp At 00:55 11-09-2002 +0800, Jacob Miller wrote: I don't think its possible to make a normal link open the default email as mailto: is a special trigger built into the browsers. The only way I can think of would be using javascript in the page.. something like body onLoad=document.location='mailto:[EMAIL PROTECTED]'; /body - jacob At 18:51 09/10/2002, Juan Pablo Aqueveque wrote: Hi all, I want to do this: When somebody do click in this url : http://somehost.somedomain/mailtolinks.php?id=45 the script 'mailtolinks.php' should open my e-mail client (like mailto:[EMAIL PROTECTED] sentence) Any idea? thanks Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading file
Hi friend, http://www.php.net/manual/en/features.file-upload.php And take a look to the User Contributed Notes --jp At 13:03 03-09-2002 -0700, Clemson Chan wrote: Hi, I am new to this group. I am trying to figure out how to let people to upload image files to my website. My ISP is using PHP 3 (I believe). If someone can give me simple example, that will be great. Thanks. --Clemson How can I tell what version of PHP is running on the system (linux)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] remove header tags - include file
Hi guys, me again. (thanks kevin, but i'm afraid you didn't understand me). After looking for untiringly in the archives I have I decide to ask again. This is my problem: I want include the file html.html inside of my file index.php, but before include it I want to remove html../head tags from my html.html file. My pseudo code would be look like this: index.php ?php include_once(common.php); header(Welcome to my page); include_html_file(html.html); footer() ? common.php function include_html_file($f) { (your kind contribution:-) ) } thanks!! --jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cleaning HTML TAGS (headed)
Hi everyone. Sorry for the trivial question. I want insert a .html inside of one .php file but without htmlhead and body tags. I built a routine (shown it down) it's running OK but show me the title (title) of my html. somebody can help with a routine a little me more effective than mine? Thanks in advance. --jp My Routine: if ($myFile = fopen(html.html,r)) { while(!feof($myFile)) { $myLine = fgetss($myFile, 256,ap); $myLine = ereg_replace(\n,,$myLine); print($myLine); } } else { echo file no found ; } Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dumb
Brendan, you have my vote. come on.. let's work. --jp At 22:53 09-07-2002, Brendan P. Caulfield wrote: this is dumb. can we just ignore this and move. we are all smart enough to block his posts. let's just do it and quit wasting all of our time and get back to doing what we do here. respectfully, -brendan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Template's, that is the question!
- UltraTemplate - FastTemplate - PHPLib Template - TemplatePower - Smarty - (there are others?) Hi folks: I am about to begin a new project. Can somebody give me some references above templates? Experience, opinions, complaints, All will be appreciated. Thanks! Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL - Creating The Database
ops! ops! ops! I wonder : Who does have the reason in this discussion? Mr. Jason Teagle or Mr. David Freeman Being honest, I would say 50% and 50%. At 09:45 04/06/02, Jason Teagle wrote: - Original Message - From: David Freeman [EMAIL PROTECTED] To: 'Jason Teagle' [EMAIL PROTECTED]; 'PHP Mailing List' [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 1:58 PM Subject: RE: [PHP] MySQL - Creating The Database How very sad. It's not new - I've seen things like this on many lists and newsgroups. Apparently it is easier for people to be sarcastic and give a flippant RTFM response than to actually help people. The only list I've ever seen that actually treated newcomers with a bit of respect in most cases is WinDev. Here's an example of what a good answer would have been: MySQL databases aren't single files like other types. They're like directories with files as tables. PHP itself can create a database, take a look at mysql_connect(), mysql_query() and the CREATE DATABASE SQL action. See? It gives the answer, involves no sarcasm or mockery, and above all, actually HELPS the OP. But no... being a smart-ass is easier, right? The trouble with wise guys like these is that they assume: 1) That the OP has not bothered to try to find the answer. We're not all geniuses, we can't all think laterally all the time, we can't all come up with the right way of finding the answer. For the record, I _did_ look online using Google and _did_ look around the PHP manual, but was unlucky enough not to end up on the route that shows mysql_create_db(). My misfortune. 2) That the OP already knows the answer. Coming from a number of other programming languages where it is not possible to create a database programmatically, it is natural to assume that the same might be true of PHP. Had I known that PHP could create it from scratch, I would not have needed to deal with this pathetic situation. But I didn't know, so I stupidly thought that I might get some help from a list pretending to help people trying to program in PHP. Obviously, I was wrong. Also my misfortune. Don't bother responding, I have left the list. Plenty of places where people are actually willing to help. _ _ o oJason Teagle [EMAIL PROTECTED] v -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] paging MySQL layout
Hi everyone. I know, this is a off topic. My always nice boss wants to put a series of documents in our web site. I want to save myself I work and I want to put them in a DB. Somebody can help me with the layout of my DB?. I have some idea like this. create table documents ( id in(11) not null auto_increment primary key, document text default null) it is a very basic, simple idea (I want to show something links like Pag 1 | pag.2 | etc.) When it finishes, I will share the result. thanks! -Jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] shell command
http://www.php.net/manual/en/ref.exec.php At 09:30 15/05/02, you wrote: How to execute dos\winnt command in php script, i need disk map in php excample : ? some code . and now i need do this : 'net use I: \\server\shere_folder\' ..? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP editor (win)
Hi guys I know this question it's very recurrent but the problem of Jon Yates make me think again this stuff. Somebody knows a quick editor, simply and with highlight? :) Jp I have tried : PHPEdit, DevPad Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Alternating table rows...
Just another version. ?php function useColor() { static $ColorValue; // remember the last color if ($ColorValue == #00FF00) { $ColorValue =#CCFFCC; else { $ColorValue =#00FF00; } return($ColorValue); } ? the call ... $RowColor = useColor(); ... echo 'td bgcolor='.$RowColor.''; - Jp At 15:46 10/05/02, you wrote: [snip] ? $rowcount = 0; while($dbrowa = mysql_fetch_object($dbseta)){ $dbrowb = mysql_fetch_object($dbsetb); //change the color of alternating rows $rowcount ++; if ($rowcount == 1){too many lines of code [/snip] I get humbled by this list every day. Could I have Single PHP Lines for a thousand Alex? Dammit, still thinking like an old Basic programmer... Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Juan Pablo Aqueveque [EMAIL PROTECTED] Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php