PHP Echo current filename without extension
Posted
by
Christian Nikkanen
on Stack Overflow
See other posts from Stack Overflow
or by Christian Nikkanen
Published on 2012-06-27T08:55:36Z
Indexed on
2012/06/27
9:16 UTC
Read the original article
Hit count: 164
php
I'm working on a very simple homemade CMS that simply uses a rich text editor and database to save the website contents and displays them to visitors. Heres the save.php that saves it:
<?php
include 'mysqlconnection.php';
mysql_query("UPDATE Content SET Content='$_POST[edit]' WHERE PageName='$_POST[PageName]'");
mysql_close($con);
?>
<?php
header('Location:http://xxx.com/Kayttoliittyma');
?>
It just saves it to the database. The pagename part is the part where I need to echo the filename without the extension. It would echo to the forms hidden field. But how?
© Stack Overflow or respective owner