Hi all, I've searched, RTFM like crazy, and posted a couple times to try to work through what I need, but I still can't seem to get the job done. I'm enjoying learning PHP, but for now I just need to get this done - is it acceptable to post my need here and offer to PayPal someone who can just provide what I need? If not, can you point me to a good PHP site where I can pay them to help get it done? Thanks!
Chris
bizchris2001@yahoo.com
I'm trying to figure out the code to make multiple users be able to update text on this page: http://web19.omnis.com/kite3001/cd/indexTEST.php
I'll pay $50 if someone can provide the code that will replace the text and resave for the whole world to see the new text (there's about 80 different places to replace, like MadLibs/fill-in-the-blank, so I think it's less work to get this code snippet if possible than to break it out into different fields and tie to a database). I tried learning the PHP in time, but at this point I need it to just work when I paste it in (even if you can write it in 10 minutes I'll still happily e-handoff $50). Here's the code for that page that I've tried so far:
I like pizza and hot dogs
<form method="post">
Paste old text: <input type="text" name="OldText" size=17>
to be updated with
New text: <input type="text" name="NewText" size=17>
<input type="submit" value="Refresh">
This should have updated "pizza" text above, for example, but in the meantime here is your new text:
<? echo $_POST['NewText']; $var = $New ?>
Other tries:
try #1 <? $file = "http://web19.omnis.com/kite3001/cd/indexTEST.php";
$file2 = fopen($file, "r");
$ex = explode(" ",$file2);
$new = str_replace ("text", "pizza", $ex);
print $new; ?>
try #2
<? $var = "I like pizza and hot dogs"; $new = str_replace ("pizza", "macaroni", $var); print $new; ?>
Try #3
<? $openfile = fopen("http://web19.omnis.com/kite3001/cd/indexTEST.php", "r");
//read the entire file and assign it to $alltext
$alltext = fread($openfile, "http://web19.omnis.com/kite3001/cd/indexTEST.php");
fclose($openfile);
print $alltext; ?>
Note that I don't want to have to manually paste the whole page's text in a variable each time there's an update, it just should be able to find wherever 'pizza' shows up on the page and replace it. Thanks for your help!