Automatically Make Text Into A Link
how do I make php search through a $_POST[variable] for a certain set of string, lets say R1000000. Then I would want to turn that string (R1000000) into a link
<a href=example.php?id="R1000000">R1000000</a>Then append that link back into the original $_POST[variable] replacing the R1000000, with the link version. I'm sure this is doable, I just have no idea where to start, regex?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Make Link To Typed Text
Is there some possibility in PHP to do automatic link when somebody type URL in form window? (One or more URL in one text.) example: www.xxxxxxxx.com to be a <a href="http://www.xxxxxxxx.com">www.xxxxxxxx.com</a> (as I think, maybe I can do that with chage string when query returned from database, but I must to know how he typed in database in text: only "www..." or begin with "http://www...".) Is somebody have a script how can I change strings?
How To Automatically Make URLs Posted In A Forum Active Links?
I've been working on modifying a forum script for some time now and its almost ready to go. You can test it at http://www.designlaunchpad.com/forum if you like. The one additional feature I want to implement is the automatic creation of a link when someone posts a URL in their message. Most forums have this, is it that tough to add in? I'm pretty comfortable editing PHP and understanding what is happening where but I suck at authoring it. I checked the manual at php.net and tried searching this forum and google but keep running into dead ends. So can someone offer me some suggestions or point me toward some help?
Make Link With A Phrase
I would like to have some help for this: There is any phrase like "Some text, here, #*$!, yyy aaaa" I need to separate the words and make links, like: <a href='Some'>Some</a> <a href='text'>text</a> <a href='here'>here</a> Someone know any topic that explain how to do that?
Make A Link Using Array Content
I want array's content to become a link itself. like,,,,, echo "<a href="$result[$rows][$cols]">".$result[$rows][$cols]."</a>"; this $result[$rows][$cols] in array has contents of email address.but it doesn't work. can anybody tell me how?
Need To Create And Make Download Link For Csv
i have an app that i need to be able to publish a link to download a csv file. i know that i can use php to make the file, but how to i link to it through php. like if i have an html file that has a link in it like this <a href="somedata.csv">here be data</a> or would i make that a .php file that would generate a csv ? the data will come from MySQL.
Inserting A Row Of Characters In Text Field Automatically
Good Day to All! Hoping someone can help with this simple problem. I am inserting text into a text field. Because there may be a number of entries made sequentially I want to automatically insert a line of characters such as ****** or ------------- automatically between rows to make the output more legible. Here is what I have so far. I want to insert the line after ....
Mkdir() How Do I Automatically Make A Index File And A Css File
using mkdir() how do i automatically make a index file and a css file. what i really mean is once the directory has been made how do i make it so i have a index and css file there, its just because im making a forum hosting service and i need all the files automatically set up in the directory. how can i do this?
Text Input Box Automatically Escapes Quotation Mark
Text Input Box Automatically Escapes Quotation Mark The text input box below works fine with text. However, when a single or double quotation mark (i.e. ' or ") is entered the code below outputs an escape mark. For example, if the word DevShed is entered into the text box then executed the code simply outputs the word DevShed. But if the word DevShed is put in quotation marks, like so "DevShed", and executed the code outputs the following: "DevShed". My question is this: How can I keep the PHP code from automatically escaping quotation marks when the form text input box is executed?
How To Make Text Wrap In Table Cells?
I don't understand this at all. I have a table with fixed width and height in pixels. Yet when I place a long text string in a cell, the cell expands as far as needed to the right or left to fit the string on one line. This is driving me quite mad. How do I ensure that a long string is displayed in a neat, orderly fashion? My question has nothing to go with wrapping text around images. I just simply need to have text wrapped!
How To Make Text Area Recognize Hyperlinks?
I built a simple form where a user can enter and post news items to his site (with PHP, into MySQL). He doesn't know much HTML. Is there some way he can enter some simple text to declare something a hyperlink, and have PHP recognize that that means "make this text into a hyperlink"? ....so that instead of having to type this into the textarea: <a href="http://www.somesite.com">somesite</a> ....he could type something more intuitive, like this: <somesite.com>somesite</somesite.com>?
How Do You Query A Db From Link Text?
I was wondering how I would go about doing this. I would like to return some items from a database depending on what a user clicked. I would like to just use the link text that was clicked on. Then I would search through one field in each record to see if it matched that text, if so, I would display it. I'm not sure how I could give each link a value though. I would like someway to get the link's text and use that to search a database. Thanks in advance for all the help!!!
Converting Www Text To A Link
Does anyone know how i could check some inputted text and see if it had a www.url.com in it and if so wrap it with: <a href="http://www.url.com">www.url.com</a> It would need to do .com .co.uk .ie etc I think its something to do with regular expression but im not sure.
Clicked Link Text
I have created a table on the fly from mysql while($row = mysql_fetch_array($query)) { echo "<tr>"; echo "<td class='body'><a href='#'>".$row['au_id']."</a></td>"; echo "<td class='body'>".$row['au_fname']."</td>"; echo"<td class='body'>".$row['au_lname']."</td>"; echo "</tr>"; } is there anyway of getting the current clicked au_id? i would like the user to click the id to display more information but I'm unsure how to get the currently clicked id...
Make Text String Read From Right To Left In Imagettftext() Function
I want to write a text string from right to left instead of from left to right with the imagettftext (); function I read in teh manual that the angle variable controls this, it says that 0 angle means left to right, so I tried 180, 360 but nothing happens What angle do I need to put it to get it to write it right to left I am writing a hebrew text string with a font.ttf that supports hebrew characters <?php $white = imagecolorallocate($background, 255, 255, 255); $fontfile = "davidtr.ttf"; $string = "מחלדגכ"; imagettftext($background, 12, 360, 3, 17, $white, $fontfile, $string); ?>
Submit Form Via A Text Link
But I have a few input fields, but the submit button is not a button but just a text link. How can I create the text to act as a submit type to submit the form?
Removing URL Link From Text Field
How can i remove a URL link from a form text field or the area where results are posted when a user enters http://www.mywhateversite.com. For example, here on this site. I want to allow the text, but not the link. If you guys are familiar with myspace and have tried to put a link to another site, the myspace site automatically changes it to something else or blank. Thus allowing the user to post the site url, but without the link.
How To Change Template Menu Link Text Color For Page Currently Viewed ??
Say you have a left menu that stays the same on every page within in your site. Obviously you would make this menu a template or library item, so that when you edit one version, all the others are updated. Let's say the left menu is the following: Page_1 Page_2 Page_3 Now, when I am viewing Page_1, I want the "Page_1" text in the left menu to be red, so that the viewer knows what page they are on. When I click on the left menu link for "Page_2", then I want the "Page_1" text to go back to black and the "Page_2" text to be red.
No Libphp4.so File Created In Make Intstall Or Make.
I have done a make, and a make install on the 4.3.6 version, using /usr/local/etc/php as the directory I make from. However, no matter what I do, I do not see a php4lib.so that has been created. The documentation I recieved (an IBM source) says that the following has to be added to the httpd.conf file : LoadModule php4_modulelib/apache/libphp4.so .. .. .. AddModule mod_php4.c here is the output from my make install : [root@mail php]# make install Installing PHP SAPI module: cgi Installing PHP CGI into: /usr/local/bin/ Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar - already installed: 1.1 [PEAR] Console_Getopt - already installed: 1.2 [PEAR] PEAR - already installed: 1.3.1 Wrote PEAR system config file at: /usr/local/etc/pear.conf You may want to add: /usr/local/lib/php to your php.ini include_path [PEAR] DB - already installed: 1.6.2 [PEAR] HTTP - already installed: 1.2.2 [PEAR] Mail - already installed: 1.1.3 [PEAR] Net_SMTP - already installed: 1.2.3 [PEAR] Net_Socket - already installed: 1.0.1 [PEAR] XML_Parser - already installed: 1.0.1 [PEAR] XML_RPC - already installed: 1.1.0 Installing build environment: /usr/local/lib/php/build/ Installing header files: /usr/local/include/php/ Installing helper programs: /usr/local/bin/ program: phpize program: php-config program: phpextdist
Dynamic Download Link - Not Direct File Link
I'm posting a podcast feed that makes reference to audio files for download. Instead of linking to the files directly (e.g. www.mywebsite.com/podcast.mp3), I want to link to the file as get variables so that I can track number of listeners (e.g. www.mywebsite.com/?audio=podcast.mp3). Where would I look to get something like this to work? How do I start sending audio data to the user using a link like this?
Determine If User Came From Inner Link Or An Outside Link
any php method or function to determine if a user came from within the website or from an outside website. I have a page that I want to display in different manners depends on how did the user arrive at my site. I know about the HTTP_REFERER function. but don't really know how to use it. I know this is the syntax: <?php echo $_SERVER['HTTP_REFERER']; ?> but when i entered the code in the php page. for instance test.php, there is nothing coming up. So my questions: 1. is there any other method? 2. could any of you maybe specify a bit more details about this function and how to use it.
PHP Add Crontab Automatically
I need to create an install file, the purpose is that user don't have to go to CPANEL and add CRON JOBS manually. I need one file, that add CRON JOBS automatically without log into CPANEL. Here is my function : function addLynxCron() { $time = time(); //dump crontab list to text file $command1 = "crontab -l > ./tempCronLynx$time.txt &"; exec($command1); chmod ("./tempCronLynx.txt", 0777); $forFile = ""; $url = $_SERVER['SERVER_NAME']; $path = $_SERVER['PHP_SELF']; $cronCommand1 = "lynx -dump */15 * * * * http://$url/cron.php"; $cronCommand2 = "lynx -dump */15 * * * * http://$url/email_cron.php"; $forFile .="$cronCommand1"; $forFile .="$cronCommand2"; $fp2=fopen("./tempCronLynx2$time.txt", "w"); fwrite($fp2, $forFile); fclose($fp2); //create new cron jobs $command1 = "crontab tempCronLynx2$time.txt "; exec($command1); echo "crontab successfully added."; } The function above is not working... when I check the file tempCronLynx2$time.txt is correctly written with the cron jobs I want. But it failed when added the new cron jobs using that files $command1 = "crontab tempCronLynx2$time.txt "; exec($command1); anyone please help with this problems...
Run Program Automatically
I want to create the option for my clients to create their own e-mail address. When I do this in Telnet, I have to run the command 'vadduser' It then asks me for a username, I want to assign this automatically. (1,2,3,4 etc etc) It then asks me for a password, I want this to be something the user has already given in a form (before the script was run). It then has to be retyped. Those two things can be done automatically. It then asks if I want to assign a disk quota (YES) and then asks for the number of megabytes (1) That's it. Are there any examples available of how to do this?
Best Way To Automatically Log Out After Certain Time
What is the best practice for automatically logging out users after certain amount time after the last page request? Is this a php job or a javascript job? It seems that javascript can't be relied on, and that php might have to store something in a database. Perhaps the php version could use a $_session var. I could be reset every page request and compared. But then that wouldn't change the browser display. Maybe a mixture of php and javascript?
Automatically Add Slashes
Is there a function that automatically adds the extra slashes needed for html inside echo statements and such? It's a real pain to go back and edit. There has to be an easier way besides using template systems.
How To Automatically End A Session ?
how to automatically end a session ? i want the session to end automatically instead of the user clicking on log out ? how do i run session_destroy(); automatically ?
Automatically Update .zip?
Is there a way to make a dynamic zip file that updates along with changes to a folder? I have a folder with about 75 images that grows/changes every other day,and I'd like to offer them as a download. My problem is that I don't want to waste time manually doing this, so is there a PHP way to do it (or any other language, if not PHP)?
Automatically Adding 1
I have created a database for a house points system. Everything is working fine, but there is one thing I can't do. I want to be able to click a link, and for the person to have 1 point added to them. It goes like this so far: Code:
How Do I Reduce An Image Automatically?
I did a script that generates a thumb of the normal image( is not well a thumb, why the image is great ), but the matter is that I catch the image size, I multiply by 70 and divide for 100 to generate an image a little smaller of the original. That I happens wanted this image was generated with a maximum size. Example: If I have an image with 1536px and do that process, she stays with 1075px. But I wanted her to get at most with 500px. How Could I do that?( If I decrease the 70 the smaller images stay very small )
Automatically Check Email Acc
I am still looking for a script (preferably PHP) that automatically POPs (checks) my email account every 20 minutes and sits serverside.
Automatically Linking URL's
When somebody enters info into a form on my page how do I make the script I am using automatically make URL's into links?
Automatically Print The Corresponding Value In The Same Page
i have 5 sets of text boxes in the table. what i was thinking to happen is like, when i input something in the text box 1, and hit a certain key (tab-key or whatever key), it'll automatically check the database, and when it reaches it's corresponding value, the value will be printed out in the same page i'm accessing.. and then, i can type again to fill other text boxes.
Automatically Detecting Tables In A Db
Is it possible to write a script that, when provided with a database, it will return all the tables names? I will go onto try and put together a script that will not only output the table names but also output the sql code required to CREATE the table (i.e. CREATE TABLE example (exampleid auto_increment not null primary key integer, name text, email text);) - Is this pretty simple to do? Are there any free scripts online that would do this?
Automatically Creating Pages
I was wondering how to , when a page gets filled up too much with comments by visitors, add the next batch of messages on a new page. For example, you know how this forum has a minimum post length for each page and then starts putting the newly created posts on a new page: how do you do that?
Add Backslashes To Every HTML Automatically?
Is it possible to add backslashes to every HTML and PHP special character automatically? There are many functions that do this partially, like "addslashes", and "quotemetadata", but isn't there a single function that does does it all?
Treemenu Append Automatically
Here i got a problem to append my treemenu file automatically. this mean that the user haven't need to click the main title of menu to display their subtitle(allow the user to done other funtions on it).
Automatically Reshuffling The IDs In MySQL?
Everytime I make a new table, I would firstly declare an ID field. (yeah I guess thats the root of the problem.) Take for example, we have 5 entries. If I delete entry 3, then the IDs will still be... 1 2 4 5 instead of getting the favoured 1,2,3,4 How, or what should I do to prevent this? I don't see any default ID fields in MySQL...is there any?
How To Automatically Display From A List Box?
I am working on a PHP/HTML form which supports End User queries. I need the user to select a combination of Airline and corresponding place of Origin. i,e Delta - Madison, Dallas, Atlanta KLM - Amsterdam, Houston, Detroit Brit - New York, London, Seattle I have a list of Airlines in a list box. The moment the user selects an Airline(Delta) from the List box, the list box below it needs to have (Dallas, Atlanta, Madison) as its options. How is this done? How do I use a listbox selection as a trigger an automatically start the next activity?
Automatically Send Email
Is it possible in php to automatically send an email out on someone's birthday? I mean without anyone clicking a button to do so? If so, please let me know.
|