- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 37
- Posts with Upvotes
- 32
- Upvoting Members
- 25
- Downvotes Received
- 10
- Posts with Downvotes
- 9
- Downvoting Members
- 10
- Interests
- ---
- PC Specs
- ---
Re: If you would like to show the stored data with the enters that were made you need to do the following: Assuming that there are atleast 2 columns in the table called "creator" and "message": [code] <?php $q = "SELECT * FROM messagetable"; $r = mysql_query($q); while ($row = mysql_fetch_array($r)) … | |
Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for C! It uses a words file, on the bottom of this post you will see a small example of a few words. You can … | |
Re: I'd suggest using a database (MySQL in the below example) that has keys in it. The keys will be generated by a script, that you will execute one time. Sha1() is a encryption function, that returns a combination of numbers and letters, howmanny times you want to encrypt the key … | |
Re: Actually it doesn't really matter wether you include HTML or you just write it manually in the script. But be aware that when you either write or include things in the script such as databaseconfig or variableconfig. If due to a error, the server doesn't process the php scripts, they … | |
Re: It depends on what and howmuch columns you have in your table. For example, ExampleTable exists out of 5 columns: user CHAR(255), <- PRIMARY KEY firstname CHAR(255), lastname CHAR(255), telephone INT(20) and zip INT(7) Then if you execute the following query: [code] <?php // // Creating query and executing it … | |
Re: So you have a page that has a form, a second page that redirects to third, and a third page that handles the data? Why don't you just implement the third page into the second? Or just change the action="" attribute in the form to the third page? I don't … | |
Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for Java! It uses a words file, on the bottom of this post you will see a small example of a few words. The source … | |
Re: If a color needs to be transparant, you have two options: - Use an RGBA definition, e.g. `background-color: rgba(255,0,0,0.5);` , see http://www.w3schools.com/cssref/css_colors_legal.asp (but this is only supported on the newer versions of browsers) - Use the opacity (Netscape-based browsers) and filter (IE-based browsers) property ~G | |
Re: There is no such thing as AJAX for Java programmers... Perhaps you ment AJAX for JavaSCRIPT programmers??? Use Google ([url]http://www.google.nl/search?q=ajax+tutorials[/url]), as that is why it was invented: [url]http://www.w3schools.com/Ajax/Default.Asp[/url] ~G | |
Hello everyone, I stumbled upon a video about the monty hall problem, which I found very well explained, and a lot of comments below the video that were against the conclusion that it **is better to switch**. To clarify, I wrote this small program that simulates the game and allows … | |
Re: What do you mean by 'A black color around image'? Send us a screenshot of how it looks like in Firefox/Chrome and how it looks in IE | |
Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for JavaScript! It uses a words file, on the bottom of this post you will see a small example of a few words. The source … | |
Re: I don't know much about JSON format, but the replace method only works once, and you need to repeat it in order to replace all (google it). Example: <script type="text/javascript"> var str="Visit Microsoft! Microsoft"; document.write(str.replace("Microsoft","W3Schools")); </script> Returns: Visit W3Schools! Microsoft So only the first one is replaced (curtisy of w3schools, … | |
Re: You can do the following: [CODE] <script type="text/javascript"> function setHeight(id, newHeight) { document.getElementById(id).style.height = newHeight; return true; } </script> [/CODE] ~G | |
Re: Hi tstory28, After a quick look through your code, I would like to suggest a few things: - Put a new if statement around line 6 to 61, in which you check whether the email and password form variable are set (if (isset($_POST['email) && .....) and delete the if statement … | |
Re: So you have an image, a link that surrounds it and you want to record whether a visitor clicks on it? The easiest way is to make a link to a PHP page, e.g. referer.php. This page would take a link as argument and then increment the amount of clicks … | |
Hi, I've been trying to learn what pointers are and how they function, and I now finally understand most of it. However, I don't understand the assignment of strings to a char *, and what the values they have mean. I wrote a small program to learn: [CODE]#include <stdio.h> #include … | |
Hi everyone, I'm currently working on a cross-platform project to copy data from the computer onto a USB drive quickly. [B]Main problem: EOF in the middle of the file[/B] It's going good so far, but I stumbled across a problem in my copy_file function: [CODE]int copy_file(char *source_path, char *destination_path) { … | |
Re: You have it figured out pretty good by yourself, but to help you in the right direction, think of something like this: [CODE]$filename = "D:/some/folder/example.txt"; $text = "<a href='delete.php?file=".$file."'>Delete ".$file."</a>";[/CODE] And apply that to your own script (thus making a new page called 'delete.php' that retrieves the filename from the … | |
| Re: Hi! A few things you might consider: >> First debug your code and find the source of your problem, then post the [B]small[/B] piece of code that is flawed so that we do not have to spit through all your code (which I, for one, am not going to) >> … |
Re: It means that either the column 'product_code' or the table 'products' does not exist, duh ;) ~G | |
Re: 1. You put each mile in an array and each name 2. You sort the miles-array: [url]http://php.net/manual/en/function.sort.php[/url] or an equivalent function (you can always write your own -> good for learning) 3. You run through the array echo'ing each element. ~G | |
Re: Your code isn't comparing correctly. You want to see whether text needs to be shown using the 'if' condition, but you are comparing a date? You are also using the assign operator '=' instead of the comparing operator '==': Line 4-10 should be: [CODE]if ($showtxt == false) { ... ... … | |
Re: You could also just extend the members table and add a new column named 'permission' that is an integer. The integer corresponds with the level of authentication: 0 :: Member 1 :: Admin 2 :: Superadmin 3 :: President 4 :: Superman Something like that. And in the code you … | |
Re: Your query is a total mess. Using sprintf() is handy in various languages, but as PHP is very flexible with strings, it is completely useless in SQL in my opinion. And if you are going to use it, use it correctly, consult the PHP manual (php.net). Make it something more … | |
Re: Although I understand that this program enables the owner of the USB drive to check where, when and by who it is being used, this is only possible when the USB drive is allowed access to the internet via the computer it has been connected to. Imagine that a professional … | |
Re: Script looks fine. If I have difficulties when I put a script online it is mostly because of these two reasons: >> The database is not the same as the local one (this is the most probable cause in your case) >> I forgot to upload another essential file >> … | |
Re: The errors you describe are all caused because you messed up the ; and quotes. I spotted one when I was looking through it: Line 195 >> The query must be encapsed in quotes, e.g. [ICODE]$query = "SELECT * FROM my_table WHERE a_column='".$search_string."'";[/ICODE] So when your code stops giving errors … | |
Re: [URL="http://lmgtfy.com/?q=php+date"]The answer is just a google away![/URL] | |
| Re: [B]Adding comment part[/B] 1. Database Alright, let's review: you have a table with four columns: comment_id, page-id, comment_content, timestamp So your database is set up and you can start writing code. 2. HTML form You have made an initial form, but does it cover the two columns it needs to … |