note 59916 added to function.split
| From: | amuncoi at home dot ro | Date: | Tue, 20 Dec 2005 05:13:25 +0000 |
| Subject: | note 59916 added to function.split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100445@lists.php.net to get a copy of this message | ||
I have a text area and i want to split all in vars.... and add in a table can anyoane help me ? i
have the script in asp but i donot know to translate.
links = request.form("links")
songs = request.form("songs")
url = Split(links,vbcrlf)
melodie = Split(songs,vbcrlf)
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open conexiune
'query add album
query_add_album = "INSERT INTO albums (id,album, artist, title, songs, genre, cover, bitrate,
added, hits) VALUES
('','"&Request.Form("album_name")&"',
'"&Request.Form("artist_name")&"',
'"&Request.Form("title_name")&"',
'"&request.Form("nr_cantece")&"',
'"&Request.Form("genre")&"',
'"&Request.Form("cover")&"',
'"&Request.Form("bitrate")&"',
'"&strToday&"', '1');"
response.Write("<b>Executing query to add album in the albums
table:</b><br>"&query_add_album&"<br><br>")
connection.Execute(query_add_album)
'query add album
'query add songs
response.Write("<b>Executing sql queries to add songs into the
database:</b><br>")
for i=0 to request.Form("nr_cantece") - 1
query_add_mp3 = "INSERT INTO muzik (id,melodie,url,album,downloaded,data,user) VALUES
('','"& curatza(UCfirst(trim(melodie(i))))
&"','"& url(i) &"','"&
request.Form("album_name") &"',1,'"& strToday
&"','"& session("user") &"');"
connection.Execute(query_add_mp3)
response.Write(query_add_mp3 & "<br>")
next
'query add songs
connection.close
Set connection = Nothing
else %>
----
Manual Page -- http://www.php.net/manual/en/function.split.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59916
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59916&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59916&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59916&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59916&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59916&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59916&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59916&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59916&report=yes
Search -- http://master.php.net/manage/user-notes.php