Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-14-2008, 02:35 AM
Sephy's Avatar   
Sephy Sephy is offline
Newbie
 
Join Date: May 2008
Posts: 6
Rep Power: 0
Sephy is on a distinguished road
Exclamation Documents number check and correction if possible.

Hey folks.

So here is my problem. I need to create php script where will be checked documents nr.

For example user x requesting document nr 235, but for real he need 233. I need give out message like this: document nr 235 not found and make "suggestion" to look at 233.

I hear it kinda can be done vs hamming code, but its can correct only 1 number mistake for example 235 to 234 . Maybe there is some other method to use at this point?!

ty for any response
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 05-14-2008, 07:21 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Age: 26
Posts: 5,942
Last Blog:
Performance or Maintai...
Rep Power: 20
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: Documents number check and correction if possible.

My first question: How do you know (as a human) that the user needs nr 233? Walk me through the steps.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Don't hesitate to ask any questions that you have! Check out our ASCII Calculator!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-14-2008, 08:38 AM
Sephy's Avatar   
Sephy Sephy is offline
Newbie
 
Join Date: May 2008
Posts: 6
Rep Power: 0
Sephy is on a distinguished road
Default Re: Documents number check and correction if possible.

Well i got web page where user stores some documents: for example user stores on my web page documents vs number 200, 220, 233.

When he asks some document he can forgot or misspell(for example number can be much longer like 2345653 or sumthing) documents number. So i will give him closes number who can be hes wanted
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-14-2008, 10:56 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,047
Last Blog:
NaNoWriMo Summary
Rep Power: 24
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default Re: Documents number check and correction if possible.

Is there a reason why user can't be offered a drop-down to select the document from?
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-14-2008, 03:53 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,731
Last Blog:
Passwords
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default Re: Documents number check and correction if possible.

Quote:
Originally Posted by Sephy View Post
Well i got web page where user stores some documents: for example user stores on my web page documents vs number 200, 220, 233.

When he asks some document he can forgot or misspell(for example number can be much longer like 2345653 or sumthing) documents number. So i will give him closes number who can be hes wanted
How does he "ask" for the document? By keyword's inside the document or the number? And if you can explicitly define "close," I can try to create a regular expression. Does close mean +/-5% in the last document number? +/- 5% in all numbers?
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 05-15-2008, 03:42 AM
Sephy's Avatar   
Sephy Sephy is offline
Newbie
 
Join Date: May 2008
Posts: 6
Rep Power: 0
Sephy is on a distinguished road
Default Re: Documents number check and correction if possible.

I got better details for my tast

So here is my REAL task. I need some algorithm for my documents code. Something similar to algorithm used in credit cards(Luhn algorithm - Wikipedia, the free encyclopedia). I could use this one but i need something so i can use error correction too as i mention before. For correction i will need store some check code for each user. I need this because i want my system could work off-line(for example credit cards are valid when formula for calculation gives out 0).

example: user gives 123456789(his real number is 123456788). I check it vs my algorithm correct and give out: correct is 123456788 and there where mistake in 9 position.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-16-2008, 01:42 AM
Sephy's Avatar   
Sephy Sephy is offline
Newbie
 
Join Date: May 2008
Posts: 6
Rep Power: 0
Sephy is on a distinguished road
Default Re: Documents number check and correction if possible.

bump?!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-18-2008, 10:12 AM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 5,263
Last Blog:
Web slideshow in JavaS...
Rep Power: 45
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: Documents number check and correction if possible.

Yes, but how do you know what the correct number is? Why couldn't it be 123456787?
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."
Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-21-2008, 02:09 AM
Sephy's Avatar   
Sephy Sephy is offline
Newbie
 
Join Date: May 2008
Posts: 6
Rep Power: 0
Sephy is on a distinguished road
Default Re: Documents number check and correction if possible.

I know which is right because my ALGORITHM.

Example: if in my big number(123456788) symbols sum end like this 123, then that number is correct.(warning this example is wrong )

And my problem i need to find any algorithm which can be checked like this. Of coarse i dont 123 at end but i need anything to know my number according to my algorithm is right or not
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 01:11 AM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
LogicKills ........ 20.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads