atticus Posted November 6, 2007 Share Posted November 6, 2007 I am having problems with this script. I keep getting an error for the following line: elseif(isse($_GET['id'])) This is an edit script for an admin panel. I call it with: echo "<center><a href=\"edit.php?id=$row[id]\">Edit</a></center>"; here is more of the script: mysql_connect($db_host, $db_user, $db_pwd); mysql_select_db($db_name); if(isset($_POST['submit'])) { // Set global variables to easier names // and prevent sql injection and apostrophe to break the db. $title = mysql_escape_string($_POST['title']); $description = mysql_escape_string($_POST['description']); $buy = mysql_escape_string($_POST['buy']); $result = mysql_query("UPDATE news SET title='$title', description='$description', buy='$buy' WHERE id='$id' "); echo "<b>Thank you! Album UPDATED Successfully!"; echo "<meta http-equiv=Refresh content=4;url=index.php>"; } elseif(isse($_GET['id'])) { $result = mysql_query("SELECT * FROM upload2 WHERE id='$_GET[id]' "); while($myrow = mysql_fetch_assoc($result)) { $title = $myrow["title"]; $description = $myrow["description"]; $buy = $myrow["buy"]; ?> <br> <h3>::Edit Album</h3> <form method="post" action="<?php echo $PHP_SELF ?>"> <input type="hidden" name="newsid" value="<? echo $myrow['id']?>"> Title: <input name="title" size="40" maxlength="255" value="<? echo $title; ?>"> <br> Description: <textarea name="description" rows="7" cols="30"><? echo $description; ?></textarea> <br> Buy Link: <input name="buy" size="40" maxlength="255" value="<? echo $buy; ?>"> <br> <input type="submit" name="submit" value="Update"> </form> <? }//end of while loop }//end else I am getting the following error: Fatal error: Call to undefined function: isse() in.../.../.// Link to comment https://forums.phpfreaks.com/topic/76226-solved-call-to-undefined-function/ Share on other sites More sharing options...
atlanta Posted November 6, 2007 Share Posted November 6, 2007 very first line elseif(isse($_GET['id'])) needs to be elseif(isset($_GET['id'])) Link to comment https://forums.phpfreaks.com/topic/76226-solved-call-to-undefined-function/#findComment-385783 Share on other sites More sharing options...
trq Posted November 6, 2007 Share Posted November 6, 2007 This... elseif(isse($_GET['id'])) should be... elseif(isset($_GET['id'])) Link to comment https://forums.phpfreaks.com/topic/76226-solved-call-to-undefined-function/#findComment-385785 Share on other sites More sharing options...
atticus Posted November 6, 2007 Author Share Posted November 6, 2007 thanks! wow I stared at that for at least an hour and never noticed that Link to comment https://forums.phpfreaks.com/topic/76226-solved-call-to-undefined-function/#findComment-385792 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.