paparts Posted June 14, 2008 Share Posted June 14, 2008 Help!! I want to create a function that accepts input from forms and store it on an array and print the string and if I submit another string the previous and current will be displayed. ??? Quote Link to comment https://forums.phpfreaks.com/topic/110193-function/ Share on other sites More sharing options...
Progr@mmer Posted June 14, 2008 Share Posted June 14, 2008 you need more than a function :-\ Quote Link to comment https://forums.phpfreaks.com/topic/110193-function/#findComment-565512 Share on other sites More sharing options...
.josh Posted June 14, 2008 Share Posted June 14, 2008 Help!! I want to create a function that accepts input from forms and store it on an array and print the string and if I submit another string the previous and current will be displayed. ??? Sounds like you have a battle plan. So hop to it. Quote Link to comment https://forums.phpfreaks.com/topic/110193-function/#findComment-565514 Share on other sites More sharing options...
hansford Posted June 14, 2008 Share Posted June 14, 2008 Ok, post what code you have now and where the problem is and we'll be happy to assist you. Quote Link to comment https://forums.phpfreaks.com/topic/110193-function/#findComment-565544 Share on other sites More sharing options...
paparts Posted June 15, 2008 Author Share Posted June 15, 2008 This the problem the file below.. i'm planning to do something like this $stack_strings[$index] = $content; $index++; input string is first stored in index 0 and will be printed after submitting the form and the next string is stored in $index[1] so on... is this possible? how will I compare the headers[] so I could locate the location? is preg_match() possible? <html> <head> </head> <body> <?php include('crawler.class.php'); $i=0; $url1= array(); array_push($url1,$_POST["input_url"]); $result= count($url1,COUNT_RECURSIVE); for($i; $i!=$result; $i++){ $crawler = new crawler('www.mysite.com','firefox'); $conHandle = $crawler->crawlerConnect($url1[$i]); $headers = $crawler->fetchHeader($conHandle); $split_header = explode(" ",$headers[3]); echo "<table border=\"0\" width=\"100%\">"; echo "<tr><td width=\"25%\">$url1[$i] redirects to: <td><a href=\"$split_header[1]\">$split_header[1]</a><br />"; echo "</td></td></tr></table>"; } ?> <a href="index.html">back</a> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/110193-function/#findComment-565819 Share on other sites More sharing options...
hansford Posted June 15, 2008 Share Posted June 15, 2008 quote]how will I compare the headers[] so I could locate the location?[ are you trying to see what page sent you the information? if so, do a $_POST check for a unique name. You're wanting to store things in an array and keep track of this array after the page is gone. When the page goes so will your array. You need a DB or a session to do this. Quote Link to comment https://forums.phpfreaks.com/topic/110193-function/#findComment-565876 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.