Hello friends I have a problem and I need it to be solved quickly. So please help me. I am supposed to make a site error free.The site is built using PHP/MYsql.
Here is the problem
If any error is occurred in any page. Then the browser should automatically be redirected to the home page of the site.
Note: the errorrs can be php errors or the mysql errors.
User Profile
Collapse
-
Redirecting the page if any errors occur
-
Try the following code:
I think you have error while inserting the date
do you have separate field for date and time?
Code:<form action="" method="post"> <input type="hidden" name="date" value="<cfoutput>#DateFormat(Now(), "MM/DD/YY")#</cfoutput>"> <input type="hidden" name="time" value="<cfoutput>#TimeFormat(Now(),"hh:mm
Last edited by acoder; Apr 2 '12, 11:08 AM. -
Please see the following example. Hope it will help you
Code:<body> <form action="checkbox.php" method="post"> <input type="checkbox" name="checkbox" value="a"> <input type="checkbox" name="checkbox" value="b"> <input type="checkbox" name="checkbox" value="c">
Leave a comment:
-
Hello I have send you some steps for the setup:
Go to coldfusion administrator
Click on data sources menu
On the top You will see Add new datasource
Type your Data source name
Driver Mysql
Click add
Then
on the form
datasource name:datasource name
Database:Databa se name
Server: eg "192.168.0. 41"
User name:
Password:
then
Submit...Leave a comment:
-
showing network of friends
Hi
I am making a site which is specially for making friends(php/mysql).
I got a problem and the problem is:
if a new friend is added by me, I want to count the people under his network (i.e. his friends)
I am stuck here. I have no idea on how to design the database for it.
so any help would be great,
thanks -
-
I think you have copied the code for each files
for eg: $tmpName is used for first file and for other files you have used the same
$tmpName
I mean There should be $tmpName1 in place of bold parts and similartly to to tmpName2,3,4,5, 6:
$fileName1 = $_FILES['audiofile1']['name'];
$tmpName1 = $_FILES['audiofile1']['tmp_name'];
$fileSize1 = $_FILES['audiofile1']['size'];
$fileType1 = $_FILES['audiofile1']['type'];...Leave a comment:
-
Data type:
datetime (if you want date and time both)
time (if you want time only)
time is in the format:
HH:MM:SS
datetime is in th format:
dd:mm:yyyy HH:MM:SS
Insert statement:
Now is not used in mysql, curtime() or curdate() is used
INSERT INTO Yourtable VALUES('curdate ().curtime()')
which programming language are you using at front...Leave a comment:
-
Soln
May be you should try This:
Update Tablename set A=(SELECT CONCAT('value of column A', 'value of column B')) where condition...;Leave a comment:
-
-
Answer
Try this code in your line 17
<br>I think it is because you did not concat:
print "Your first name is". $_POST["FirstName"]."<BR>\n";
If any other error occurred please write meLeave a comment:
-
bishwadeep: Read the Posting Guidelines at the top of this forum before you show any code. Especially the part about enclosing code within code, php or html tags!!
Ronald :cool:
<?
if ($_SESSION[sex]=="M" && $_SESSION[name]=="ara")
{
echo "<tr><td width=150 valign=top>Welc ome Mr".$_SESSION[name]." " .$_SESSION[lname]."<img...Leave a comment:
No activity results to display
Show More
Leave a comment: