Search the Community

Showing results for tags 'delete'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 6 results

  1. Hi all, 1. I want to delete selected(checkbox) items from database(MySQL). Here I am not getting any error, but I couldn't do the delete function.2. Wants to play videos in website. Here videos storing into folder and also into database, but cannot playin website. I tried in many ways, but I couldn't. So, please help to make above mentioned functions workable. dashboard.php<form method="post" enctype="multipart/form-data"><input type="submit" name="delete" class="btn btn-primary" onclick="myFunction(id)" style="font-size: 15px; margin-left: 3em;" value="Delete" /></form><div><?php$query = mysqli_query($database, "SELECT * FROM video");while($row = mysqli_fetch_assoc($query)){$id = $row['id'];$name = $row['name'];$url = "../uploads";// $url = $row['url'];$fileextensionvalue= $row['fileextension'];echo "<span class='col-md-6'><div class='row'><div class='col-md-1'><label class='checkbox'><input style='margin-right:1em;' name='checkbox[<?php echo $id; ?>]' type='checkbox' id='checkbox[]' data-toggle='checkbox' /></label></div><div class='col-md-1'><a href='#' style='color:red;font-size:18px;'>$id</a></div><div class='col-md-10'><a href='#' style='color:red;font-size:18px;'>$name</a></div></div><center style='padding:25px;'><video width='320' preload='auto' controls><source src='$url' type='video/$fileextensionvalue;codecs='avc1.42E01E, mp4a.40.2, H.264, aac, FLAC, Opus, VP9, VP8, Vorbis''/></video></center></span>";}?></div><script type="text/javascript">function myFunction(id){var r=confirm("Are you sure to delete selected video/s ?");if(r==true){window.location.assign("deleteVideo.php?id=" + id);}}</script>deleteVideo.php<?phpinclude '../database/database.php';$sql = mysqli_query($database, "SELECT * FROM video WHERE id='$id'");if(empty($_POST['delete'])){Print '<script>alert("Please choose file/s to delete.");</script>';Print '<script>window.location.assign("dashboard.php");</script>';}else if(!empty($_POST['delete'])){foreach($_POST['checkbox'] as $id => $val){if($val=='checked'){$query=mysqli_query("DELETE FROM video WHERE id = '".$id."'");$result= mysqli_query($database, $query) or die("Invalid query");}}}?>
  2. I'm trying to erase completely a cookie that is set if a particular URL parameter is present.I've tried: function delete_cookie( name ) {document.cookie = name + '=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';} And it sets the cookie value to null but the cookie itself or at least the name of the cookie stays in the browser so that when the same URL is opened again, it will not update the cookie value from null to XXX nor is a second cookie with the URL value created.For the new cookie to be setup again I have to right-click on the cookie name (in Chrome) and choose delete. This way the cookie name and its value null are truly erased otherwise it stays with null value.How can I completely erase the cookie file and not just set it to null with javascript?I should mention that I also have the following function to grab the cookie from the URL parameter and to keep it from the first page until the final page (where it should be deleted after the cookie value is added as the value of an external URL parameter to an external within the final page). The second page will turn the original link into a session where the URL parameter is no longer visible.The link would be: http://xxxx.test.yyyy/index.html?myparameter[zzzzzz]=ddddd Here is the code for it:function URLparam(name) {return unescape((RegExp(name + '(?:[d+])?=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]);}$(document).ready(function () {if (URLparam("MyParameter") !== null && !get_cookie ("MyCookie")) {set_cookie ("MyCookie", URLparam("MyParameter"));} Any ideas?
  3. how can i give users the ability to delete files they have uploaded?
  4. How do you delete you w3schools account I don't want it anymore and I hate have anything connected to me that I do t want, if a webmaster could delete it that would be great
  5. Hello internet I am pulling out my hair trying to figure this one out. Below is the only code I have in the php file. What I am trying to do is delete the only line of data in the database table and replace it with a new line of data. The data will delete but it will not do the insert function to put the new data in. I started out trying an UPDATE function but that did not work either. Separately each set of <?php ?> code works if I put them in separate files but together they do not work. Why? How can I achieve the desired effect? Please help. <?php$con = mysql_connect("xxx","xxx","xxx");mysql_select_db("xxx", $con);mysql_query("DELETE FROM ViewIt WHERE misc='1'");mysql_close($con)?> <?php$con = mysql_connect("xxx","xxx","xxx");mysql_select_db("xxx", $con);$sql="INSERT INTO ViewIt (misc, CC)VALUES ('1', '2')";mysql_close($con)?>
  6. Hello, New at this DELETE thing. I wish to write a DELETE query that will remove records from the 'REPAIRS" table. The conditions that must be met is that the "active" field = false in the "REPAIRS" table and that the "tradeID" field in the "REPAIRTRADE" table = cet. I'm confused about the statement needed and the syntax. Any help is truly appreciated.