Delete all from a table


Posted on 16th Feb 2014 07:03 pm by admin

I can not get the following code to work. If I run the sql statement in the db it will delete all the data but it will not work from the page. My connection string is fine I just can not get it to delete.

Code: <?php
include 'dbc.php'


mysql_query("delete from categories");

include 'redirect_category.php';
?>

No comments posted yet

Your Answer:

Login to answer
281 Like 33 Dislike
Previous forums Next forums
Other forums

Sending an SMS Message with ASP.NET
Often times it may be a requirement for your web application to send an SMS message. Such examples w

Intrastat Report Config in ECC 6.0 - goods Movement in EU countries
Colleagues, need ur help to understand the changes require in ECC 6 standard Report configuration se

insert PHP code into function
Hi,
I'm having problems when trying following:

I have:
Code: [Select]createBar("Do

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

why isn't this PHP code working ???
it's suppose to find a name on the database.

<?php

$s = $_POST["lname&

need help in dynamic select menu in php
hi i have created a dynamic select menu using php. i have a problem in that which is when the user s

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

Form Help
Here is the form:

Line number On/Off | Expand/Contract<? include("../include/sess

Is it possible to put an entire 500-page book in a database with PHP?
I am working on an intranet and I was wondering if its possible to code php with mysql to enter a fu

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash