- 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
- ---
279 Posted Topics
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 … |
Re: Hi! I've read that you are just starting to learn PHP! Good :) It makes it easier to read your code if you have a few coding guidelines: >> Indent and comment your code, keeping statements and function calles seperated and clarified: [CODE] /* Doing something: */ doSomething(); /* Doing … | |
Hi, I've been working on a project that needs to list all the drives on a computer (it's kind of a file explorer, but without using the standard one provided by windows). I've searched and found the function [URL="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364972%28v=VS.85%29.aspx"]GetLogicalDrives()[/URL], which does exactly what I want. However, the return value is … | |
Hi, In the past few months I've been learning how to make applications for android by making small games just for the fun of it. I am stuck at the moment at the database object I created to manage the database, specifically the cursor: it won't close. A snippet of … | |
Re: Hi! About a year ago I was working on a [URL="http://www.deltacdev.com/products/modern-text-editor/index.html"]text editor[/URL] which included highlighting and such, but also offered the functionality to insert BB-code, just like at DaniWeb. The basic idea of this is to retrieve the position of selected text, retrieve the text, embody it with BB-code and … | |
Re: Hi erixxye, As this is your first post to the forums, you might want to keep some things in mind: - Place code between CODE tags - When you post, first describe your problem, then post code But anyway, onto your issue. You are mixing up PHP with JavaScript. The … | |
Hi, At the moment I am trying to open a log file with notepad.exe while the original process continues. As I am developing for Windows, fork() is not available for me. I googled alot and found a good reference to opening processes ([url]http://www.yolinux.com/TUTORIALS/ForkExecProcesses.html[/url]), however they all put the original process … | |
Hi, Recently I started working on a project (it's called 'fd') that needs to retrieve the current processes running. It is written in C using the WinAPI. I am running Windows XP SP3 and am using MinGW compiler with Code::Blocks. After much searching I found the PSAPI to provide the … | |
Re: Hi, Your code looks alright and should work. I think the problem lies in how you approach the page. When you look at your address bar when you are at request.html, is there a file path (e.g. C:\some\folder\request.html)? If so, you need to go to the file via the localhost: … | |
Re: Hi, In your code you defined that there are three variables needed to search for wine: - The color of the wine (e.g. red, white, or something like that), which I think is not really relevant but whatever - The country of origin, or more specifically a region - The … | |
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 PHP! 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 you want to shorten a URL, you either use only a .htaccess file or a combination of a .htaccess file and a PHP script. The basic principle: - Either admins or visitors (I don't know why you need to shorten URL's, perhaps as service or for usage on your … | |
Re: The below code will show the results just like you wanted: [code] <?php $query1 = "SELECT * FROM table1"; $result1 = mysql_query($query1); while ($row1 = mysql_fetch_array($result1)) { $qid = $row1['qid']; $qtitle = $row1['qtitle']; $query2 = "SELECT * FROM table2 WHERE qid='$qid'"; $result2 = mysql_query($query2); echo "<span style=\"text-decoration:underline; font-weight:bold;\">".$qtitle."</span><br />"; while … | |
Re: Try googling? [URL="http://www.google.com/search?&q=php+forum+open+source"]http://www.google.com/search?&q=php+forum+open+source[/URL] ~G | |
Re: Situation 1: The three men pay 30 pounds (Status: 30 pounds manager/porter, 0 pounds men) Situation 2: The porter/manager gives back 3 pounds and keeps 2 pounds (Status: 27 pounds manager/porter, 3 pounds men) So you can not add up 27 + 2, as the 2 pounds are already added … | |
Re: It really requires little work: [code] <script type="text/javascript"> function show(Id) { document.getElementById(Id).style.display="inline"; } </script> <span onmouseover="show('myImage')">Hover here to see the image!!!</span> <img src="someImage.jpg" id="myImage" border="0" style="display:none;" /> [/code] ~G | |
Re: A pocket PC is just like a regular computer, so you just need to do the following things (assuming you want to create dynamic sites using PHP & MySQL): - Install a Apache server, preferably with MySQL implemented: I would suggest XAMPP [url]http://www.apachefriends.org/en/xampp.html[/url] - Place the files into the xampp/htdocs/ … | |
Re: Well, you can: [CODE]<form action='' method='post' onsubmit='sendRequest(); return false;'>[/CODE] Keep in mind that you need to write the function yourself: retrieve all variables from the form and send them along with the AJAX request. Also you will have to notify the user that the form is submitted by hiding the … | |
Re: Well, you call the function calcHeight, however in your javascript code, the function is called calcheight , (notice the caption). Also your function just retrieves the height? I assume you have some code that sets the height of the iframe that you have not posted. ~G | |
Re: The book sounds like it has some good information on how to create web applications on the large-scale, but why is there a dog on the cover? Just wondering...;) |
The End.