This question stems from watching Rasmus Lerdorf's talk from Drupalcon. This question and his talk have nothing specifically to do with Drupal, by the way... it was just given at their con. My own question also has nothing specific to do with PHP. It is the single entry point in general that I am curious about.
These days it seems that ...
I'm writing an application that would allow users to edit a calendar, its description and a few other things. I'm using jquery, php and mysql. Each time the user makes a change it asynchronously updates the database.
I'd like to give them the option of turning what they make into a pdf. Is there a way that I can post to my server the ra...
I'm looking for clean way to break my current habit of using print commands in PHP when I want to see what's happening.
I am aware of options such as Zend Debugger but I use Coda for development and I'm not interested in mixing other software or having to do server commands. I just need a console that can be added to my codebase and th...
I want to create a page in Magento that shows a visual representation of the categories.. example
CATEGORY
product 1
product 2
ANOTHER CATEGORY
product 3
My problem is, their database is organised very differently to what I've seen in the past. They have tables dedicated to data types like varchar, int, etc. I assume this is for p...
Hello. I know there are a few post out here about selecting records until a certain number is met from the sum of one field but there isn't any that suits me. I'm using PHP and MySQL.
I have a table named quantity. Inside there are records of product name, product price and product quantity. Besides these, there are a few others that he...
This hangs in Php (5.2.6-Win32 + Oracle10g) is it a bug, or I'm doing something fundamentally wrong?
try {
$conn = new PDO($DB,$USER,$PASSWORD);
$conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
//connected
try {
$conn->exec("DELETE FROM MY_TABLE");
echo "done";
...
Note: I don't know if this ...
I've noticed that Magento stores MySQL connection details in an XML file which isn't secured above the docroot. This seems.... well dangerous.
XML seems like a handy way to store config data, except for one thing, typing in http://www.domain.com.au/library/config.xml will show the world your private details!
I went ahead and used an XM...
I have a PHP script that creates an xml file from the db. I would like to have the script create the xml data and immediately make a .gzip file available for download. Can you please give me some ideas?
Thanks!
...
Hi,
I am using xdebug plugin for vim. After making few changes i was able to run debugger but not able to set breakpoints.
So, I enabled xdebug.remote_log and below is the log statements corresponding to setting breakpoint.
<- breakpoint_set -i 5 -t line -f file:///C:\htdocs\testLocal.php -n 36
->
Its issuing request to debugger in...
<?php
$this_is_my_array = array("John","Johan");
for(int i = 5; i < 5; i++){
echo "$this_is_my_array[i] ";
}
//Adding name Markus
array_push($this_is_my_array,"Markus");
for(int i = 5; i < 5; i++){
echo "$this_is_my_array[i] ";
}
//Removing name from array
$this_is_my_array2= array_pop($this_is_my_array);
for(int i = 5; i < 5; i++) {
ech...
hi i need to erase a certain session variable from a javascript function how can i do this can anybody help me?
...
I can't seem to find a js RTE that will play friendly with snippets of php intertwined in it. I want a mini CMS for the backend of a number of sites. The views have some snippets of php here and there
Are there any RTE's that will leave the php alone, and even show it mixed with the nice formatting?
TinyMCE kills the tags even when...
I am desperately seeking a solution to converting HTML + CSS (2.1) to RTF in PHP. While I have found a superb solution for HTML to PDF in Prince XML, I've yet to find anything that:
can convert HTML to RTF (or DOC);
runs on a Linux server;
is callable from PHP;
handles paged media and the ability to add page headers and footers; and
h...
Hello, I have the following javascript functions, which when in a standalone file, will be called correctly from a page.
function deleteItem(layer, url) {
var xmlHttp=GetXmlHttpObject();
if(xmlHttp==null) {
alert("Your browser is not supported?");
}
xmlHttp.onreadystatechange = function() {
if(xmlHttp.readyStat...
Hi.
I have a page with some text and links. I want to display image there itself on clicking those links. However, I am bound of not using javascript at all. All I can use is some server side component like PHP.
Thanks
...
I've seen lots of articles and questions about mysqli, and all of them claim that it protects against sql injections. But is it fool proof, or is there still some way to get around it. I'm not interested in cross site scripting or phishing attacks, only sql injections.
What I should have said to begin with is that I am using prepared st...
I have code to delete a record from mysql, displayed in a table via php, and subsequently delete the table row from the page. The record is deleted, however nothing changes in the page or the DOM, and it should change instantly.
Here is the javascript code to delete from the DOM
function deleteItem(layer, url) {
var xmlHttp=GetXmlH...
I'm looking for information about 'the best' encryption algorithm for encrypting cookies.
I hava the following requirements:
It must be fast
encrypting and decrypting the data will be done for (nearly) every request
It will operate on small data sets, typically strings of around 100 character or less
It must be secure, but it's not li...
Hi
I am creating a website and on one particular page, am wanting to send the user back to the previous page. I am fairly new to PHP/HTML and have been using some existing code for ideas and help.
The existing code uses the following method:
if (! empty($HTTP_REFERER))
{
header("Location: $HTTP_REFERER");
} else
{
header("Lo...
Hi All,
I need to parse and return the tagname and the attributes in our PHP code files:
<ct:tagname attr="attr1" attr="attr2">
For this purpose the following regular expression has been constructed:
(\<ct:([^\s\>]*)([^\>]*)\>)
This expression works as expected but it breaks when the following code is parsed
<ct:form/input ty...