-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
The checkbox is right there in your posted code. Add the attribute to it. Simple.
-
From looking at a manual it would appear that you need to set the checked value of the checkbox element you define for this "toggle" button.
-
@Gizmola - careful. You're starting to sound like me! @Revolusio(?) - you do need to do some reading - of the tips you are being given and in a manual of some kind that helps you to learn PHP. I actually wanted to respond earlier today about that dangling statement in your loop that did ABSOLUTELY NOTHING but held off. Figured it wouldn't really help to comment on it or to even ask why. So - you need to learn if you want to do this stuff. It's takes some work but the amazing thing is once you start to understand what you are trying to do, it will that much easier to actually do it!
-
While using divs is the more modern way of doing tables, the old stand-by html table still works - when coded well. Your sample only shows one item being output on each row since you have commented out 2 of the td elements. This is what your html table really looks like: while ($row = mysqli_fetch_assoc($result)): { echo "<tr> <td style='text-align:center'>{$row['Game_Name']}</td> </tr>"; } Note how much easier it is to read when you don't switch in and out of php mode all the time.
-
If you have setup an html table I don't know how you can't be getting them to display across. Perhaps you can show us the table layout? Are you perhaps using too many <tr> tags?
-
How are you displaying it currently? How many fields do you have to display? Have you any CSS in use for your current display?
-
Thanks Barand. Learned how to download a file the quick way. As for the OP tho - it doesn't solve his question. And I don't have an answer for him.
-
Actually the way to write that is echo "<form action='deletestaff.php?GetId=$userid' method='POST'>"; Stop using the in and out of php mode style.
-
Is your array really $request1 or $request2, etc.??? Why the numbers? Why not simply $request [1][....] and $request[2][....] ?
-
Well - how ARE you doing the delete? A PHP script, no? So use a form with a submit button and not a <button> and call the script that does the delete.
-
I am completely unfamiliar with the syntax you are using.
-
On your submit button do this <input type='submit' name='btn' value='Submit' onclick='return confirmDelete()'> Then in your script section create this function: function confirmDelete() { if (!confirm('Are you sure you want to do this delete?')) return false; else return confirm('Are you REALLY sure?'); }
-
Add a call to the JS onclick event to your submit button. Point it to a JS function that asks the user to confirm, perhaps twice even.
-
A good thing to NOT do in php is mix upper and lowercases. This is not JS. Stick to lower case. I'm guessing that you do not have error checking turned on and that you mis-typed or misspelled your user id variable.
-
Not without seeing a contiguous set of code showing us what all is happening. Ps - It's "struggling".
-
I see nothing there to help me understand. What is this "download" attribute it mentions?
-
So - an anchor that points to a filename downloads that file? It doesnt' try and link to it? Something new to me!
-
Help displaying info from a users database table
ginerjm replied to Nematode128's topic in PHP Coding Help
Hmmm.... My copy of the PHP.net manual does not have that function in it. But in most cases one has to provide the results var and you are not, which is what the message is telling you. -
So when the user clicks that (unseen) button what happens? Do you execute another script? The same script? What? When one clicks on an anchor tag usually it takes you somewhere. Of course this anchor does look quite different to me. If IT is doing the download for you I"m out of my depth here.
-
You told us of your weakness. I simply told you that it was going to be difficult. I did look at the code a bit and aren't quite sure what you are describing. Looks like more date manipulation rather than a counter. And it has a lot of JQ in it which isn't part of this PHP forum's area of expertise.
-
Help displaying info from a users database table
ginerjm replied to Nematode128's topic in PHP Coding Help
Look at the line it points you to and then check your code on that line. -
Well if you are not a coder but you are being asked to do stuff like this you're going to have a heck of a time doing your job. Does your boss know that you don't have the tools for the job he/she has assigned you?
-
If all of this is happening in this script I don't understand why you are asking the question about doing a simple query. BTW - you don't need those colons on an if statement if you simply don't use an "endif". Just less typing that way
-
Doesn't look like a button. Looks like an anchor tag, sometimes called a 'link. Anyway - what about my question? And where is the download code? BTW - by download do you mean server to client or client to server? Looking further - it appears that you are trying to "go" to the filename. Is that possible?
-
Uh, where is this 'download button'? You want to execute a query when the user clicks on 'something'. Are you not wanting to go to the server to do this?