|
Much appreciated!! that worked!
|
|
|
|
|
Hi,
i have an array with five values. I want to encode the array using json_encode in format:
{"value1":"val","data":["name", "email"]}
where value 1 is a paremeter in php and data is an array. But if i use json_encode it gives me different output
here is my code:
$arr['value1'] = 'val';
$arr['data'] = $data
json_encode($arr);
it gives me
{"value1":"val1","data":{"name", "email"}}
can any one tell men how to encode the array in above format??
thanks
|
|
|
|
|
|
I have started my Web developemnt in C# using Orchard CMS recently.
I have developed widget(say XYZ) using Orchard..I have a main widget(say ABC) available with a button in it. On click of button i would like to display my newly created widget XYZ.
How to use it in cshtml of ABC widget or how to develop tht ?
|
|
|
|
|
Hello could anybody Help me about passing the value of a textbox from form using Ajax Actionlink. It's been whole day figuring out still I'm getting value of null.
Im using pure Ajax Action link with out Any button.
here is the sample of delete ajax action link works perfect!
http:
But using it in form collection the value always null. Any help Appreciated Thanks!
here is my code:
CustomerVIEW
<% using (Html.BeginForm())
{ %>
<%= Html.TextBoxFor(model => model.Fname, new { id = "Fname" })%>
<%= Html.TextBoxFor(model => model.Lname, new { id = "Lname"})%>
<%= Ajax.ActionLink("Create", "Create",
new { id = 1},
new AjaxOptions {
HttpMethod="POST",
OnFailure = "function() { alert('fail'); }",
OnSuccess = "function() { alert('success'); }"
})%>
}
------------------------------------------------------------------------
CustomerController
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(FormCollection formCollection)
{
clsCustomer objcustomer = new clsCustomer();
clsSession objSession = new clsSession();
objcustomer.Fname = formCollection["Fname"]; --> NULL
objcustomer.Lname = formCollection["Lname"]; --> NULL
}
|
|
|
|
|
I don't use Ajax action links, but rather HTML action links so I might be off base here, but why do you need the second parameter in your textbox? If you are using a TextboxFor for then the model associated with your form should post back in whatever it's model form was.
I have been working with MVC a lot lately and have found that Firebug for Firefox is invaluable for this kind of thing. When you run it, you can see what your post values are.
|
|
|
|
|
What is the best firewall or security measurements for a website to prevent hackers interference?
|
|
|
|
|
I am trying to set up a self signed SSL certificate on development machine.
To create the certificate, I log onto IIS 7->server configurations->select the create self-signed certificate.
I create a certificate with a friendly name, like *.domainstesting.com, so I can use this same certificate for multiple domains.
I set up both the web sites to use this SSL certificate.
When ever I try to browse the web site which has https associated with it, there is an error stating the
"There is a problem with this website's security certificate. The security certificate presented by this website was not issued by a trusted certificate authority."
Am I missing any step?
Thanks so much for your help!
|
|
|
|
|
vkEmerson wrote: self signed SSL certificate
vkEmerson wrote: The security certificate presented by this website was not issued by a trusted certificate authority.
By definition, a self-signed certificate is not issued by a trusted CA. You'll need to add the certificate to the trusted certificate store on your computer to get rid of this warning. The precise steps required will vary depending on the browser you're using.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Then find a site that allows advertising.
Use the best guess
|
|
|
|
|
The contents on one of my web pages contain the cent sign (¢). When using utf-8 encoding, the character shows as a box but when I remove this line from the
head of the page () the character is show correctly.
Meanwhile utf-8 encoding is being recommended for web pages and is said to support all characters of the world. Could I be missing something else. Please help.
|
|
|
|
|
How about using 'Entity Number' or 'Entity Name'?
Entity Number for cent is '¢' and Entity Name is '¢'.
Hope this is helpful.
You can check a reference from the link below.
http://w3schools.com/tags/ref_entities.asp
|
|
|
|
|
Try to open the page with notepad and click Save As..
Then you will see the save prompt.
You can see an Encoding select box before the Save button. Choose the UTF-8 option from the Encoding select box & click save. This will solve your problem.
--
Regards
Rony Sur
Senior Software & Application Developer
Frost & Sullivan Pvt Ltd
rony.sur007@gmail.com
|
|
|
|
|
I'm using crystal report for visual studio. I would like to display a subtotal amount for every 20 row of records and a grand total last.
Any idea how to do? should i use group by? Thanks.
|
|
|
|
|
|
|
|
Hello,
Currently i am trying to get information of Core PHP. First Please let me know which BOOK (Guide) is good for learning?
Nowadays, i am wondering about School Management system for Development in PHP and i will be very small so please guide me where we can use action command on same html or other php page? I giving you code below so please help me.
Action will be blank if i will use php code on different php page?
=$_GET[=$_GET[=$_GET[
<form method="get" action="" name="">
<table width="300px" border="1">
<tr>
<td align="centre" width="150">Student Name</td>
<td align="centre" width="150"><input name="name" type="text"</tr>
</tr>
<td>Roll Number</td>
<td><input name="rollnumber" type="text"</td>
</tr>
<tr colspon(2) align="centre"><input name="submit" text="submit" value="Submit"</tr>
</table>
<form>
|
|
|
|
|
David I don't really get what you are asking for. But if it is about setting value for action dynamically, you will need to use javascript.
Do well to explain further so that I will be able to help you.
|
|
|
|
|
First please let me know which book is good for learning?
|
|
|
|
|
Well, there are so many books for learning. Check out the following which will help you a lot:
Core PHP Programming (Leon AtKinson),
Beginning PHP 5.3 (Matt Doyle),
Beginning PHP and MySQL, From Novice to Professional (W. Jason Gilmore).
There are others but get those. They will be enough.
|
|
|
|
|
|
Hi everybody, am new in php and am trying to add sessions to a php code, i tried but i didn't knew what is the problem! i added to the first page which is login.php those lines before any code html
<?php
if ($login_valide == $_POST['login'] && $pwd_valide == $_POST['pwd']){
s
$_SESSION['nom'] = $_POST['username'];
$_SESSION['mdp'] = $_POST['pwd'];
$nom=$_SESSION['nom'];
}
?>
<!doctype html>
and in this page scan.php i addes those lines
<?php
if ($login_valide == $_POST['login'] && $pwd_valide == $_POST['pwd']) {session_start();
$nom=$_POST['nom'];}
?>
<!doctype html>
PS: scan.php and login.php contain only code html and i have tow other classes .php which analyse the variables and the entred data.
am waiting for your help
|
|
|
|
|
Sorry, I am not understand can you elaborate properly?
|
|
|
|