Hi, I'm looking for a simple free script which could be used on a website where a visitor types in one word and it transforms into another word. Will say, the visitor types in for example "Claire" and the word "beautiful" appears. Of course I should be able to implement in the script what name would turn into what word, but I'm looking for a base code which is already finished and I would only have to type in names and what words should appear when typed in. Nothing fancy at all, just something that works. I suppose this script probably would be best in PHP but I'm open for suggestions if you know of a script in another language. Please let me know where I could find such a script and I really appreciate you taking your time and helping me find out. Thanks in advance! Sincerely, Dinvest
$words = array('write Dinvest a script' => 'php-lover', 'very happy boy' => 'Dinvest', 'Hello' => 'world'); $a = 'Dinvest'; if(isset($a)){ //<---change $a to $_POST['word'] if($new_word = array_search($a,$words)){ echo $new_word; }else{ echo $a; } } PHP:
Thanks Php-lover, I really appreciate you taking your time and writing a script for me! It have made me a very happy boy indeed! I'm not so experienced with PHP scripts, but if I have understood the script correctly it would turn the word "Hello" into "world" , "very happy boy" into "Dinvest" and "write Dinvest a script" into "php-lover". If so it would be no problem for me to modify the script so it would display other words when certain other words are typed in. Php-lover, I'm sorry to ask for your time again but what would be the best way to make the script work in a html document? I've called for the php script in a form and with a submit button, but I have not managed to get it to work with the html correctly. I apologize for being such a complete noob Thanks once again! Sincerely, Dinvest
I made a script that will replace words or phrases when submitted through a form and shows the replaced words on the results page. The word replacements are stored in a txt file Example: Type this could you love Claire in the textarea in the demo link below. http://scriptglue.com/demos/rewriter/index.php The replacements are: Claire|beautiful love|hate could|might http://scriptglue.com/demos/rewriter/rel.txt Let me know if this is what your looking for.
Thank you Scriptglue! That is exactly the kind of script I'm looking for, thanks for making it for me! How could I do to download it? Thanks once again, I really appreciate your efforts of making the script for me. Sincerely, Dinvest