I have a dynamic string from PHP that I encoded using htmlentities() so I can pass it on AJAX using jQuery and JSON. Now I got something like
{ "error": "false", "html": "<div id="user_add_title">Adding New User<div class="showhide-div"><a class="hideShowToggle" href="#" onclick=&qu...
In a multi-step form process, I am receiving a URL as a form field.
After processing, my PHP script redirects to that address using header("Location: ...");
Apart from the possibility of being misused as a redirect service for porn sites to generate harmless-looking links in E-Mails (Open Redirect, which can be helped by matching the U...
Hi,
I'm not a PHP programmer (but know other languages) and I'm trying to understand a web page that was done in PHP (5.1.6) in order to do some changes.
The page has the following code (simplified):
$db_hosts = array();
$sql = 'SELECT h.hostid, h.host FROM hosts h ';
$db_items = DBselect($sql);
while($db_item = DBfetch($db_items)){...
I've deployed my symfony project to the server and now I wanna change the models inside schema.yml without reseting other unrelated database tables and keep the current data.
Is there any diff / upgrade feature for symfony propel project ?
...
I'm attempting to upload a file using FileRef and a php script. The file uploads and it definitely returns a test string ( I can see it with a web debugger).. but I can't grab that string in my flex app. I am using a DataEvent listener and a COMPLETE listener. Still no result.
What am I doing wrong here?
fileRef.addEventListener(Data...
I am editing my application form.So what i am Doing telling you here..I am already logged in
First of all i am giving a edit link(edit_profile1.php) on my home page
NOw i am asking again for username and password so that unauthorized user can not making editing in your profile
NOw on edit_profile1.php i am checking username and passwor...
I am implementing AES-256 bit encrpytion in my web app:
http://www.utoxin.name/2009/07/automatic-db-field-encryption-in-cakephp/
One of the steps says to store the cipher used and key in a boostrap file. But what is stopping someone from scanning the file system with PS or something and decrypting the data?
What is the best way to se...
I just started using Eclipse PHP.
I finally figured out how to turn on auto complete code assist.
My problem is that when I use require or include, those variables in those files aren't showing up.
Example,
code1.php
<? $test = 'hi'; ?>
code2.php
<? require('code1.php'); ?>
When I am editing code2.php, $test variable doesn't sh...
Let's say I call multiple functions on a given page.
function getProfile {
<mysql code to connect>
...
...
}
function getMatchingUsers {
<mysql code to connect>
...
...
}
If I call the two functions above on a given page, wouldn't that open multiple connections to the DB? I assume php would automatically close...
I have made a application form in which i am asking for username,password,email id and user's resume.Now after uploading resume i am storing it into hard disk into htdocs/uploadedfiles/..in a format something like this username_filename.In database i am storing file name,file size,file type.Some coading for this i am showing here
$files...
Hi!
I'm having problems finding the width and height of an image. I'm trying to pass it to the URL so I can set it as a PHP session variable.
location.href="homeview.php?x=" + dd.elements.image1.x + "&y=" + dd.elements.image1.y + "&h=" + document.getElementById('image1').height;
the URL reads as such with an example image:
homeview...
I have number like 9843324+ and now I want to get rid of + at the end and only have 9843324 and so how should I do this in php ?
Right now I am doing $customer_id = explode('+',$o_household->getInternalId); also $o_household->getInternalId returns me 9843324+ but I want 9843324, how can I achieve this ?
Thanks.
...
Is it possible to do so in PHP? Is there some function that changes the transfer mode from ASCII to binary?
Thank you.
...
the following statement returns "do actions!what2" when run. What's going on here? it seems like both true and false are being returned!
if (md5($email) == $emailHash) {
echo "do actions!";
} else {
echo "what2";
}
...
Hi,
I'm trying to submit a form using jquery in symfony 1.4, but CSRF attack detected error pops up each time. This is the code i use to submit the form data:
$.ajax({
type: 'post',
cache: false,
url: $('#assign-form form').attr('action'),
data: (
'activity[id]=' + $('#activity_id').val() +
'&act...
I want to use Markdown for my website's commenting system but I have stumbled upon the following problem: What should I store in the database - the original comment in Markdown, the parsed comment in HTML, or both?
I need the HTML version for viewing and the Markdown version if the user needs to edit his comment. If I store the Markdown...
I'd like some help with some URL rewriting magic. I am having trouble modifying the Request_URI variable.
I would like to switch between two sites http://host.com/alpha and http://host.com/beta. They are both handled by the same php script. This script is http://host.com/index.php.
The index.php expects to be given a GET variable SITE ...
Response example for MD5 hash found, for example http://md5.noisette.ch/md5.php?hash=2a0231531bc1a7fc29e2fa8d64352ae9 :
<md5lookup>
<hash>2a0231531bc1a7fc29e2fa8d64352ae9</hash>
<string>noisette</string>
</md5lookup>
Response for MD5 hash *not* found, for example http://md5.noisette.ch/md5.php?hash=11111111111111111111111111111111 ...
I'm trying to create a nested comment system using PHP and MySQL. But I'm stuck
My Database structure is id, body, time, reply and depth.
A regular comment's reply field will be '0'. If it's replying to another it will correspond to the id of the comment it's replying to.
depth means how deep it is from the highest parent
So if this...
I'm fairly new to CURL and I was able to fetch individual files like this:
$c_session = curl_init();
curl_setopt ($c_session, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($c_session, CURLOPT_URL, $uri);
curl_setopt ($c_session, CURLOPT_TIMEOUT, '12');
$content = curl_exec($c_session);
curl_close ($c_session);
Now I need to be able to li...