|
Have you tried
<?php echo date_format($date, 'd-m-Y H:i:s'); ?>
|
|
|
|
|
2nd arguement requires a unix timestamp. Take a look at date() and mktime() functions in the manual.
If your dat coming from the db is a datetime stamp you may want to use strtotime() to convert it into the unix timestamp needed for the 2nd date arg.
Chris J
www.redash.org
|
|
|
|
|
I am using an iframe with 100% table and td as well as iframe but the ifarame is still not going into full height..
here is my code:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-us">
<head>
<title>Jassim Rahma</title>
<?php include("tags.php"); ?>
<meta name="description" content="Where technology meets business intelligence." />
</head>
<body dir="ltr" lang="en-us">
<table width="100%" cellpadding="0" cellspacing="0" height="100%">
<tr><td colspan="3" style="border-bottom-color: #D3D3D3; border-bottom-style:solid;; border-bottom-width: thin"><?php include("header.php"); ?></td></tr>
<tr>
<td valign="top" style="padding: 10px" height="100%">
<iframe src="http://www.boutell.com/newfaq/creating/include.html" style="border:0px #FFFFFF none;" name="headline" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="100%" width="100%"></iframe>
</td>
</tr>
</table>
<?php include("Piwik.php"); ?>
</body>
</html>
|
|
|
|
|
does the include file Piwik.php have any output?
try hiding it and see if you issue persist.
Chris J
www.redash.org
|
|
|
|
|
This is not a PHP problem, it's a CSS style issue. Try setting the height of the and tags to 100% and 'absolutely' position the outer table (or better still, replace it with a div)
That should solve the problem...
Danny
|
|
|
|
|
I am trying to use include to place a web page from another webiste on my website using this code but I am just getting it blank! how can I fix this please..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-us">
<head>
<title>Jassim Rahma</title>
<meta name="description" content="Where technology meets business intelligence." />
</head>
<body dir="ltr" lang="en-us">
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td colspan="3" style="border-bottom-color: #D3D3D3; border-bottom-style:solid;; border-bottom-width: thin"></td></tr>
<tr>
<td valign="top" style="padding: 10px">
</td>
</tr>
</table>
</body>
</html>
|
|
|
|
|
This is how I do this within my site but have not tried the remote side of it.
include_once $_SERVER['DOCUMENT_ROOT'] . 'aweklin/classes/StringHelper.php';
|
|
|
|
|
You can't do a cross server include like that. PHP include directive only works with files on the same webserver. The way I see it you have two options to solve this:
* put the file on the same server and use normal include directives
* use the file_get_contents or an iframe to load the external resource
|
|
|
|
|
|
This is not including. in php including is far different thing you are trying to do. all you need to use is html tag iframe and in the src attribute use the address.
|
|
|
|
|
i would love to... but iframe doest support 100% height and 200% width.
so how can i fix it in iframe?
|
|
|
|
|
Hi,
can anyone help please.
I am getting this error:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/jassimrahma/JassimRahma.com/admin/get_login.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/jassimrahma/JassimRahma.com/admin/get_login.php:10) in /home/jassimrahma/JassimRahma.com/admin/get_login.php on line 20
here is my code:
<?php
session_start();
$username = $_POST['username'];
$password = $_POST['password'];
$dbC = mysql_connect('mysql.jassimrahma.com', 'jassimdb', 'mujtaba');
$sql = "SELECT * FROM website_admin WHERE website_admin_user_name = '$username' and website_admin_password = '$password'";
$result = mysql_query($sql, $dbC);
$count = mysql_num_rows($result);
if($count == 1)
{
$_SESSION['status'] = 'logged';
header("location:index.php");
}
else
{
header("location:login.php");
}
?>
|
|
|
|
|
The first warning is telling you that the value returned from mysql_query() , which you stored in $result is a boolean. This means that the query failed, because mysql_query returns FALSE when a SELECT query fails.
The second warning is telling you that it cannot output any headers, because it has already sent output to the browser - in this case, the first warning message.
You should check the return values from your database function calls. mysql_connect might have failed, or mysql_query could have failed for any number of reasons - use mysql_error[^] to find out what went wrong and fix it.
You should also sanitize all user input before building a query from it. Google for "sql injection" if you don't know what I'm talking about.
|
|
|
|
|
I got it... no database selected..
BUT...
now I have another problem..
everytime I enter the correct user id and password it's just going back to login.php with no error message.
I am 1000000% sure about the user id and password, infact I added another uder and having the same problem.
user ID : abc123
Password : abc123
|
|
|
|
|
Okay... I won't try to guess which page is doing what wrong, but I will give you this handy code snippet:
echo '<pre>' . print_r(get_defined_vars(), true) . '</pre>';
If you insert that into a page where you think things are going wrong, it will dump all the variables into the page. I would try putting it before your if statement that does the redirects first, and see if $count is what you expect it to be.
You should turn on all errors and warnings when you are developing too:
ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
|
|
|
|
|
Hi,
can anyone help on how to do this in htaccess please..
I want to make every:
www.mydomain.com/news.php?id=777
shows as
www.mydomain.com/777
where 777 is the primary key in my news table.
Thanks,
Jassim
|
|
|
|
|
I been looking around for a good tool to learn PHP and i stumble up on this http://be2f81j9hp809o6rpk2bhbxkd5.hop.clickbank.net/?tid=1 site. Please tell me what you think about it?
|
|
|
|
|
Hi Friends,
I am new to PHP and I want to know how to run a PHP program .Would like to know how to configure it and kindly help in suggesting what kind of software to be used to run it.I tried with WAMP Server but i was not able to run it. .Thanks in Advance.
|
|
|
|
|
Upon successful installation of WAMP, open a text editor and type
<html>
<head><title>My First PHP Website</title></head>
<body>
<?php phpinfo(); ?>
</body>
</html>
make sure that you save it in the www of your php installation folder: eg: C:\wamp\www
then laugth your web browser and typing http://localhost/filename.php or http://localhost:8080/filename.php as the case may be.
it should work this way.
welcome to the php world
happy programming
|
|
|
|
|
Thanks friend.I installed the wamp server and placed the following code in www folder .And started the server in the web browser typed the url http://localhost/filename.php[]
But i m getting this error message.
Not Found
The requested URL /filename.php was not found on this server.
Apache/1.3.12 Server at changeme.local.lan Port 80
I really want to learn php .Kindly help me
|
|
|
|
|
the file name I mean is the name you gave the file when you saved it. eg: index.php (the file name is index).
|
|
|
|
|
I saved with the same filename .Got to know the problem now but dont have the solution for the same.
The issue is that port 80 is being used by another process hence apachi is not installed i guess in wamp server .I dont know how to configure it to another port no .
|
|
|
|
|
You can verify if Apache was installed from windows services (scroll down and look for wampapache). If not, you can uninstall the wamp server and reinstall again, then ensure that WAMP installs Apache for you.
Hope this helps?
|
|
|
|
|
Even if port 80 is in use that should not stop the installation of WAMP. You won't be able to startup WAMP until you close the other program using port 80. Usually this is skype, as this reserves port 80 and 8080 for outgoing and incoming traffic.
You can try and locate the process by running
netstat -ob .
|
|
|
|
|
Thanks for all .Successfully executed my first php program. .I formatted my system and installed it and i m able to run the program now .
|
|
|
|