Jump to content

users


etsted

Recommended Posts

So, what do you have so far? Do you have it so people can at least upload the files and "watch" them?

Link to comment
Share on other sites

ok, so what do you have then? What have you tried? What are you stuck on? I'm not exactly sure what you need help with.

Edited by thescientist
Link to comment
Share on other sites

Well, how do you think it should work? What do you think a good UI experience is for the user? Maybe a list of the files with checkboxes next to them?The checked files then get submitted and the files deleted from the server?

 

Ultimately you're just going to be calling unlink at the end of the day, getting the files to be deleted is all based on your application. How are the files mapped to a user? Is there an uploads table with a record for every file, with a foreign key to a user ID? Will you delete the records if you delete a file?

 

So, if all you needed was the know about unlink, then you should be set. Otherwise, provide more information and code with specific issues you are having with the implementation of what you're trying. It's not really productive to be playing 20 questions with you.

Edited by thescientist
Link to comment
Share on other sites

if(isset($username)){$query = mysqli_query($con, "SELECT * FROM videos WHERE user='$username'") or die(mysqli_error());while($row = mysqli_fetch_array($query)){$title = $row['title'];$url = $row['url'];$description = $row['description'];$description = nl2br($description);echo "<h2>".$title."</h2><br />";echo "<div style='margin-left:30%;'><embed src='$url' height='250' width='250'></div><br />";echo "<strong style='font-size:1.5em;'>Description:</strong> <br />".$description;}}else{echo "<p>You must be logged in to view this page.</p>";}this is my code, but i dont know how to make a checkbox next to each of the picture, and have a button so they can choose whichone to delete

Link to comment
Share on other sites

you should probably look at the HTML tutorials to see how you can make a form and submit it via PHP. It should also cover how to create an input checkbox. The value can be the path to your file. Then on the server side you loop through all the paths and unlink them.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...