note 59916 rejected from function.split by nlopess
| From: | nlopess@php.net | Date: | Tue, 20 Dec 2005 12:55:39 +0000 |
| Subject: | note 59916 rejected from function.split by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-100458@lists.php.net to get a copy of this message | ||
Note Submitter: amuncoi at home dot ro
----
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 %>