Chatrapati
-
Posts
16 -
Joined
-
Last visited
Posts posted by Chatrapati
-
-
No, if a user. enters only spaces in name textbox.
it should show "text box is blank"
-
HOW TO DO THIS
IF A USER ENTER'S SPACE'S " "
IN NAME textbox, it should show , the text box is blank
what function should we use here?
-
THANK YOU
@Jcbones @gristoi
-
@gristoi How to do that
@Jcbones its not wrking
-
<?php
include "config.php";
$id=$_POST['id'];
$name=htmlspecialchars(addslashes($_POST['name']));
$sms=htmlspecialchars(addslashes($_POST['sms']));
$time=date("d-m-y");
if(isset($_POST['submitbutton']))
{
if(empty($name))
{
echo "Kindly enter your name<br/>";
}
if(empty($sms))
{
echo "May be you forgot to Add YOUR SMS <br/>";
}
$count=strlen($name);
if($count < 2)
{
echo "Your name must contain atleast Two characters<br/>";
}
if($count > 12)
{
echo "Your name Must contain less than Twelve characters<br/>";
}
$countsms=strlen($sms);
if($countsms < 20)
{
echo "Your Sms Must contain atleast Twenty characters<br/>";
}
if($countsms > 5000)
{
echo "Your Sms Must contain below Five Thousand Characters<br/>";
}
else
{
$sql="INSERT INTO form1(id,name,sms,time) VALUES('$id','$name','$sms','$time')";
$result=mysql_query($sql) or
die(mysql_error());
}
if ($result)
{
echo "SMS added successfully";
}
else
{
echo "could'nt add your SMS";
}
}
else
{
header("Location:form1.php");
}
?>
what's the error here,
if a user enter's incorrect details, it should not be inserted into the database,
it should show error,
but in this code, if statements are not working.
even if user enters incorrect details, it's inserted into database,
pls specify the error here,
and take a look at
http://wapfull.comoj.com/form2.php
yu'll know the Error's ! !
-
How to use,it. gv an example please
-
Why did yu write $html there?
-
if we add .smile. it should be converted into image lyyk this >>
-
How to add similey to php page,
eg: if we add - it should show similiey[image]
-
i need to get only some details from table, eg: ip, useragent, email,website, in profile.php
if we visit the profile of particular user, then it should show only his details
how to do this?
-
How to show the user's info in profile.php
only some info
eg:- email,mobilenumber
how can i do this?
AM not using sessions
its unregistered members profile in guestbook?
-
THIS IS MY CODE:
BUT ONLY FILE NAME IS STORED IN DATABASE !
NOT PATH
// can any correct it?
<?php
$path="upload/".$_FILES['uname']['name'];
if(copy($_FILES['uname']['tmp_name'], $path))
{
$id=$_POST['id'];
$a=$_FILES['uname']['name'];
$sql="INSERT INTO image(id,uname) VALUES ('$id','$a')";
$result=mysql_query($sql);
}
else
{
echo "error";
}
$sql1="SELECT * FROM image";
$result1=mysql_query($sql1);
while($r=mysql_fetch_array($result1))
{
echo $r['id'];
$pic=$r['uname'];
echo "<img src=http://wapfull.site90.net/upload/.$pic>";
}
?>
-
Can yu gv that code to insert file path into database @PaulRyan
-
But it only shows when the user uploads,
not in index page,
how to include using database.
-
PHP:
how can i link the files stored in directory
to the index.php
eg: if a user upload's a file it should also be linked in index.php as
'RECENT UPLOADS'
i tried this
$path="/uploadedfiles/.$HTTP_POST_FILES['file']['name'];
<img src=\"$path\" >
but it only show's the file when it is uploaded.
can any help me?
how To Count the total rows in 10 tables,
in PHP Coding Help
Posted
how to COUNT the total rows in 10 tables,
example :friendshipsms[500]
how to count the rows in 10 tables?
i tried this but did'nt work?
$sql="SELECT COUNT(*) FROM table1,table2,table3,table4,table5";
$result=mysql_query($sql);
$numrows=mysql_fetch_row($result);
echo $numrows[0];