/    Sign up×
Community /Pin to ProfileBookmark

Edit Page not Working

hi,all i have been working on my script and my edit page page doesnt seem to work i change the name of the pcontent and it doesnt seem to work

[CODE]
<?php
if($_POST[‘update’])
{
$PName=trim($_POST[‘PName’]);
$PTitle=trim($_POST[‘PTitle’]);
$PDesc=trim($_POST[‘PDesc’]);
$PKey=trim($_POST[‘PKey’]);
$PContent=trim($_POST[‘Pcontent’]);
$PSTATUS=trim($_POST[‘PSTATUS’]);
if($PName)
{
$PNameErr=”Please Enter a Page Name”;
}
else if($PDesc)
{
$PDescErr=”Please Enter a Page Description”;
}
else if($PKey)
{
$PKeyError=”Please Enter some keywords for this Page”;
}
else if($Pcontent)
{
$PContentErr=”Please Enter in Some Page Content”;
}
else if($PSTATUS)
{
$PSTATUSErr=”Please Choose to publish or unpublish this page”;
}
else
{
$pQuery=”UPDATE pages SET PName=’$PName’,PTitle=’$PTitle’,PDesc=’$PDesc’,PKey=’$PKey’,Pcontent=’$Pcontent’,
PSTATUS=’$PSTATUS’ WHERE PID=$PID”;
$rs=$con->query($pQuery);
if(!$rs)
{
echo “Error:”.mysqli_error();
}
else
{
echo “Page Sucessfully Updated”;
}
}
/*$s2Query=”UPDATE sengine SET PName=’$PName’,PTitle=’$PTitle’,PDesc=’$PDesc’,PKey=’$PKey’,Pcontent=’$Pcontent’,
PSTATUS=’$PSTATUS’ WHERE PID=$PID”;
$rs=$con->query($s2Query);
if(!$rs)
{
echo “ERROR:”.mysqli_error();
}
else
{
echo “<br/>Search Engine System Updated Sucessfully”;*/
}?>
[/CODE]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@william232authorJul 29.2006 — this is what i get when i put in the debug code

[CODE]
Notice:undefined index:PName in c:document and settingsSchool workDesktopTestingserverhtdocsObscarionMasteradminincludeseditpage2.inc on line 14

Notice:undefined index:PTitle in c:document and settingsSchool workDesktopTestingserverhtdocsObscarionMasteradminincludeseditpage2.inc on line 15

Notice:undefined index:PDesc in c:document and settingsSchool workDesktopTestingserverhtdocsObscarionMasteradminincludeseditpage2.inc on line 16

Notice:undefined index:PKey in c:document and settingsSchool workDesktopTestingserverhtdocsObscarionMasteradminincludeseditpage2.inc on line 17

Notice:undefined index:PContent in c:document and settingsSchool workDesktopTestingserverhtdocsObscarionMasteradminincludeseditpage2.inc on line 18

Notice:undefined index:PSTATUS in c:document and settingsSchool workDesktopTestingserverhtdocsObscarionMasteradminincludeseditpage2.inc on line 19

Notice:undefined index:update in c:document and settingsSchool workDesktopTestingserverhtdocsObscarionMasteradminincludeseditpage2.inc on line 143


[/CODE]


And this is what i have on those lines

[CODE]
<?php
$PID=($_GET['PID']);
$PName=trim($_POST['PName']);
$PTitle=trim($_POST['PTitle']);
$PDesc=trim($_POST['PDesc']);
$PKey=trim($_POST['PKey']);
$PContent=trim($_POST['PContent']);
$PSTATUS=trim($_POST['PSTATUS']);
if($_GET['PID'])
{
[/CODE]
×

Success!

Help @william232 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...