|
Thank you friend .Can it be integrated with xamp server and should any environmental variables need to be given for the same.
|
|
|
|
|
|
Thank you friend
|
|
|
|
|
|
Hai Friends
good to see you all..
i am doing one webmail project using php..
for that i need to read mails from that particular email and show it in my inbox..
my question is how to read mails from Cpanel using PHP..
any help will be useful to me..
thank u in advance
|
|
|
|
|
Do you know where the email actually resides? Is this a linux system or a Windows system? I know for Linux, there are several open source webmail projects, my favorite is Roundcube. If you have your mind set on actually writing it yourself, (again, assuming a Linux server), you would need to be able to parse the mbox files where postfix (I'm assuming you are using postfix) stores email at (/var/spool/mail). I've never done that, but I know you'll need to make sure your web browser (apache?) has permissions to read those files...
Does that help?
|
|
|
|
|
Hello frndz.
i am going to develop own web mail system for one of my client.
for that i need ideas to implement.....
any one can tell me the procedure or ideas about how to implement..?
I'll explain the procedure.
the mails want to store in database and when the user logging in the mails want to display like g-mail.
outbox folder to have unsent messages.
drafts folder to have saved messages
sent items folder to have sent messages.
archives folder to have archived items..
ADMIN:
admin can create email id.....the admin only can create email id like c panel.
thank in advance,,,,
any help will be useful to me..
modified 13-Dec-11 5:18am.
|
|
|
|
|
I have an admin page which user MUST enter user id and password to get in. The login.php is working fine, it's accepting correct user id and password and rejecting incorrect user id or password but the admin index.pho is not working properly..! it's accepting direct navigation even and not redirecting to the login.php
could you please help..
here is my index.php
<?php
if (isset($_SESSION["status"]) && $_SESSION["status"] != true)
{
header('Location:login.php');
}
?>
and this is my login.php:
<?php
session_start();
error_reporting(E_ALL);
$username = $_POST['username'];
$password = $_POST['password'];
$conn = mysql_connect('mysql.jassimrahma.com', 'jassimxxx', 'xxxxxxx');
$sql = "SELECT * FROM website_admin WHERE website_admin_user_name = '$username' and website_admin_password = '$password'";
mysql_select_db("jassimrahma", $conn) or die(mysql_error());
$result = mysql_query($sql, $conn) or die(mysql_error());
$count = mysql_num_rows($result);
if($count == 1)
{
$db_field = mysql_fetch_assoc($result);
$_SESSION['status'] = true;
$_SESSION['full_name'] = $db_field['website_admin_full_name'];
header("location:index.php");
}
else
{
header("location:login.php");
}
?>
modified 12-Dec-11 4:35am.
|
|
|
|
|
Your index page is checking if the session variable status has been set, and then redirecting only if it has been set to false (or anything except true to be precise).
If that is the whole of your index.php file then the status will never be true, because you haven't called session_start() .
More importantly, $_SESSION["status"] will not be set even if you have been through the login page, so it won't even get to the $_SESSION["status"] != true condition.
If you had not successfully gone through the login page, status would not be set even if you had started the session.
|
|
|
|
|
More importantly, $_SESSION["status"] will not be set even if you have been through the login page, so it won't even get to the $_SESSION["status"] != true condition.
why?
so let me see if I understood..
I changed to this but still the same result:
<?php
session_start();
if (isset($_SESSION["status"]) && $_SESSION["status"] != true)
{
header('Location:login.php');
}
?>
|
|
|
|
|
You are setting the status to true if the user logs in successfully.
If the user does not log in, then $_SESSION['status'] is not being set to anything.
You should redirect to the login page whenever $_SESSION['status'] is not set - and unless you have a page somewhere else that sets it to anything other than true , you don't even need to check what its value is.
|
|
|
|
|
Hi guys;
I wish to store KeyValuePair collection as I do in C# or VB.NET. Is there a way to achieve this in PHP and how?
Thanks for your cordial supports.
|
|
|
|
|
You can do that using an array:
<?php
$dict = array('a' => 1, 'b' => 2, 'z' => 0);
$dict['c'] = 5;
$dict['a more complex value'] = array('X' => 'OK');
foreach($dict as $key => $value)
echo "$key : $value<br />\n";
|
|
|
|
|
Thanks Graham.
Your solution works.
Thanks.
|
|
|
|
|
I have this date in mysql datetime field:
2011-12-10 18:27:51
I am using this code in php to display it:
$created_date = mysql_result($result, $i ,"created_date");
echo date("d/m/Y", $created_date);
but the result is wrong! here is the result:
31/12/1969
how can I fix it please?
|
|
|
|
|
If a function doesn't do what you expect it to, you should go back and read the manual. The second argument to the date function should be an integer timestamp, but you are giving it a string.
You can get an integer timestamp from your string using the strtotime function[^].
|
|
|
|
|
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
|
|
|
|
|