492 Posted Topics

Member Avatar for baudday

More info is needed for an accurate response, speaking generically, you need a database, which will store a username, user ID and a password at minimum (A user ID isn't actually essential, but indexing a text field takes more time than indexing an integer field) Further than that, depends entirely …

Member Avatar for baudday
0
103
Member Avatar for neverneverland
Member Avatar for rEhSi_123

Are you using 'bbcode' or something similar to allow the users to add their messages? This would be one of the simplest ways to do it. My example here uses 'bbcode', the PHP for quotes is this: <?php function bbcode($Text) { // Check for Quotes $numquotes=substr_count($Text, "[quote="); for ($i = …

Member Avatar for rEhSi_123
0
218
Member Avatar for shasha821110

Are you asking how to check for only numbers in a string? if so is_numeric would do this: [code=php] if (is_numeric($password)) { echo "Password is numeric"; } else { echo "Password is not numeric"; } [/code] Or for alpha-numeric strings: [code=php] if (preg_match('/^[A-Za-z0-9]+$/', $password)) { // Do something } [/code]

Member Avatar for shasha821110
0
141
Member Avatar for samarudge

[QUOTE=mschroeder;813341]On the basis of an 8 character password, where each letter can be 1 of 62 possibilities (a-zA-Z0-9) that is 9.807971461541689e+55 possibilities.[/QUOTE] Or 62^8, or 218,340,105,584,896 possibilities... [QUOTE=samarudge;813558]i was able to get 650 attempts per second with my laptop alone and I have 5 exactly the same[/QUOTE] Ok, 5 of …

Member Avatar for samarudge
0
178
Member Avatar for PinoyDev

This may not be the best way to do it, but it should work [code=php] $thisYear = date('Y'); $nextYear = $thisYear + 1 $nowdate = $thisYear "-" $nextYear; [/code] I really need to go to sleep :D

Member Avatar for PinoyDev
0
159
Member Avatar for The Dude
Member Avatar for qinazaza

PHP would not be the best way to do this, not only due to the fact that page load times need to be taken into consideration (as already mentioned) but also because alot of the typing speed tests also take into account accuracy of the words typed. The code by …

Member Avatar for Will Gresham
0
995
Member Avatar for Madbuda

Served with a side of fried bread and beans that could be the tastiest (and possibly unhealthiest) breakfast ever:$ Probably not good on a daily basis, but all that grease should clear out your insides in a matter of hours :P

Member Avatar for jbennet
0
414
Member Avatar for shasha821110

Ideas/Suggestions: 1. Read up on XML 2. Read up on PHP (especially Multidimensional and associative Arrays - they will help no end on this sort of project) 3. Look at other peoples (open source) work for ideas 4. Design 5. Find flaws in design 6. Start coding 7. Ask Daniweb …

Member Avatar for shasha821110
0
635
Member Avatar for Will Gresham

Wasn't sure what to put as the title, but what is happening is this: I have div elements on a HTML page, when they click on the div it is replaced with a textarea containing the div contents in order to edit this (eventually there will be a form/submission button …

Member Avatar for xyzweb
0
336
Member Avatar for Ancient Dragon

:) It'll be a long time before this happens, they'll find some story the credit crunch to further depress people if nothing else :( Good find (even if it is fake :D)

Member Avatar for Will Gresham
0
28
Member Avatar for TheNational22

The lines you want to change are [icode]opendir(".")[/icode], this tells it to look in the current directory (where the script is located) May be worth adding a variable for directory at the top with the attributes and replacing the "." with it, there are 2 instances of opendir, so replace …

Member Avatar for TheNational22
0
190
Member Avatar for netviper

Post the lines around line 101, it may be one of the preceding lines causing this problem.

Member Avatar for cwarn23
0
167
Member Avatar for gangsta gama

I believe [code=php] // if your email succesfully if($sentmail){ echo "Your Confirmation link Has Been Sent To Your Email Address."; } else { echo "Cannot send Confirmation link to your e-mail address"; } [/code] should come after [code=php]$sentmail=mail("$email",'Registration Conformation',"$message"); [/code]. At the moment, you are using the mail() and then …

Member Avatar for FlashCreations
0
251
Member Avatar for Shanti C

If you decide to do that you will need to use Session/Cookie/POST data to tell the server what the product is, as you have have 2 or more products with the same name - this will cause issues if you just have the product name. Send the product id as …

Member Avatar for Shanti C
0
343
Member Avatar for progurammaar

We cannot see your PHP code, so there is no possible way we can tell you what is wrong, please post up some code so that we can look at it.

Member Avatar for progurammaar
0
125
Member Avatar for theimben

What error is returned? Add [icode]or die(mysql_error());[/icode] to the closing bracket of the query as so: [code=php] mysql_query("....")or die(mysql_error());[/code]

Member Avatar for theimben
0
130
Member Avatar for jeffc418

Something along the lines of: [code=php] $check_name = mysql_query("SELECT `username` FROM `users` WHERE `username` = '$requested_name'"); if (mysql_num_rows($check_name) != 0) { // Error, username taken } [/code] Do not rely on Javascript for validation, build your code assuming your users have Javascript disabled, you can always add things like alerts …

Member Avatar for jeffc418
0
99
Member Avatar for zerugaze

That and explode is supposed to execute faster due to the lack of regex, although for what the OP wants, I doubt it will make much difference which is used.

Member Avatar for jedi_ralf
0
146
Member Avatar for theimben

The first line you posted will run the query, so the if statement will always return false as the row is already deleted, change [code=php]$sql1 = mysql_query("DELETE FROM spider WHERE url='$addtolist'");[/code] to [code=php]$sql1 = "DELETE FROM spider WHERE url='$addtolist'";[/code]

Member Avatar for theimben
0
113
Member Avatar for rEhSi_123

!Unreal's suggestion is best, you haven't said [I]what[/I] you want in index.php, you haven't said [I]what[/I] the table structure is... You aren't giving us anything to work with. Once you have a file, post here asking questions if it doesn't work, but we aren't here to do your homework for …

Member Avatar for Will Gresham
0
90
Member Avatar for curtshane

Announcements are in the forums for a reason..... [url]http://www.daniweb.com/forums/announcement6-20.html[/url]

Member Avatar for vegaseat
0
55
Member Avatar for pecussionist

Whats with the lack of quotes on there? Try this: [code=php] $strSaveTD = "<input type=\"button\" id=\"btnSave\" value=\"Save\" onclick=\"checkform($iMode, $iLevel, 1)\">"; [/code] As long as you escape the quotes it will work, the above will print the code as you would expect it to be in HTML (without the backslashes)

Member Avatar for cwarn23
0
150
Member Avatar for theimben

Try [code=php] mysql_query("INSERT INTO `list` (`title`, `url`, `description`) VALUES ('$title', '$addtolist', '$description')"); mysql_query("DELETE FROM `spider` WHERE url='$addtolist'"); [/code]

Member Avatar for theimben
0
96
Member Avatar for PinoyDev

The code posted by ShawnCplus would show the image and scale it down to 32x32. Do you get the image path from the database? or are you storing the image itself in the database? I am not sure exactly what you are asking, but I see no reason why the …

Member Avatar for PinoyDev
0
94
Member Avatar for whitestream6

Your title tag should be within the head of the document ;) Rather than re-inventing the wheel, you may want to look at [www.smarty.net]Smarty[/url], it does everything you are looking for, you can get an array of data and have it auto output as a table - if you understand …

Member Avatar for Will Gresham
0
84
Member Avatar for hbk_star2006

Whats with the [code=php] session_start(); ?> <?php if[/code] You dont need the ?> and <?php there, it is likely that the line break after the ?> is causing the issue, remove the closing and opening tags altogether. Also, you will want to look at your query, never put POST values …

Member Avatar for hbk_star2006
-1
120
Member Avatar for jonojo

If you are having issues with installation, post on the phpBB boards directly, probably get a faster response.

Member Avatar for Andrieux
0
210
Member Avatar for oskido2010

The MySQL query would look something like this, also basic starting point: [code=php] // Basic query to find a relationship $result = mysql_query("SELECT `status` FROM `relationships` WHERE `friend1` = '$user_id' AND `friend2` = '$friend_user_id' OR `friend1` = '$friend_user_id' AND `friend2` = '$user_id'")or die("Cannot select relationship, error:".mysql_error()) if(mysql_num_rows($result) != 1) { …

Member Avatar for oskido2010
0
133
Member Avatar for The Dude
Member Avatar for ahihihi...
0
53
Member Avatar for rEhSi_123

Think of it as a duplicate table to the forums, its similar - just a few changes: Heres a very basic table: message_id: int(10), auto_increment, primary - Message ID message_from: int(10) - ID number of the user the message is from message_to: int(10) - ID of the user the message …

Member Avatar for rEhSi_123
0
119
Member Avatar for gangsta gama

Since this would probably be against Adsense Policies, I doubt you will get any help. [QUOTE=Adsense Policies]Encouraging clicks In order to ensure a good experience for users and advertisers, publishers may not request that users click the ads on their sites or rely on deceptive implementation methods to obtain clicks. …

Member Avatar for gangsta gama
0
146
Member Avatar for Narayan15

Looks like you are trying to use PHP as a client-side script, not possible. You will need to add Javascript or buttons to new pages to reload the questions as PHP is server-side and is compiled to HTML before being sent to the client.

Member Avatar for Narayan15
0
133
Member Avatar for suddenhit
Member Avatar for suddenhit
0
106
Member Avatar for sam1

Not sure exactly what you are asking, but in PHP redirection can be done as follows: [code=php] <?php header("Location:http://www.somesite.com"); ?> [/code] and Meta: [code] <meta http-equiv="refresh" content="5; url=http://www.somesite.com">[/code]this goes in the <head> tag

Member Avatar for death_oclock
0
196
Member Avatar for jprahst32

Have you tried sending to another email address? I assume you are using the standard mail() function. Also, check the host has RDNS correctly configured for the IP address(es) of the server.

Member Avatar for jprahst32
0
167
Member Avatar for masterOFwww

Make another column in the database and store a timestamp in it when the user logs in (much better than a formatted date anyway) and then work out this time yesterday [code=php]<?php // Find out the timestamp for yesterday $yesterday = time()-86400; if($timestamp_from_db >= $yesterday) { // User logged in …

Member Avatar for almostbob
0
139
Member Avatar for nawabsheriff

This will really depend on whether you can restrict what the user enters into the textarea. You need to decide where you will expect a new item (newline, comma-seperated, space seperated...) and then make sure the user follows the system, but people are known for not reading instructions. Anyway, the …

Member Avatar for Will Gresham
0
105
Member Avatar for bookworm619

First it looks like you just lifted the javascript function from the website you quoted. You have not defined a function called trailOn() or hidetrail(). There alot of scripts online you can download for free which will do what you are looking for, infact I have found a fair number …

Member Avatar for Will Gresham
0
111
Member Avatar for puk

As above, please use code tags and running the same query twice is pointless. A few tips: Do not trust your users, always check their input. Never use POST values directly in the database query, thats just asking for problems - look into mysql_real_escape_string() for starters. There is a handy …

Member Avatar for Andrieux
0
176
Member Avatar for PinoyDev

Seeing as you have the username already in a session [icode] $_SESSION['MM_Username'] = $loginUsername;[/icode], why not just use this in the query?

Member Avatar for PinoyDev
0
168
Member Avatar for designingamy

You should always check the data just before it is entered into the SQL query, especially with POST and REQUEST values, so it is not a bad idea to check this twice (even though you are using sessions). It may also be a good idea to restrict the characters in …

Member Avatar for Will Gresham
0
115
Member Avatar for giguere18

You can use regex in sql queries, although with what you are trying to do it may be simpler to keep this in PHP.. See this for regex in mysql: [url]http://dev.mysql.com/doc/refman/5.1/en/regexp.html[/url]

Member Avatar for diafol
0
84
Member Avatar for shasha821110

I use NuSphere PhpED, one of the best programs I have ever used. Also, shouldn't the title be 'editor' not 'software' :)

Member Avatar for almostbob
0
121
Member Avatar for Taosun

I really can't be bothered to read your code fully if you can't be bothered to use [code] tags. (It does have a 'watermark' in the post boxes which tell you about the code tags) But a quick glance shows this on your last lines: [code=php]?<? include "layout/header.php" ?>[/code] Whats …

Member Avatar for diafol
0
123
Member Avatar for nmcgoo108
Member Avatar for khr2003

Try using an array: [code=php] foreach( $raw as $key ){ $final[] = $key; } [/code] This will put each result into the array.

Member Avatar for khr2003
0
126
Member Avatar for mirainc

[QUOTE]When it goes to the transaction, the shopping cart has to be cleared so that when another user enters the website, the shopping cart will be empty for that user.[/QUOTE] This does not look like a good idea, if I am understanding you then it would mean that everyone on …

Member Avatar for buddylee17
0
120
Member Avatar for rajeesh_rsn

If you were using the full MD5 hash then there would be a small chance for repition, however since you are only using the first 6 characters, this chance is greater. You must the uniqe product ID be in the format you suggest? Would it not make more sense to …

Member Avatar for rajeesh_rsn
0
101

The End.