php

Php mysqli and stored-procedure

I have a stored procedure: Create procedure news(in dt datetime,in title varchar(10),in desc varchar(200)) Begin Insert into news values (dt,title,desc); End Now my php: $db = new mysqli("","","",""); $dt = $_POST['date']; $ttl = $_POST['title']; $desc = $_POST['descrip']; $sql = $db->query("CALL news('$dt','$ttl','$desc')"); if($s...

PHP Application Flow Graph (or function call graph)

Happens that I've ended up working on a big PHP program and I need a program (or easy to install script) which draws a flow control/call graph of a PHP application (ie; must work over multiple PHP files). Already saw stuff like Graphviz, not sure which one works for PHP? Any suggestions? Cheers! ...

What's the ORM used by yii?

Did they implement it themselves? ...

How do I set up mod rewrite to do this?

Hi guys heres the scene - I'm building a web application which basically creates accounts for all users. Currently its setup like this the file structure: root/index.php root/someotherfile.php root/images/image-sub-folder/image.jpg root/js/somejs.js When users create an account they choose a fixed group name and then users can join th...

Twitter Oauth home timeline display with php

$hometime= $Twitter->get_statusesHome_timeline(); Fatal error: Uncaught exception 'Exception' with message 'SimpleXMLElement::__construct() expects parameter 1 to be string <?php include 'EpiCurl.php'; include 'EpiOAuth.php'; include 'EpiTwitter.php'; include 'key.php'; $Twitter = new EpiTwitter...

special characters to html entity using php

I want to convert special characters like ñ, Ñ to htmlentities using php. I tried using htmlentities, but instead of returning "&ntilde" for its value it returns "ñ" as its value. ...

Smarty/PHP loop not being passed to IE(Pc) or Chrome/FF(Mac)

Hi, I've been working on a site that has a lot of PHP/Smarty involved, I've been asked to re-skin a webstore checkout process, but during this we've discovered this issue. This particular quirk is one part of a tax calculation that doesn't get sent to the browser in IE for PC and Chrome/FF for the Mac. It's NOT in the output source in th...

How to get an array to check in the in_array function? See description Below...

I am fetching the data using mysql_fetch_array like : while($row = mysql_fetch_array($select)) { $tables[] =$row; } Now i need this $tables array as one dimensional array only, so that i can use it in if(in_array($val['table_name'],$tables)) { //Some Code } to check for whether the $val['table_name'] is ...

Doctrine : many to many with a date of assignation in the refclass

residentSector: columns: id_resident_sector: type: integer primary: true autoincrement: true id_resident: type: integer(8) id: type: integer(8) date: type: timestamp residents: c...

Php run cronjobs

How can i run an cron job from php, and the cron to start in that moment? I have a sitemap script, and i want to turn to a sitemap link, without waiting for him to do his job, to send information to call my job horn Sitemap. Sorry my English ...

access model from view in codeigniter?

can anyone tell me how do i access model from view in codeigniter? ...

PHP frameworks similar to one in Python like Django

Has anyone used Php frameworks just like we have in Python(Django) and Java(Spring). I want to use something which has end to end solutions. ORM tools, transaction mangement, logging etc. I am not sure how Cake is? But, I am looking something very similar to Django in Php. ...

PHP uploads file - enctype="multipart/form-data" issue

Hi all, I have this upload code. there are no problem running it individually, but when i try to add into my other codes, it did not get the $_files parameter. Im guessing it was becoz of enctype="multipart/form-data" in the form tag, based on this post: http://stackoverflow.com/questions/1695246/why-file-upload-didnt-work-without...

how to use two forms and sumit once

hey guys is it possible to have two forms with two submit buttons but when i click on the button then it saves both forms input fields im concerning to solve this in php /mysql i tried my own way : if ((isset($_POST["form-1"])) && (isset($_POST["form-2"])) { //SQL Insertion } thanks in advance ...

Problem with running php script using mysql on tomcat

I am using tomcat 6 with JavaBridge. I have stored my php script in the following location. C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\test.php In test.php I am using curl and mysql. The php.ini in JavaBridge is stored in the following location C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\WEB-INF\cgi...

how is this dropdown working ? on selection it displays another record.

this website here: when you select a dropdown the record based on your selection is displayed. ive tried copying it to localhost and it wont work. ive also tryed reading its headers and cant seem to figure out how javascript is making the records display on selection. i do understand that its extension isnt really html and might be anot...

[PHP] How to pass array as multiple parameters to function?

I have a parameters array: $params[1] = 'param1'; $params[2] = 'param2'; $params[3] = 'param3'; ... $params[N] = 'paramN'; I have a caller to various functions: $method->$function( $params ); How can I parse the $params array, so multiple (and unlimited) parameters can be passed to any function: $method->$function( $params[1], $pa...

Need to add an array into another array at a specified key value

Ok, I have an array like so, but it's not guaranteed to be laid out in this order all of the time... $array = array( 'sadness' => array( 'info' => 'some info', 'info2' => 'more info', 'value' => 'value', ), 'happiness' => array( 'info' => 'some info', 'info2' => 'more info', 'v...

Extending a module multiple times in Drupal

I created a nice extension for Drupal based on the webform module. Now, I need to implement different functionality that is also based on the webform module. What is the best way to do this? ...

Form values appear blank when submitting to the database - Drupal FormAPI

Hello, I have been working on this drupal form API script for past week and half. to give an insight into my problem.. the form below merely lists a host of database records which contain 5 individual scoring ranks. (mind, action, relationship, language and IT). this code is apart of my own custom module where all values are listed fro...