Hey Guys

I have just started to learn PHP and have been using a book called "PHP For Absolute Beginners" now i have found a fair few mistakes in the book which i have corrected myself but i have come across an issue which is probably a simple fix by a PHP expert

The project i am developingh is a blog and i am at a point where i need to confirm a deletion of a post and i am trying to view a form with in a PHP file and when i loadt he page the form does not want to appear, here is the code maybe someone could help me out.

function confirmDelete($db, $url)
{
	$e = retrieveEntries($db, '', $url);
	
return <<<FORM

<form method="post" action="/test/admin.php"  enctype="multipart/form-data">
<fieldset>
<legend>Are you sure?</legend>
<p>Are you sure you want to delete entry "$e[title]"?</p>
<input type="submit" name="submit" value="Yes" />
<input type="submit" name="submit" value="No" />
<input type="hidden" name="action" value="delete" />
<input type="hidden" name="url" value="$url" />
</fieldset>
</form>

FORM;

}

You can see what i have done so far at http://www.urbanexploration.ie/test/ and try to delete a comment and you will see what i mean, Thanks guys

Shane

Recommended Answers

All 2 Replies

Hi Shane,

Possibly stating the obvious, but it seems that you're only returning the form, you're not echoing or printing the form. Do you do this somewhere else when the confirmDelete function returns?

R.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.