I'd like to make a script where the user can enter a sum e.g. 4^5+(56+2)/3 or any other basic maths sum (no functions etc.) how would I go about doing this? Presumably regex. Could somebody point me in the right direction - I'm guessing this isn't going to be too easy so I'd just like some advice on where to start and I'll take it from...
Hello,
What is the maximum width and height that ImageCopyResampled can handle? My code works for smaller images in terms of width and height. For larger images, it will disregard the coordinates, meaning the cropping starts from the upper left corner of the image.
Is there a workaround? Here's a portion:
$trgt_width = 500;
...
The MySQL query:
SELECT title,alias,parent FROM '._prefix.'categories
WHERE (language = \''._language.'\' || language = \'all\')
&& status = \'published\'
ORDER BY rank ASC
The Result (from phpMyAdmin):
title | alias | parent
Home | home | 0
Todo | todo | 0
Multiuser| todo_mu | 21
Modulsys | todo_mo...
I've been playing around with two nice php based ORMs. OutletORM and phpDataMapper.
Does anyone have experience with them? Any advantages of one over the other. It's also a good question to ask which one has a bigger user-base.
...
I really love working with Django and Python, when I go back to PHP I feel lugered/restricted... I tried Zend/Kohana/CodeIgniter/CakePHP but none of them are really as nice...
Does anyone know of some php framework that's heavily influenced by Django? Or at least the templating system?
...
My question is about: "adding field data to referenced node without replacing existing data".
For example, I have a project node with team members referencing the project. Each team member has on its node a location, ie, 'United Kingdom', 'United States', 'Australia'.
On the project node I have those exact same fields. I need to create...
I working on a form whereby when the user enter in their email account and click on send, an email will be sent to their email account.
I have everything worked out. Just that it doesnt send the email to my account. Anyone have any ideas? Is there a configuration that I left out or something?
This is the sample from my controller:
pu...
How can I find out if I have too many indexes on my MySQL table?
For some of the tables that need to be accessed quite a lot, I've added about 2-4 indexes on the columns that will be accessed a lot. But how can I find out if they're doing more harm than good?
...
I'm getting this error when I try to call the mail() function.
I tried adding ini_set('memory_limit', '64m') to my index.php file - Which include()'s all other files into that - But it didn't fix it.
I then tried adding a php.ini file into the root directory (where index.php resides) with the contents memory_limit = 64M which then gave...
Alright, see if I can pick your brains from you all.
I'm currently working on a project where all the information comes from different clients, the only thing in common is that the received data is done with excel. The excel spread sheet that they present is just a bunch of references and codes, and the problem than I'm facing is that...
I've tried these:
<?php
$r = shell_exec('sudo -u root -S /etc/init.d/apache2 restart < /home/$user/passfile');
echo $rin;
?>
(password on passfile) DIDNT GET
<?php
(php$output4=shell_exec('echo "$x" | whoami 1>/dev/null && sudo /etc/init.d/ssh restart');
?>
<html>
<body>
<script type="text/javascript">
x=prompt(...
$result = mysql_query("SELECT
car.id car_id,
FROM
car
WHERE car.id= $id ");
How can I echo the query above?
...
I was wondering...if any coding expert out there could spare a few minutes to help me out with a tiny problem? It's something to do with the alt image text.
You see, whenever I upload an image, the alt text for it doesn't display properly. You can have a look here ==> http://buywerewolfcostume.com/. This is how it's displaying in the so...
Hello to all,
I was downloaded the phpeclipse from the eclipse downloads.
i have wamp in my machine(c:/wamp/).
i set path like c:/wamp/php/php.exe in system environmental varariables path.
now i want to run php script from phpeclipse.
what i have to do to run php script.
is there any runconfigurations in the phpeclipse.
if exists....
I am totally new to JavaScript or jQuery. Actually I am developing a web application under which I need to access some data in url format and I want to display a small popup window on mouseover event on this url and on occurrence of this event, url will pass three different php data IDs to javascript. Then small popup window will get som...
i am dynamically generating a html page using php in which i am generating a dropdown combo which have attributes id and value, on selection of any option i want to get the value and id of selected option using js.
echo "";
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "<option id='".$row['Id']."' value='".$...
I have users uploading DOCX files which I make available for download. The issues we have been experiencing is the unknown mime types of DOCX files which causes IE to open these docs as Zip files.
It is running on a Windows/IIS server.
Because this is a shared host, I cannot change any server settings.
I was thinking that I could just...
I am having problems in rendering unicode glyphs ( language : Malayalam, Tamil and Hindi) with PHP GD library. Is this something related to the rendering engine of GD library? Any workarounds available ?
...
I am creating a order table. my problem I am having is with my form field for each row/record with in the table.
<input type="text" size="4" name="buy_item['2']" value="0">
I am defining each identifier by a similar syntax
buy_item[ item number ]
my problem is when the entire form is sent to through the post request how do I know...
Is this an operator? I can't find it here.
What does the part "$_POST as $response_id => $response" in the following code means?
// If the questionnaire form has been submitted, write the form responses to the database
if (isset($_POST['submit'])) {
// Write the questionnaire response rows to the response table
foreach ($_P...