Jump to content

simple input form giving error on insert.


egturnkey

Recommended Posts

Hello friends,

 

i just trying to me a simple cms where

 

index.php ( output )

add.php ( input ) page title/page content ( only one form )

 

when i do add page title/page content it gives error

 

atal error: Call to undefined function executeupdate() on line 6

 

here is the code ( it shows error here )

 

<?
$pagetitle=$_POST['pagetitle'];
$pagehtml=$_POST['pagehtml'];

$sql= "insert into pages set pagetitle='$pagetitle', pagehtml='$pagehtml'";
executeupdate($sql);

$msg= "New Page Added";
session_register('msg');
header("Location: addpage_frm.php ");
exit;
?>

 

and html code ( where config.inc.php ) connect the dp

 

<? include "../config.inc.php"; ?>
<table>
<form action="addpage.php" method="post">

<tr>
<td width="41%" height="36" align="right">Page Title</td>
<td width="59%"><input name="pagetitle" type="text" id="pagetitle"></td>
</tr>


<tr>
<td><div align="right">HTML Content</div></td>
<td><textarea name="pagehtml" rows="10" cols="30"></textarea></td>
</tr>



<tr>
<td width="41%"></td>
<td width="59%"><font color="#FFFFFF">
<input type="submit" name="Submit" value="Add Now">
</font></strong></font></td>
</tr>
</form>
</table>

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.