Hello,
In a php file, i use the jqGridRender Class to build and manage a grid.
To add a new item in my SQL table, i use (among others things) a php variable named $start. This variable is known, it belong to the PRIMARY KEY of this new item i want to add. Its type in the table is DATETIME and its value is "2010-06-16 06:00:00"
How t...
Ok, so I need to populate a MS Access database table with results from a MySQL query. That's not hard at all. I've got the program written to where it copies a template .mdb file to a temp name and opens it via odbc. No problem so far.
I've noticed that Access does not support batch inserting (VALUES (foo, bar), (second, query), (thi...
If I have an array named $myArray how can I get a reference to it from a string of the same name myArray. I tried:
eval('myArray');
But that gave me an error.
...
I was using the following code to retrieve HTML snippets from a database table and display them. It worked fine on my old web host, but after moving to a new web host I started getting (rather unhelpful) 500 Internal Server errors. Both hosts use PHP 5.2.x.
$query = "SELECT id, html FROM $tableName ORDER BY id DESC LIMIT 0, 300";
$resul...
I have a large mathematical expression that has to be created dinamically. So, for example, once I have parsed "something" the result will be a string like: "$foo+$bar/$baz";.
So, for calculating the result of that expression I'm using the eval function... something like this:
eval("\$result = $expresion;");
echo "The result is: $resul...
If the title hasn't scared you away yet, read on. I'm working on an ExpressionEngine website and I'm editing the member templates file. All templates that relate to member interaction are stored as functions inside of a class in one single file.
Each of these functions is a simple here document, but many of them print code with paths ...
My value is stored within a string inside (). I need to return this value to check if it's empty.
$variable = "<a href=\"http://www.link-url.ext\">My Link</a> (55)";
$value = "55"; // how do I get the value?
if($value < 1) {
// no link
} else {
// show link
}
This code would be used to show links with no posts in them in ...
Is there an option besides Drupal or Wordpress to use to allow the user or administrators of a site to update and manage content on the site themselves?
Is it possible to use Drupal or Wordpress for a particular section of the site that I want to allow the above mentioned but not the rest of the site.
Basically I am just looking into o...
This is PhpSecInfo Report for our servers:
I cant access to php.ini for fix warnings. I want to know, Could the hacker access to database with this settings?
I have a very simple site that read data from database. There is mysql_real_escape_string, numeric data filter, sprintf vs in my queries.
Please help me about this issue.
Thanks a...
In PHP, what are the biggest considerations when choosing between using http_get("https://...") and a sockets loop with fsockopen("ssl://..."), fputs() and fread()?
I’ve seen a couple of implementations lately that use the latter. Is that just old legacy code or is there some good reason for it?
Thanks.
...
I have some code that will log the user out after x seconds of inactivity. The problem is that it logs them out before the time specified it doesn't even count the inactivity.
This is the code:
<?php
$_SESSION['loginTime'] = time();
if($_SESSION['loginTime'] < time()+10*60){
$error_msg ="Logged out due to inactiv...
Alright well, I connect to 3 different ip's when I run this script.
It copys files from directorys and downloads them to the website.
I'm having a slight problem with two of them ip's...
I have turned on ftp passive but it still seems to come back as bool(false)
Updating server 1
bool(false)
Warning: ftp_get() [function.ftp-get]: Fi...
I have CakePHP (1.3.2) running on UniformServer (basically a WAMPP server), and for some odd reason CakePHP makes the entire server crash when certain errors occur, forcing me to restart it. This is very annoying because not rarely a small typo results in a full minute of wasted time.
I haven't pinpointed the reasons yet, but it appears...
I'm doing a simple for loop through the terms in a given vocabulary, these terms have their description in both the default language and an additional. The thing is that $term->description is always returning the default language version no matter which language is active so I guess I'm missing something here since I guessed (appparently...
This is whole explore.php
<head>
<!-- Meta -->
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<meta name="keywords" content="keywords, go, here, seperated, by, commas" />
<meta name="description" content="Short description of the site goes here." />
<!-- CSS -->
<link rel="stylesheet" type="text/cs...
How change layot for xmlhttp request?
For example if i need "/about" i see full page, if i request this page with ajax, magento use other layout and get for me oly needed information.
...
I have a MySQL database where I am storing information that is entered from a PHP web page. I have a page that allows the user to view an existing row, and make changes and save them to the database. I want to know the best way to keep the original entries, as well as the new update and any subsequent updates.
My thought is to make a ...
Hello, I developed a website on WampServer in windows. After finishing the site and testing all the features I tried to deploy it on linux server running Ubuntu. I started to get errors about not found files which were not found in my include path ! I set the include path in htaccess file, same php file and even php.ini with absolute pat...
I read here how to get into an Apache password protected directroy via dircet link with the simple:
http://username:[email protected]/protected_dir/
that works in FF/Chrome/Safari, and obviously not in IE7! :)
Do you know how could i get into a psw protected directory creating maybe a login form and using GET/POST to get in?
Do...
Hello,
I am trying to connect to Yudu's web service via soap/php. When I send
this test, I am getting the following fault response and code:
ERROR: env:Server-java.lang.RuntimeException: com.yudu.webservice.InternalError
If I dont specify a subscriptionId I get the following fault:
Client-SOAP-ERROR: Encoding: object hasn't 'subscrip...