Jump to content

Adding extension to form field


swamp

Recommended Posts

Hi,

 

I've got a form - one of the fields is called pagename:

 

<input type="text" name="pagename">

 

This then gets added to a database:

 

$add = mysql_query("INSERT INTO db (
		content, 
		title,
		author,
		pagename,
		img,
		post_date) 
		VALUES (

 

How can I add .php to the end of the pagename field?

 

For example if I submitted mypage into the pagename field it would get added to the database as mypage.php ?

 

Help much appreciated,

 

Cheers

 

 

Link to comment
https://forums.phpfreaks.com/topic/120161-adding-extension-to-form-field/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.