开发者

How to add data to a specific form element when it sends to mySQL

I'm creating a form where people can enter a code, for example H23J3PW, which corresponds to the end of a URL (say for example's sake youtube.com/watch?=H23J3PW)

When the database is submitted to the database I'd 开发者_Python百科like it to submit as the full URL ie "youtube.com/watch?=H23J3PW". Is there an easy way to do this?

The form code at the moment is:

<label>youtube.com/</label><input class="inputtext" type="text" name="youtube" value=""/>

Thanks in advance, I have searched around but haven't been able to find a solution.


$url = "youtube.com/watch?=".$_POST["youtube"];

Then just use $url in your query. As mentioned in the comment, $_POST could be $_GET if your form is submitted using a GET.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜