Hello to every on. this A Full code about my problem i want make Insert multi data to my textarea example : if I post http://www.sampledomain.com/samplepost1/ http://www.sampledomain.com/samplepost2/ http://www.sampledomain.com/samplepost3/ http://www.sampledomain.com/samplepost4/ http://www.sampledomain.com/samplepost5/ the result must be MyDomain like domain.com http://www.domain.com/1/ http://wwwdomain.com//2/ http://www.domain.com/3/ http://www.domain.com/4/ http://wwwdomain.com/5/ My idea talk about Protection links but i want insert every url to line in database Inserting Multiple Thank you
you will need to have your inputs like this <input name="urls[]" size=30> <input name="urls[]" size=30> <input name="urls[]" size=30> the get your posts like this <textarea> foreach ($_POST['urls'] as $value) { echo $value."\n"; } </textarea> ... I think
Hello frnds , Thank you for reply This is doubt what i am asking about. i want to add multi links in textarea and the result out also in textarea as the corresponding short links. just like the site zero10.net. i found this site while surfing but i want to add more links at a time in row to get the result as corresponding respective short links. please help me.......Thank you.
you can use the explode() function to split the lines entered in the textarea. Then iterate through the array $urls = explode("\n",$_POST['multiurls']); foreach ($urls as $u) { // insert into DB } PHP:
Hello prasanthmj thankyou for reply. i used the code as you you said but i didnt get any results just the page is refreshing. here is the code what i used