|
I see in your code a redirection to signin in case of errors. It is possible that that rediretion brings you back to this page? (You may not see it on development machine, because you get no errors...)
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
signin page has the following only:
if (isset($_SESSION["member_loggedOn"])) { exit(header("Location: member")); }
actually i noticed that thatraja is right. The site is showing properly on IE and safari but not on Chrome.
I asked my host to check..
I have one more question please.. why it;s not showing the exact error, file and line? is it possible to enable it to show such information on host?
Technology News @ www.JassimRahma.com
|
|
|
|
|
It's a client side error raised by the browser. It has no idea about code lines in your server side...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Hi,
I would like how to add a customer url include in php.
I tried the following but didn't work:
include $_SESSION["domain_name"] . 'includes/php_footer.php';
Technology News @ www.JassimRahma.com
|
|
|
|
|
You didn't share complete code-block. And saying "didn't work' won't help us to spot the issue. Hereafter give us complete details.
I think you're trying to include the dynamic file based on the session value. Check this post.
Dynamic inclusion in PHP[^]
FYI PHP include statement[^]
|
|
|
|
|
Hi everyone,
I am working on a project where I need to come up with a way to gather the end user's computer information to be used for IT purposes, all users will be on a intranet with no exposure to external users.
What is the best way to do this? I've seen mention in a few places to use Java or WBF Browser application.
Any tips/advice would be greatly appreciated.
For additional information, the type of data i need to pull is: domain\username, computer name, serial number to start.
Thanks again
- I changed one line of code and got 99 errors...
|
|
|
|
|
I've got a theme running on my wordpress site
that's powered by ajax and jquery and I've got
an issue with one of my posts where every
time I navigate around the website to that
particular post, it fails to load my thumbnails
in that post correctly unless I reload the page
manually in my browser or when I only type in
the post's url in my browser and then load on
its own without going through the main site
(ajax powered).
I would like to disable Ajax loading for just that
post/link and not the entire website. My
theme has a custom field for javascript and
jquery codes which requires the tag, if I'm
going to paste any codes in this field, there
should be a way to specify a link/url that
doesn't ajax-load right?
I already tried using some custom field
shortcode plugin to invoke a javascript page
refresh in the post but that didn't work until I
manually reloaded the post in my browser then
the shortcode was called and the post auto-
refreshed once.
I found somewhere that using this -> data-
ajax="false" in my page will work but I don't
know where or how to place it in that specific
post.
Is there a way I could add some ajax-
compatible code to my post that will reload
the page ONCE automatically when it has been
loaded?
-- modified 3-Nov-13 13:46pm.
|
|
|
|
|
Hi,
I have the following in my meta.php include file:
<meta name="DC.title" content="MyWebSiteName" />
it's the same for all except few file where I will have:
<meta name="DC.title" content="MemberName" />
is it possible to keep the:
<meta name="DC.title" content="XoomPage" />
in the meta.php include file but override it with:
<meta name="DC.title" content="XoomPage" />
in other specific pages?
How?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I have a PHP project. I want to know what's the best way to save the date for a post in MySQL so it can be shown in a local time of the user.
For example if the local time in 00:00 in UAE and it's 09:99 in USA and a user in based in UAE created a post it will show created in 00:00 but if a user based in USA viewed the same post it will show created in 09:00
I am not sure how to explain this more but hope it's clear..
Thanks
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Always (and I do mean always) store dates and times as UTC values. Only when you need to display them should you apply the local time zone offset of the user's system. How you do this depends on your application and language, and making the effort to do a little research for yourself would quickly lead you to http://www.w3schools.com/php/func_date_localtime.asp[^].
Veni, vidi, abiit domum
|
|
|
|
|
thanks Richard. One more question please..
I am currently using timestamp field in MySQL as created_date and assigning a default value CURRENT_TIMESTAMP.
Is it possible to use UTC_TIMESTAMP() for the timestamp's default value?
Thanks
Technology News @ www.JassimRahma.com
|
|
|
|
|
Sorry, I don't know, but I'm sure Google will find you some suggestions.
Veni, vidi, abiit domum
|
|
|
|
|
Hi,
I am trying to get an INOUT parameter from MySQl using PHP and PDO but getting:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1414 OUT or INOUT argument 2 for routine xoompage.sp_send_password_reset is not a variable or NEW pseudo-variable in BEFORE trigger' in C:\xampp\htdocs\xoompage\password_reset.php:17 Stack trace: #0 C:\xampp\htdocs\xoompage\password_reset.php(17): PDOStatement->execute() #1 {main} thrown in C:\xampp\htdocs\xoompage\password_reset.php on line 17
here is MySQL sp:
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_send_password_reset`(IN param_member_guid varchar(255), INOUT param_password_reset_guid varchar(255))
BEGIN
DECLARE param_password_reset_guid varchar(255);
SET param_password_reset_guid = UUID();
UPDATE members SET password_reset_guid = param_password_reset_guid, password_reset_date = DATE(NOW()) WHERE member_guid = param_member_guid;
END
and this is the PHP:
$mysql_query = $mysql_connection->prepare("CALL sp_send_password_reset(:param_member_guid, :param_password_reset_guid)");
$mysql_query->bindParam(':param_member_guid', $_SESSION["member_guid"], PDO::PARAM_STR);
$mysql_query->bindParam(':param_password_reset_guid', $password_reset_guid, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 4000);
$mysql_query->execute();
Technology News @ www.JassimRahma.com
|
|
|
|
|
I am new to MVC4. I am trying to issue ajax call on the button click to receive partial view with the loaded dropdown list. It looks like Ajax call never reaches controller's method GetMyList(). What is wrong with my code ? Thank you
//in mypage.cshtml
@model IEnumerable<MyProject.Models.MyModel>
@{
ViewBag.Title = "MyPage";
Layout = "~/Views/Shared/_MyLayout.cshtml";
}
<div>
....
<div>
<button id="btnGetList">Find</button>
</div>
<div id="divWithPartialView">
@Html.Partial("_MyPartialView", Model) // displayed on initial page load
</div>
...
</div>
@section MySection{
<script type="text/javascript">
$('#btnGetList').on('click', function (event) {
alert("go get list"); // shows up
var myName = "Jo";
$.ajax({
type: "POST",
url: "Main/GetMyList",
data: myName,
success: function (data) {
alert("list is here"); //does Not show up
$("#divWithPartialView").html(data);
}
});
alert("after ajax"); //shows up
})
</script>
}
// Controller
namespace MyProject.Controllers
{
public class MainController: Controller
{
............
[HttpGet]
public ActionResult MyPage()
{
List<MyModel> myList = new List<MyModel>();
return View(myList);
}
public ActionResult GetMyList(string myName)
{
MyModel mm = new MyModel();
List<MyModel> myList = mm.GetNames(myName); // using search criteria entered on the previous Application page
return PartialView("_MyPartialView", myList);
}
}
}
//Partial View: _MyPartialView.cshtml
@model IEnumerable<MyProject.Models.MyModel>
<label>Select your name:</label>
<select id="lstNames">
<option value="0">- select name -</option>
@foreach (var name in Model)
{
<option value="@name.id">@name.myName</option>
}
</select>
//Model
public class MyModel
{
public int id { get; private set; }
public string myName { get; set; }
public List<MyModel> GetNames(string myName)
{
List<MyModel> myList = new List<MyModel>();
//code to find names that start with "Jo"
return myList;
}
}
|
|
|
|
|
|
Hi,
I want to ask how can I set the following in PHP with the current date to expire the page immediatelly?
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I am using the following code to read the session variable and set it as value for input textbox:
value="<?php if ($_SESSION["activation_email"] != NULL) echo $_SESSION["activation_email"]; ?>"
it was set in another code like this:
$_SESSION["activation_email"] = $member_email;
but I am getting the following error inside the textbox:
<br />Notice: Undefined index: activation_email in C:\xampp\htdocs\xoompage\activation.php on line 21<br />
just a note that the above error is NOT shown every time... it's just sometimes but I am not sure why?
Technology News @ www.JassimRahma.com
|
|
|
|
|
The error message said that it could not find a session variable with index as 'activation_email', i.e $_SESSION['activation_email'], suspect typo in those pages that show error.
|
|
|
|
|
Hi,
I am getting problem in rebind radgrid on radwindow close because i have to rebind 3 grid on parent page. It is rebinding just last grid which i have mentioned in code.
Following code i have used in my code
///------ In radwindow javascript code -------
function clientClose(arg) {
getRadWindow().close(arg);
var oWin = getRadWindow();
var parentWindow = oWin.BrowserWindow;
// top.location.href = top.location.href;
parentWindow.refreshGrid();
}
/// ---------In parent page javascirpt code -----
function refreshGrid() {
var masterTable1 = $find("<%=rgDefinition.ClientID%>").get_masterTableView();
var masterTable2 = $find("<%=rgDevelopment.ClientID%>").get_masterTableView();
var masterTable3 = $find("<%=rgTesting.ClientID%>").get_masterTableView();
masterTable1.rebind();
masterTable2.rebind();
masterTable3.rebind();
}
Problem is that ---- this code rebinding my last grid means masterTable3.rebind(); because it is in the last of code.
|
|
|
|
|
|
Hello Everyone,
I want to create a website like https://www.pdftoword.com/ or http://www.clipconverter.cc/ using PHP.
For this purpose, what should i do?
for ex:
1> Do i need to create a software and install that on server to convert a file? Then after uploading that file to server and then by using that software for conversion and giving it back to user using link?
If 1 is correct,Then do i need to buy my own server for this purpose or hosting companies give this option to install software ?
If you can, Please give a useful link regarding this topic.
I want to know the procedure for creating these kind of services.
Thank you
Money
|
|
|
|
|
Moneyzz Sharma wrote: Do i need to create a software and install that on server to convert a file? Yes, if you want to provide the service on the internet then you must use a web server. You could buy your own, but it is usually far easier to buy space from a hosting company. To learn PHP go to http://www.w3schools.com/php/[^].
Veni, vidi, abiit domum
|
|
|
|
|
Thing is not PHP. I want ask about the software that i need for conversion. Will the hosting provide me a option to install the software at the server?
I was not able to find a single tutorial on this on web
|
|
|
|
|
Moneyzz Sharma wrote: Thing is not PHP
Your original question stated:
Quote: I want to create a website like https://www.pdftoword.com/ or http://www.clipconverter.cc/ using PHP.
Sp maybe you should explain your problem in clearer detail.
Veni, vidi, abiit domum
|
|
|
|
|
Hi,
I have a 3 step survey, from where in on each step we are collecting some values.
Each step is created as a panel, and set visible to false, enabling them in the code as required.
On Step 3, there are about 5 questions the user needs to complete, upon which an account is created. So, on the button click of this final step, for some reason all the values in this panel are lost when i try to get the values,
CheckBoxList chkbxChk = (CheckBoxList)pnlQuestions.FindControl("cbl_" + qa.questionid);
It appears as though on button click does not remember the values from panel?
any ideas?
Thanks!
|
|
|
|