|
|
when go to previous page it show confirm submission how to solve this problem in php?
|
|
|
|
|
<html>
<script type="text/javascript">
if (screen.width>800) {
window.location="http://www.youtubemp3save.org"
}
</script>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<title>YouTube Mp3 Save</title>
<meta content="Search & Download YouTube Mp3's - Visit Now" name="description" />
<meta content="youtube mp3 save,mp3, save, mp3 download, youtube to mp3," name="keywords" />
<meta name="viewport" content="width=device-width; initial-scale=0.6; maximum-scale=1.0; user-scalable=false;"/>
</head>
<body bgcolor="000000">
<center><a href="http://m.youtubemp3save.org/">
<img src="/images/whitelogo.png"
="logo" width="300" height="140">
</a> </center>
<center>Download your favourite Mp3's from YouTube
</center>
<script src='/js/ytembed.js'>
</script>
<link rel="stylesheet" type="text/css" href="css/main.css">
<p>
<form onsubmit="ytEmbed.init({'block':'Results','type':'search','q':document.getElementById('ytSearchField').value,'results':45,'meta':true,'layout':'full'});return false;">
<center>
<input type="text" autocomplete="off"
id="ytSearchField"
placeholder="Search YouTube music video here"
style="
width:550;
padding: 20;
margin: 0px 0;
display: inline-block;
border: 0px solid #848484;
border-radius: 8px;
font-size: 30px;">
</center>
</form>
<style>
input:focus {outline: none; }
</style>
<center>
<img src="/images/loading.gif">
</center>
<center><div id="Results"></div></center>
</body>
</html>
Javascript...
|
|
|
|
|
|
Firsat, I'm not really a web developer, so bear with me...
Using Server 2012
I downloaded this SingalR Example code[^].
Works great - on my machine.
So then copied the Server code to my server and ran it (self hosted in a console app). I opened port 8080 on the router and allowed it in the firewall.
Then, in the client app (WPF) I changed the target URL from
const string ServerURI = "http://localhost:8080/signalr";
to
const string ServerURI = "http://xx.xx.xx.xxx:8080/signalr";
When I run it I get:
StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Connection: close
Date: Sat, 04 Jun 2016 22:19:51 GMT
Server: Microsoft-HTTPAPI/2.0
Content-Length: 334
Content-Type: text/html; charset=us-ascii
}
not really sure what this means.
I know there's not a lot of info here. I'm not really sure what I'm doing as far as the hosting part goes. Can anyone shed some light on what this message is telling me?
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
You need to change the URI in the server app as well, otherwise it will only listen for local requests.
In WPFServer\MainWindow.xaml.cs , change:
const string ServerURI = "http://localhost:8080";
to:
const string ServerURI = "http://+:8080";
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks. I'll give that a try.
If it's not broken, fix it until it is
|
|
|
|
|
Firsat, I'm not really a web developer, so bear with me...
Using Server 2012
I downloaded this SingalR Example code[^].
Works great - on my machine.
So then copied the Server code the my server and ran it (self hosted in a console app). I opened port 8080 on the router and allowed it in the firewall.
Then, in the client app (WPF) I changed the target URL from
const string ServerURI = "http://localhost:8080/signalr";
to
const string ServerURI = "http://xx.xx.xx.xxx:8080/signalr";
When I run it I get:
StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Connection: close
Date: Sat, 04 Jun 2016 22:19:51 GMT
Server: Microsoft-HTTPAPI/2.0
Content-Length: 334
Content-Type: text/html; charset=us-ascii
}
not really sure what this means.
I know there's not a lot of info here. I'm not really sure what I'm doing as far as the hosting part goes. Can anyone shed some light on what this message is telling me?
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
Hi All,
i want to show Google map with multiple marked locations with detail on each marked.
Tools: ASP.net web form, C# with ADO.net and SQL sever 2008.
i want to get Latitude and Longitude from database and show marker on google map dynamically.
|
|
|
|
|
You already posted this in the ASP.NET forum; please post in one forum only.
|
|
|
|
|
You also have not actually asked a question. Essentially, all you have said is that you want someone to do all this work for you. That is not very polite.
There are many examples online. I suggest you start by googling for those.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello,
I am using 'InternetExplorer object' to automate websites in vb.net. Now a days I am getting compatibility issues in IE and nobody loves to use IE. So I have planned to migrate to automation in Chrome.
But I am not getting any alternatives which works similar to IE. I have came across Selenium web driver, but in that I failed to catch user interfere events ( Like navigation by user, click etc).
Whether it is possible to implement my requirements in Chrome using selenium ?
Is there any other methods which works same as to IE ?
Please help me.
|
|
|
|
|
Hi All,
I am using ASP.Net MVC with AngularJS in the following way, I have a .Net Controller as below
namespace TestAngularJSApplication.Controllers
{
public class EmployeeController : Controller
{<br />
public ActionResult Index()
{
return View();
}
public JsonResult GetEmployees()
{
DAL oDAL = new DAL();
List<Employee> listOfEmployees = oDAL.employees.ToList();
return Json(listOfEmployees,JsonRequestBehavior.AllowGet);
}
}
}
Then I have Index.cshtml as below
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Employee Details</title>
<script src="~/Scripts/jquery-2.2.4.min.js"></script>
<script src="~/Scripts/angular.min.js"></script>
<script src="~/Scripts/myApp.js"></script>
</head>
<body>
<div data-ng-app="myApp" data-ng-controller="employeeController">
<table style="border:solid 1px gray;">
<tr>
<td style="border:solid 1px gray;">Employee Id</td>
<td style="border:solid 1px gray;">Employee Name</td>
<td style="border:solid 1px gray;">Employee Address</td>
<td style="border:solid 1px gray;">Employee Salary</td>
<td style="border:solid 1px gray;">Is Active</td>
</tr>
<tr data-ng-repeat="emp in employees">
<td>{{emp.Id}}</td>
<td>{{emp.Name}}</td>
<td>{{emp.EmployeeAddress}}</td>
<td>{{emp.EmpployeeSalary}}</td>
<td>{{emp.IsActive}}</td>
</tr>
</table>
<pre>
</div>
Then I have myApp.js file as below
var myApp = angular.module('myApp', []);
myApp.controller = ('employeeController', function ($scope, $http) {
$scope.employees = "";
$http.get("/EmployeeController/GetEmployees")
.success(function (result) {
$scope.employees = result;
})
.error(function (result) {
console.log(result);
});
});
Then I have DAL class which is connecting to the Database and serving me the data.
public class DAL : DbContext
{
public DAL() : base("TestConnectionString") { }
public DbSet<Employee> employees { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<Employee>().ToTable("EmployeeTable");
modelBuilder.Entity<Employee>().HasKey(x => x.Id);
}
}
After seeing all the Problem here is I am not able to display the data in the Table in the View. And when I checked if the GetEmployees method is being called then its not being called as well. When I checked if the "employeeController" of the angularJS controller, then it is also not being called. Can anybody please help me in checking why employeeController the angular controller is not being called?
I am googling and trying to find what is missing, any type of help will be very very helpful. Thanks in advance.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
Well, you're assigning to myApp.controller rather than calling it.
Instead of:
...
myApp.controller = ('employeeController', function ($scope, $http) {
...
Try:
myApp.controller('employeeController', function ($scope, $http) {
Also, just as a stylistic concern, if you absolutely have to instantiate $scope.employees I would suggest assigning it as an empty object rather than an empty string. That just makes the intent more clear.
EDIT: One other note, that code will not survive minification, so you might want to leverage the full dependency injection syntax for angular. That would make your controller definition look like this:
myApp.controller('employeeController', ['$scope', '$http', function ($scope, $http) {
Just make sure to add the closing array brace at the end of your code block as well.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hi,
I did implement that, it resolved one problem, but when I am trying to debug the code in the ASP.Net MVC controller, I am getting the following error.
My ASP.Net Controller is as below
namespace TestAngularJSApplication.Controllers
{
public class EmployeeController : Controller
{<br />
public ActionResult Index()
{
return View();
}
public JsonResult GetEmployees()
{
DAL oDAL = new DAL();
var a = oDAL.employees;
var listOfEmployees = oDAL.employees.ToList();
return Json(listOfEmployees,JsonRequestBehavior.AllowGet);
}
}
}
And my DAL is as below
public class DAL : DbContext
{
public DAL() : base("TestConnectionString") { }
public DbSet<Employee> employees { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<Employee>().ToTable("EmployeeTable");
modelBuilder.Entity<Employee>().HasKey(x => x.Id);
}
}
And Database table structure is as below
CREATE TABLE [dbo].[EmployeeTable](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](max) NULL,
[EmployeeAddress] [nvarchar](max) NULL,
[EmployeeSalary] [decimal](10, 2) NULL,
[IsActive] [bit] NULL,
CONSTRAINT [PK_EmployeeTable] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
And class structure is as below
namespace TestAngularJSMCVApplication.Models
{
public class Employee
{
public int Id { get; set; }
public string Name { get; set; }
public string EmployeeAddress { get; set; }
public decimal EmpployeeSalary { get; set; }
public bool IsActive { get; set; }
}
}
And the database table that I am trying to load and show in the View, is not being loaded. Any help please. I think the new Entity Framework is changed little bit from the old one.
Any sort of help helps me a lot. Thanks in advance.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
modified 24-May-16 16:51pm.
|
|
|
|
|
Well, you have a couple of issues.
First is a resource leak. Make sure to dispose of your DbContext implementation instances, usually wrapping with a "using" is a good route. In the controller, that would look like:
public ActionResult GetEmployees()
{
using(var oDAL = new DAL())
{
return Json(oDAL.employees.ToArray(),JsonRequestBehavior.AllowGet);
}
}
Now, do you have a connection string named "TestConnectionString" in your web.config?
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hi,
I'm a newbie when it comes to web development. Would like some advise on choosing the platform for a open sourced education site for highschoolers. The idea is so that they can post questions and use the site for discussions. The main idea is to gather these questions and enter the attributes for the questions eg: subject, chapter, marks, time taken to answer etc. which we can then build the intelligence for advice - suggesting students to focus a specific chapter where they need more practice.
Hope I can get some advice here. And pardon my English
|
|
|
|
|
The only thing I've worked with that could cover those needs is Moodle.
Moodle - Open-source learning platform | Moodle.org[^]
The platform allows plugins for customized functionality, and the API runs on PHP, so is trivial to work with.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hi,
Why I am getting:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error' in /home/meskholdings/mybluefile.com/change_password.php:22 Stack trace: #0 /home/meskholdings/mybluefile.com/change_password.php(22): PDOStatement->fetch(2) #1 {main} thrown in /home/meskholdings/mybluefile.com/change_password.php on line 22
For below code:
$mysql_query = $mysql_connection->prepare('CALL sp_web_get_employee_by_password_guid(:param_guid, :param_code)');
$mysql_query->bindParam(':param_guid', $password_guid, PDO::PARAM_STR);
$mysql_query->bindParam(':param_code', $activation_code, PDO::PARAM_STR);
$mysql_query->execute();
while($mysql_row = $mysql_query->fetch())
{
$full_name = $mysql_row["official_name"];
$first_name = $mysql_row["first_name"];
$email_address = $mysql_row["email_address"];
}
This is my SELECT SQL:
CREATE DEFINER=`root`@`%` PROCEDURE `sp_web_get_employee_by_password_guid`(IN param_guid varchar(255), IN param_code varchar(255))
BEGIN
DECLARE param_employee_id INT;
IF EXISTS (SELECT employees.employee_id FROM employees JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category WHERE new_password_guid = param_guid AND new_password_code = param_code AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE) THEN
BEGIN
SET param_employee_id = (SELECT employees.employee_id FROM employees JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category WHERE new_password_guid = param_guid AND new_password_code = param_code AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE);
SELECT employees.employee_number, employees.first_name, employees.official_name, employee_contacts.contact_details AS email_address
FROM employees
JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id
JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category
WHERE employees.employee_id = param_employee_id AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE;
END;
END IF;
END
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
You're calling fetch , but your query doesn't always return a resultset. Try changing your query so that it returns an empty resultset if the employee is not found:
CREATE DEFINER=`root`@`%` PROCEDURE `sp_web_get_employee_by_password_guid`(IN param_guid varchar(255), IN param_code varchar(255))
BEGIN
DECLARE param_employee_id INT;
IF EXISTS (SELECT employees.employee_id FROM employees JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category WHERE new_password_guid = param_guid AND new_password_code = param_code AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE) THEN
BEGIN
SET param_employee_id = (SELECT employees.employee_id FROM employees JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category WHERE new_password_guid = param_guid AND new_password_code = param_code AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE);
END;
END IF;
SELECT employees.employee_number, employees.first_name, employees.official_name, employee_contacts.contact_details AS email_address
FROM employees
JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id
JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category
WHERE employees.employee_id = param_employee_id AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE;
END
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Downloaded curl. Added its path to the system variable.
uncommented: php_curl.dll in php.ini
Added the line:
AddType application/x-httpd-php .php
in httpd.conf of apache
copied libeay32.dll and ssleay32.dll files into system32 directory.
Restarted Apache server.
Still having problem. It would be a great help if someone is here.
|
|
|
|
|
adkPrasanna wrote: Still having problem.
It might help if you described the problem you're having, and included the relevant parts of your code.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
adkPrasanna wrote: It would be a great help if someone is here. Unfortunately we are all elsewhere, so there is no possibility that we can see the error messages on your screen.
|
|
|
|
|
So some are here
I added the following in Environement variables > System Variables > Path
D:\programFiles\PHP
D:\programFiles\Apache\bin
D:\programFiles\Curl
Solved the curl, openssl problems. But not completely. I'm having trouble in opcache section.
When I run mooodle, the message is like this:
PHP setting should be changed. for opcache
I've configured php.ini as recommended on moodle.org.
phpinfo() also doesn't show any info about opcache. Though I've uncommented opcache.enable=1
|
|
|
|
|