thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

Warning while adding new page #88

Closed BloodWolf89 closed 9 years ago

BloodWolf89 commented 9 years ago

Warning while adding new page. The page still gets added.. I think it is just due to the location of the result..

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\STREAMER\admin\functions\data.php on line 41

BloodWolf89 commented 9 years ago

You can see the same error by adding &id= to the new page link. Now that I think about it..

BloodWolf89 commented 9 years ago

When the page is added it sends the id as blank throwing the error maybe do an if(statement) for the echo in the form href?

<form role="form" action="index.php?page=pages&id=<?php echo $opened['id']; ?> " method="post">

Can we maybe make it echo the last id +1 if its a new page ELSE echo current page id?

BloodWolf89 commented 9 years ago

Here are my files.. Queries.php: http://pastebin.com/hEifNpTC pages.php: http://pastebin.com/hJZUYcZN data.php: http://pastebin.com/M44kTRFu