Need help, Please help me!

Started on the old forum in April 2012 · view the original in the archive · old links redirect here

2 replies · 322 views · started 14 years ago · 1 min read

2 participants
WapAdda Junior · 25 posts #1

Im using a service. Dat service data save at myservice.txt file. Service field r 1.name 2.country 3.mobile no.

Now, how to stop same data submiting by user.

Or, how to show user name already exits! Go back & write another name.

something else Fellow · 2,296 posts #2
<?php
$filename = "myservice.txt";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
if(substr_count($contents,$_POST['name'])>0){
print "name already registered";
}else{
print "name doesnt exsist";
}
?>
WapAdda Junior · 25 posts #3

something else wrote:

<?php
$filename = "myservice.txt";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
if(substr_count($contents,$_POST['name'])>0){
print "name already registered";
}else{
print "name doesnt exsist";
}
?>

thank u sir, dis code really working..

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close