How can insert this into the databse after checking with fopen |
[eluser]phantom-a[/eluser]
This is controller that handles a form submission with one field. a field called "url" I use fopen to check if the url the person submitted is valid, then I want insert it into a table called "links" into a field called "submitted_url". How can this be done? I have already the function working except missing the databse part where it inserts it into the table if its a valid url. Code: function submit()
[eluser]Sumon[/eluser]
Use a model Code: class url_model extends Model{ and use this model in your controller Code: function submit()
[eluser]phantom-a[/eluser]
eh just a thought is there security risks with fopen? I know "r" on it means readonly, but still What if someone submitted http://example.com/trojan.exe would my server download a virus? |
Welcome Guest, Not a member yet? Register Sign In |