« first day (219 days earlier)      last day (91 days later) » 

12:00 PM
0
Q: php - remove extra whitespace

sulaimanI got the following string, the result from decoding hex to string, " g e t s m h " but the result should be, "get smh" I believe it can be done using preg_replace, but I have no idea with regex. Kindly advise. Thanks.

0
Q: Reference file in higher directory?

AndrewMy file structure is like this: filethatineed.html folder index.php In index.php, I want to reference the HTML file. Here's what I'd have if it were in the same directory: <?php include('filethatineed.html');?> How could i change this to include the file when it's in the higher directo...

-1
Q: i want that if a particular column is not updated in update query it should return last value instead in my query it updates column with blank

user2819264here is php code i have to update text and image at one click and if i update image only text column sets to blank or vice versa <?php include("connection.php"); $id=$_GET['id']; $query=mysql_query("select * from bgimage where id='$id'"); $row=mysql_fetch_array($query); $a=$row['image']; $...

0
Q: Post form data to another PHP page, Get the JSON and direct based on parsing the JSON

PaulieOk So I have a basic login page with a form: <form name="register" class="form-horizontal" id="signup" onsubmit="return validateForm(this);" action="check.php"> <div class="control-group input-append"> <label for="text" class="control-label">Name</label> ...

0
Q: WooCommerce Plugin or script - Bulk orders enquiries

user1871802I'm wondering if it's possible to have a section of my site that retailers can log into to make bulk orders. It wouldn't need to have pricing (because I might have negotiated different prices with different retailers). What it would need is simply a place where they can make an order on a checkli...

0
Q: time not being recorded in mysql database

crmI am attempting to record a time (hours:mins:secs) chosen by the user via select form. The other data posted via the form is entered correctly in the database but the "start time" is being recorded as 0000-00-00 00:00:00. User selects the start time here: <p >Start time (24hrs): ...

0
Q: Executing PHP in files folder, Nginx

James JoomerI have a Joomla installed and need to allow users run one PHP file from /media folder. How to do it? With current config, Nginx returnes this PHP as file for download, without executing it. Here is a part of my config: location ~* /media { allow all; expires 1d; } location /media/di...

0
Q: Wordpress: list all the URLs / routes

EmersonI want to see a list of all the (rewritten) URLs that my WP site is using. Basically, if you're familiar with Rails, I want rake routes... but for Wordpress. If it matters, the reason is this. I'm writing code to exist next to an existing Wordpress site and I keep bumping against a problem where...

0
Q: How to show multiple form in form page in Symfony2 Backend

Kunwar Siddharth SinghI am using Sonata Admin in Symfony2. And my Question is :- How to create multiple form in form page where I select one or more form in form page and selected form in create page show in front end page. Under Create Page form, We need 4 additional options. They will be displayed as the follow...

0
Q: Simple Events Calendar - Show custom time/date

mb1337Have some question for the "Simple events calendar" for Wordpress - I want to customize the time and date I've been customized the plugin ALOT to get it the way i want. That's great! But i want another time and date to be displayed. Hope this is possible http://erduheltvaek.dk/sjaelestedet/kal...

1
Q: Undefined Index while uploading file

Ashish SinghNotice: Undefined index: file in C:\xampp\htdocs\Project\Template1\users\index.php on line 21 Notice: Undefined index: file in C:\xampp\htdocs\Project\Template1\users\index.php on line 23 please uploaded How to get rid of it? Html Code: <form action="index.php" method="post" enctype="multipa...

0
Q: How to append plain html (from other file) to HTML DOM element in PHP?

user2793410I have the main document created with DOM server-side using PHP. And I have to include some pieces of PHP/HTML without DOM. Example. There is file form.php containing a form <form action="" method="post"> <input type="text" name="firstname" id="firstnameid" /><br/> <input type="submit" nam...

0
Q: Boundries latlong for a locality in google map api

azarmfaI am having more than 15000 localities latlong All that i want the boundary(latlong) information of every individual locality from googlemaps api. Reason : i just wanted to check whether a particular latlong is inside a locality. I am able to get the boundary now in rectagular format i.e, two bo...

0
Q: php - count total num rows inside while loop

oliverbjI've got this piece of code: $i=0; $start_date = date("Y/m/d"); $end_date = date('Y/m/d', strtotime($start_date . " -7 days")); while($days7=mysql_fetch_assoc($q)): $next_date = strtotime($i--." days", strtotime($start_date)); $date = date("Y/m/d",$nex...

0
Q: combobox directs to splash.php

Gary LeatherIn one of my php pages I have a combobox. It updates a list on the page according to selected value. But whenever i choose a value, the splash.php is opened. Also, I have two apache's on two different server machines. In one of them, there is no such problem.

0
Q: Meta keywords with variable on blogger

masterstation78i will try define meta keywords on templates blogger for each post. I use label of post like as keywords. <b:if cond='data:post.labels'> <b:loop values='data:post.labels' var='label'> <a expr:href='data:label.url' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast !=

0
Q: Building Android app for running PHP and MySQL on Android Tablet

ManuI want to run PHP + MySQL server on my Android Device. People seem to suggest applications like KSWeb and Bit Web. Other solutions suggested are that I install an application that allows me to run Linux on Android. This requires the Android Device to be rooted. :( I don't want to use any other ...

0
Q: Capifony multistage/multiserver not working properly

alex.dominteI am using capifony with a symfony 2.3 application. I configured for the first server and everything worked fine, But when I added a staging server following these instructions, http://capifony.org/cookbook/using-the-multistage-extension.html I have to force HOSTS=mystaginghost.com to each cap ...

0
Q: php and Mysql: view arabic data from sql database

mohamed esmaelhey i have this database image of database and i am using this code connect.php <?php $con=mysqli_connect("localhost","root","","dbase"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } ?> view.php <!DOCTYPE ht...

1
Q: how to use ajax response data in php

HrijuI am having problem with response data. I want to use response data in my php file. I want to assign them to a php variable. here is the ajax code in insert.php file. function change(){ var tp=$('#choose').val(); var country_val=$('#country_filter').val(); //alert(country_val); ...

0
Q: I am conducting online test , everything is done. But my Auto Submit timer is not working.

user2787527Structure is like this. User logs in with is credentials.(userdetails.php) If successful enter email_ id (helps in creating table of particular user) Question 1 : dispalys IF user clicks on Next Question 2 : displays so on problem is that it should auto...

0
Q: Php MySQL valid query with like and visable

Mantykora 7how to create a valid query to mysql database? how to add WHERE visible = 1 to this query SELECT * FROM photographs WHERE caption like %colname% or caption_2 like %colname%

0
Q: PHP sort array via a characters in middle of string

user1470681new here and need some help. I have a array with the following elements. 215/75R17.5 235/75R17.5 8.25R16 7.00R16 11R22.5 7.50R16 Now what i need to figure out is how I could re-order the elements via the number after the "R" and then the first part. so to this: 7.00R16 7.50R16 8.25R16 11R22...

0
Q: Apache segfaults due to PHP

meijuhWhen running a particular piece of PHP code I am getting a segmentation fault in Apache2. The exact error is Program terminated with signal 11, Segmentation fault. After enabling core dumps and using sudo gdb apache2 -core /tmp/apache2-gdb-dump/core to analyze the core dump I got the result which...

-1
Q: PHP web programming on html forms

user2819411I have already made a sign up form for my website, but I need to make the fields required so I used action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" because www.3schools.com said that when fields are not submitted the error message will be come up. But when a user filled all the fie...

-2
Q: post data reuturnd true data but alert show wrong result : why?

barnameha.netHelp me to slove this code var fileexists=0; var name="sample.txt"; $.post("aaa.php?do=checkfileexists",{filename:name},function(data) { if ((data == "0000") || (data == "0000")) // file not exist . { fileexists=0; } if ((data == "1111") || (data == "1111")) // file exist . { fileexist...

0
Q: Included file from another directory can't locate CSS file or images?

AndrewI asked in another question about how to reference a file in a higher directory, and the answer is: <?php include('../filethatineed.html');?> The problem now is that filethatineed.html can't find it's CSS file. If it's in the same directory as my file that includes it, this works fine. But whe...

0
Q: How can I make sure DynamoDB putItem was successful

ufucukI'm using amazon sdk v2 and using aws factory for dynamoDB and I have a simple putItem operation but I have no idea how I can make sure putItem was successful or not because putItem returns a Model which doesnt contain any information about status of operation. Any idea? Here is my code class Dy...

0
Q: make cake php validation form to contact form

MõÄ¥ãmêð Mõĥşêñhello i want make validation form in cakephp my code form is: view <div class="well"> <?php echo $this->Form->create(false); echo $this->Form->input('name', array('label' => 'name ')); echo $this->Form->input('PHONE_NUMBER', array('label' => 'PHONE_NUMBER ')); echo $this->Form->input('EMAIL',...

0
Q: Html tags showing when using SCEditor

user2590369I am making a website where one can log in and change text on the website through an admin center. It is very simple and everything is working just fine, but now that I installed a SCEditor so that the admin can edit the text as they like, now after editing any text on the editor, the text appear...

0
Q: How to call a method after another method in one line

OthmanI was looking to some php codes, and I saw an object that will call multiple methods in the same line. I've tried to understand how to do it, and why we need to use it? $object->foo("Text")->anotherFoo()->bar("Aloha") What this styling called? and what is the best way to use it in php appli...

0
Q: Connection Error PHP with SQL server 2012

Ghulam RasoolI'm facing an issue in connection PHP with SQL server 2012. Configured and (.dll) files and configured them. In SQL server management studio i create a database named it "helloworld". My SQL server authentication mode is window. The issue is connection established on system database like "maste...

0
Q: mysqli_fetch loop not working

superTrampI have a loop inside other loop which is not working, this is the code: while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['rowId'] . "</td>"; echo "<td>" . $row['startDate'] . "</td>"; echo "<td>" . $row['eventName'] . "</td>"; echo "<td>" . $...

0
Q: Database switch with BindModel in cakePHP

Sanchit SinglaI'm working on application in cake PHP which uses multiple database. I need to fetch data from multiple tables and i'm using bindModel for their association. But bindModel does not allow database switch functionality, I need to access data from multiple databases.If anyone has done this type of a...

0
Q: Webshop 2D or 3D item preview via webcam

hdmcontI am looking for a web tool, plugin, API or PHP that enables me to display an item on my website and allow others to try it on via webcam. Example: You shop for an item such as a shirt or hat, then you click to try it on, a webcam session open and so it enables you to pick up the item and try it...

0
Q: How to adjust print options through code?

Amol ChakaneI have a ticket booking system in joomla. When user clicks on ticket link a ticket is shown on the site. I am using a barcode.php to generate barcode image for ticket number. Now there are 2 scenarios I used to print ticket. When I print that ticket using window.print() or Ctrl+P 2 pages g...

-1
Q: how do I get to display the date and time specified, ie at 8-10 am?

honokasuPseudocode: user selects a date, then the data is displayed based on the date chosen earlier, with the fixed time between the hours of 8-10 AM. Users simply select the date, while the time is set fix, i.e. at 8-10 AM. I use: $query=mysql_query("select fe1a.*,fe1b.* from fe1a, fe1b where fe2a...

0
Q: Jquery Cropzoom - Change jpg background color

JavierGood afternoon. I'm using in Pluggin "cropzoom" in Jquery to cut and resize of imágnes. I cut perfectly but I need to change the background color of the generated image. Does anyone know how to change that background color in this pluggin? Thanks and regards.

-2
Q: Normalized or Non-Normlized Db Design for CakePhp

xy_I am on a project and planning to code with CakePhp. I am also kind of new with CakePhp. I am little confused about database design and need suggestions from experts. This project will be used by a hosting company. They offers domain registration, hosting, vps, ssl and some other products. This...

0
Q: Cakephp application version control

Britto ThatheyuI have created a Cakephp application, now I want to maintain different version of my application. Please share your thoughts on this.

-1
Q: How to prevent direct access to php pages through URL

MahiloDaiI have index.php that include pages like <?php define('MyConst', TRUE); include_once('template/header.php'); if (!empty($_GET['action'])) { $action = $_GET['action']; $action = basename($action); include("template/$action.php"); } else { include("template/main.php"...

0
Q: How can i decide that which design pattern will be used for my Video Conferencing System and What are the Classes and Interfaces should be there?

AshwinPI have question regarding design pattern. How can I know that which design pattern will be useful for certain modules. for example: I am creating the Video Conferencing system in which for Database connection I have used the Singleton design pattern for one instance at the same time of databas...

0
Q: PHP function clarification

CarondimonioI am a beginner so probably this will be an easy answer. I have this function: function str_space_uppercase($string){ $tmp_string = $string; preg_replace('/(?<! )(?<!^)(?<![A-Z])[A-Z]/', ' $0' , $tmp_string); return $tmp_string; } When I use it (ex: str_space_uppercase('ExampleSTri...

0
Q: PHP - Parse error: syntax error, unexpected ')'

Zak Parkerrecently I have gotten this error: Parse error: syntax error, unexpected ')' in /home/aps/public_html/wp-content/themes/Valor/functions.php on line 54 I have looked at this line and found no problems, and ran it through a PHP error code finder. Just to be sure, I copied the code from the funct...

0
Q: Fatal error: Call to undefined function: imagejpeg() on Heroku PHP. Fix?

user2656127So, I am getting the following error whilst trying to upload images on my Heroku site (PHP). Fatal error: Call to undefined function: imagejpeg() It refers to the following line in my AmazonS3Handler.php file. //build the jpeg imagejpeg($destinationImage); Any ideas on how I coul...

0
Q: Anonymous functions - good or bad

Marty WallaceI am tending to use anonymous functions now for small simple loops such as the following: $property = array_filter($myBigObject, function($objectProperty) { return $myBigObject->getProperty() != 'invalid' ? $myBigObject->getProperty() : false; }); which could also obviously be written in a...

1
Q: How to upload folders from uploadify?

Aiman Khani am new to php and i am in learning phase. i am using uploadify to upload files and it is working fine. But now what i want is that when user selects specific file then all files and folders placed in the directory will be uploaded to server. I am unable to find any method of this but what i fou...

1
Q: php get object from url

RaoI have a url like below, which I got after doing jQuery.param( jObj ); on my js obj, Now I want to get the article_id if from this url in my php script. www.url.com/article?data%5Barticle_id%5D=42 in other from the url is www.url.com/article?data[article_id]=42

-1
Q: How to add javascript validation for Poll form in drupal 7?

JayeshHere i am display poll form in Quick tab and add new poll allow to users. so issue is that, inside the tab i want to add own javascript validations. Thanks

-1
Q: how to sort multi array by sub value

user1080247i have flights array..and i want to sort all flights by lowest totalamount for each flight [0] => stdClass Object ( [ecpcRank] => 0 [inboundInfo] => stdClass Object ( [aircraftTypes] => Array ( ...

-1
Q: Ajax image upload refresh the page?

Irfan AhmedI am wondering that , why my page is getting refresh while i am using ajax to upload image, i tried to debug the problem, but did'nt find, Here is the Controller function, public function uploadImage() { if(isset($_FILES['header_image'])) { $config['upload_path'] = 'public/images/...

0
Q: Zend Form Validate URL

Shahbazi m trying to validate URL in Zend Framework2 through Regex Pattern, but now i need that if i left blank the URL field it should not checke vlaidation, my code is array( 'name' => 'programurl1', 'attributes' => array( 'type' => 'text', 'error_msg' => 'Enter Valid Program URL 1'...

0
Q: Access array using dynamic path

Abhishek SanghviI have an issue in accessing the array in php. $path = ['a']['b']['c']; $value = $array.$path; In the above piece of code I have an multidimensional array named $array. $path is a dynamic value which I would get from database. Now I want to retrieve the value from $array using $path but I ...

0
Q: Display, sort and filter posts from a relationship filed (Podscms)

ThomasI've got some custom post types set up in Wordpress using Pods and linking them using relationship fields. Now I'd like to display (and link to) the related custom posts 'postB' from a single post 'postA'. I also just want to display those posts which got a date in the future, which is also store...

0
Q: Get Array data outside while loop - php

user2018824I want to create a function to pass the values of the weeks of the year and starting date of that week. I only get output while I put the print_r($week_array) inside the while loop (which is not useful) I need to be able to get the array outside the loop. I can't see here what is happening.... Th...

0
Q: ccavnue not redirect with value on my website

avinash <?php $currency = $_SESSION['cart'][0]['o_currency']; if($currency_sign == '&#x20B9;') { $Merchant_Id = "merchant_id_enter"; $Amount = 1; $Order_Id = $allDetails[0]['o_id_text'];//unique Id that should be passed to paym...

0
Q: File downloading code error

anil mauryaI have a code to write a text file and also download the created file. but this code is not working properly. file is downloadin but worng content like. and output should be PHP is fun! what errors? please help me! `$fileName = 'HSC_Commission.txt';` `$fp = fopen($fileName, "w");` fwrite($fp...

0
Q: Mamp 2.2 and intl.so

BarnoI have Mamp 2.2 with php 5.5.3 and Mac osx 10.8.5 i don't find intl.so in my modules and on web, and this is recommendations of symfony project before i use this (https://github.com/josegonzalez/homebrew-php) but now i can't use php55 brew options php55 Error: No available formula for php55 ...

2
Q: Does not work <!--more--> in wordpress

IvanI am trying use the <!--more--> in WP, but its does not work. I'm using Wordpress 3.6.1. What is the problem? Text in redactor of post: Abc<!--more-->cba How I use: <?php $args = array( 'posts_per_page' => 10, 'order'=> 'ASC', 'orderby' => 'title' ); $postslist = get_posts( $args ); ...

0
Q: PHP include with pure HTML only

PedroI'd like to know the opinion of you PHP savvys on this one. I'm still a very novice programmer, so bare with me: Is it safe/correct to use PHP include of PHP files with pure HTML content inside them)? I'm asking this because I had a bitter experience with AJAX load() some months ago, not load...

0
Q: Graph API event search pagination

Ian PIn a nutshell i'm looking to find out how to paginate between a public event search on the graph API. Using the graph API explorer i'm performing a simple event query: /search?limit=500&type=event&q=party This brings back results and two paging entries, previous and next, however using this qu...

0
Q: Best way for dynamic pages

user2412672I want to ask which approach of showing content you prefer in your websites. assuming that in second way head, content and footer is contained in functions.php functions.

-1
Q: get value from some input checkboxes and insert into mysql

Razvan BeckerI have many checkboxes and I need to find what checkbox is checked and the make a select query with these: Note:I have many columns in mysql table so i need to know how autocomplete with fields the select statement by checkboxes (like advance search with multiple options) Ex: <input type='checkb...

0
Q: Hide Div title if there's no content

Khazd0rfI'm very newbie regarding PHP, I'm trying to configure my wordpress Loop. I figured out how to display my customfield in my template, I manually added a title before my taxonomy and custom fields, but I'd like it doesn't show if the taxonomy is empty. Here is the code: <div class="cu...

-2
Q: PhProblems - pharse error?

user2818691When running this code i got the followning error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/chatvik/public_html/index.php on line 115 what is wrong? I cant find it Row 61-129: else { // if they are not logged in echo" <!DOCTYPE HTML PUBLI...

0
Q: How to handle ?_escaped_fragment_= for AJAX crawlers?

Overdriven FallI'm struggling to make AJAX-based website SEO-friendly. As recommended in tutorials on the web, I've added "pretty" href attributes to links: <a href="#!site=contact" data-id="contact" class="navlink">контакт</a> and, in a div where content is loaded with AJAX by default, a PHP script for crawler...

0
Q: tables are not aligning to the top of the page

TechLifeForgottenmy code: achieved with the following code : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <...

0
Q: Dynamic Quantity in Gravity Forms

SusanI am hoping there are some Gravity Forms enthusiasts who might have some suggestions for me here. I am creating a registration form where the user can purchase multiple passes for an event. I have six "products" available, each a different type of registration: 1-Day Expo Pass 2-Day Expo Pass ...

1
Q: delete duplicate rows in mysql keep XX rows

MacAnonyI want to delete duplicate rows, but not all. I want keep latest 10 duplicate rows and delete all other. I use below code but it delete all record and keep one only.Please help me on this. DELETE FROM `history` WHERE id NOT IN (SELECT * FROM (SELECT MIN(n.id) FROM history n GROUP BY n.url) x)`

0
Q: Facebook API for websites and security, authentication

AthanatosI am trying to integrate our DB with the facebook API , really new on this so I would appreciate some help. Please have a look on the code below. So on the php side we verify that the user has logged in in the past by checking our DB to see if the email exists and then perform the functions of a...

0
Q: MySQL+PHP array_count_values

oboshtoI need to find the most common value (not 0) from arrays. My code: include ("db.php"); $query = "SELECT poll1 FROM names"; $res = mysql_query($query) or die(mysql_error()); while ($row = mysql_fetch_array($res)) { echo $row['poll1']; } And echo results (minimum value...

0
Q: how to save the bunker level difference to data base (previous day bunker_level)- today bunker level. how to write code in php

user2819641how to save the bunker level difference to data base (previous day bunker_level)- today bunker level. how to write code in php bunker_level_difference= ????????????????????????????????????????? this my part of the code $bunkerlevel_unit1_a = $_POST["bunkerlevel_unit1_a"]; $bunkerleve...

0
Q: How to get local (LAN) IP address?

Maulik patelI need to LAN IP address for cheeking lo-gin authentication. i.e. who login from whose Machine. my server is LINUX server. If not possible then I have to distinguish that among 100 machine which connected in LAN, and if i logged-in among one of them then how can i find from which machine i logg...

0
Q: Passing Two Values to PHP File Via AJAX

Arw50452right now I'm successfully passing one value to a Bootstrap modal via AJAX, however when I attempt to pass a second value my code stops working. JavaScript function claimOrder(str, stre){ if (str=="") { document.getElementById("txtH").innerHTML="Blank Order ID"; return; } if (stre=="") { docume...

0
Q: pchart displays VOID instead of not drawing the line

Acelasi EuSo I have this code : if($farateze_dec == 0 or $farateze_dec == NULL) { $mediageneraladecembrie = VOID; } elseif($cuteze_dec == 9 or $cuteze_dec == NULL) { $mediageneraladecembrie = VOID; } else { $mediagenerala...

0
Q: Forcing MySQL CHAR() column to require all digits or auto left pad with zeros

user1032531I am designing a table which stores 5 digit US zipcodes without extensions. It looks like the leading contenders are CHAR(5) and MEDIUMINT (5) UNSIGNED ZEROFILL. Reference: Mysql Datatype for US Zip (Postal Codes) What is the best column type for a United States ZIP code? Padding the beginnin...

0
Q: IF function not working

user2758571I have these POST vars: $user_f = "user"; $pass_f = "pass"; and this MYSQL data: $u_user = "user; $u_pass = "pass"; $u_id = "0"; $u_email = "email@try.com"; this is the code: echo $user_f." ".$pass_f; list($u_id, $u_user, $u_pass, $u_email) = getUserInfo($user_f); echo "<br>

0
Q: jquery using ajax to send data and save in php

user1868185Good day im am trying to send or get data from a form and then using jquery and then ajax to send the data into a php page that should save it in the database how can i do it in jquery and use ajax to do it, any help will do and thanks! HTML page 1 that will use jquery ajax to send data into the...

 
1:43 PM
-1
Q: datatable column filter not showing up

user1552172I have the column filter js on my page along with my datatable and everything is coming up and working no errors in the console, but the inputs at the bottom are not there after the smoothness loads. <body> <div id="stable" style=" margin-left: 2%; margin-right: 2%; display: none"> <...

0
Q: what is difference between view and task in joomla 2.5 and what is url structure in joomla 2.5?

PriyankI'm new to joomla2.5 and i'm working on a form component that will simple get data from user and save to database but i have confusion regarding form redirect. please tell me what means of this: index.php?option=com_users&task=registration.register please define me "task=registration.register"...

0
Q: formgrabber how can i make it out put variable to php script on remote server instead of using fiddler 2

user2795562Okay so I have the form grabber source in c# code. I have opened the main.c source with visual studio 2010 I then proceed to attaching the file to a process (firefox). I then installed and ran fiddler2 and got all the http info post data headers ect. Now I know the script is functional I would l...

0
Q: Geting xsi:type from server response

RadmiloI get response from server which has 0 or more transactions of different types in each response.Each transaction type is extension of base transaction type. Different transaction types are processed differently. Is there a way in php to get transaction type for each of transactions in response (...

1
Q: contact form in mail not returning values

Mohammad FaisalI'm using CKEditor to create a html mailer in which a contact form is being submitted. The problem is, there is no value being received on submission of form. Contact Form in Mail (code) <form action="http://techindiainfotech.com/mail.php" method="post" name="test"> <p>Your Name: <input max...

0
Q: Setup existing Zend Project to Pimcore

NextarIm asking if its possible to update an existing Zend Framework project which is fully developed to a Pimcore project?

0
Q: Can I use reCaptcha on PHP and ASP?

Juan GimenezTo be more clear, I have different forms on the website (it's my college's website), where they have all the forms on PHP but hey use an ASP engine to send all the info to the email assigned. My question is: on the Google website about the captcha it says to use the second code on a verify.php pa...

-1
Q: Laravel 4 - How to validate the uploaded file type of CSV?

ericbaeI'm trying to upload a CSV file via Laravel. I want to make sure that the file type is "CSV". $input = Input::all(); $rules = array('csv_file' => 'mimes:csv|max:5000|required'); $validation = Validator::make($input, $rules); But the above is not working. Is it something else?

0
Q: Force WordPress to ignore the w url parameter

aghoshxSay, I have a WordPress installation running at example.com and have the following url http://example.com/blah?w=100 Now, I want WordPress to ignore the w=100 part because, every time I pass a numeric argument to w, WordPress redirects me to the single page, I assume this has something to do w...

0
Q: Inserting text into a text field when a div class is clicked

estXcrewI Am creating this submission system right now. I want to create it so that it inserts some text (like [b][/b]) when a div is clicked. This is the sample we're working with: <div class="insertBBC" title="Bold Text" onClick="moveNumbers([b][/b])" id="bold"> <p>B</p> ...

0
Q: Re-writing Dynamic URL with HTACCESS

KevlarI've been reading a few tutorials online and searched a couple of other questions here but I cant seem to grasp the re-writing of dynamic URLS using the HTACCESS file. I have URLs like: products.php?cat=2 products.php?cat=3 products.php?cat=4 I would like them to just say products/2 for examp...

0
Q: Escaping characters in regular expressions in PHP

Paul ByrneThe following returns true: $bool1 = preg_match("/5/", "Your bill is $5.00 dude"); var_dump($bool1); I expect this because '5' is in the string.But the following returns false: $bool1 = preg_match("/\$5\./", "Your bill is $5.00 dude"); var_dump($bool1); I thought I was escaping the $ correc...

1
Q: Ideas for cleaner solution to an issue

FaeryI'm not sure if this question is for here, so if it's not, please excuse me, I will delete it. I'm using Symfony2, Twig and Doctrine. I'm working on a ToDo App as an excercise and the web page looks like this: Today (5 tasks) - Work (2 tasks) - clean the desk - write report - Home (3 task) ...

0
Q: Codeception Functional Testing Click Issues

Eric FleddermanI'm having an issue with functional testing in Codeception. It seems that the testing will typically pass a 'seeElement' assertion, but then fail on a 'click' assertion that is targeting the same element. HTML: <input class="btn btn-primary" id="client" type="submit" value="Client Name"> Cod...

0
Q: which db connection will be used if connection object not provided in query?

user991554$db1 = mysql_connect('host1', 'user', 'user'); $db2 = mysql_connect('host2', 'user', 'user', true); mysql_select_db('db1', $db1); mysql_select_db('db2', $db2); mysql_query("select * from table1"); which db connection will be used if connection object not provided in query?

0
Q: attempting to loop through images to save and record each indivdually

crmI am working on a method that saves and records the images that users select and post. Heres my method. public function setEventImages($event_id){ foreach($_FILES['event-images']['tmp_name'] as $tmp_name){ var_dump($imgName = $this->imgPath . $this->random_name . $_...

0
Q: Compare two arrays without sort them

ravisoniI'm trying solving a problem where i need to check if the arrays are same no matter how they are sorted i cannot use sorting because it add extra over head to time this function is taking in answering. I am currently using array_diff_assoc $arr1 = array(1,2,3); $arr2 = array(3,2,1); $result =...

0
Q: Codeigniter session generates new session on every page

AH.On every page I see that new session is generated with null userdata On model constructor $this->config->set_item('sess_table_name', 'xx_sessions'); Because I want to store this session in another table because the other session table is being used for another login activity Login functio...

0
Q: SOAP-ERROR: Parsing WSDL: Couldn't bind to service

PandanotbreathingI have a problem. I need to make a SOAP service and I have next code: soap.wsdl <?xml version="1.0" ?> <definitions xmlns:tns="http://current_test/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap....

0
Q: Sending Multiple Images/File via FormData

John CargoI am trying to send Muitple images one by one via FormData using jQuery-Ajax. But I am getting few error, actually lots of error :- My Code :- <div class="control-group"> <label class="control-label" for="mImage">Image</label> <div class="controls"> <input id="myfile1" class="bt...

0
Q: Fatal Error when calling getChildrenCategories on a Flat Category Collection in Magento

PhilBBasically, I'm trying to display a list of the URL, thumbnail, and name of the top categories in our Magento store in a (core/template) block on our home page. We're using Magento Enterprise 1.12.0.2, though I think the code referenced would also apply to the Community Edition. To Load the Categ...

0
Q: PHP OOP Code understanding

emjayI have to understand a script to make some additions and I have some short questions. There are these few lines: if(!isset($GLOBALS['DB'])){ $DB = new System\Database\MySQL(DB_SERVER,DB_USER,DB_PASSWORD,DB_NAME,DB_PORT); } new System\SessionHandler(); I don't understand which path System...

0
Q: Mailing System for beginners

Haziq SheikhI need Help, i have got a project to make Mailing System. I need to make a database where Recived and sent emails should be saved! ( like hotmail and others ) and then a web based App where i can access my data base !! how to do it ? and how to start ?

0
Q: Replace value in HTML by comparing against XML value

JGibbI have some HTML that is full of links that look like the following http://lwns-mobile:3128/Atr/?p=322 throughout an HTML page. I need to take the variable from that url (322) and compare it against an XML file that contains the actual file name <list> <num>322<num> <file>thisVideo.mp4<...

-3
Q: how to post job on monster portal from our php sites

user2311007I wanted to know how we can post the jobs from our php site to monster job portal. I have read the documentation but didn't understand it.and if you have any code please help me

0
Q: active record installation & setup through composer packagist

user729229here are the steps i took towards implementing active record through composer installation 1 i got fresh install of codeigniter 2.1.4 2installed an active record the following packagist library using composer https://packagist.org/packages/Pupcake/PHPActiveRecord 3 i opened my index.php with...

0
Q: Access a file thru server path

kevinandradaSetup: The server path of the website is located at /var/www/website/. Here I have index.php file that's using jPlayer (audio player plugin) to play MP3s. Issue: I need to access the MP3 files from /gdrive/MP3s/ (server path). E.g. /gdrive/MP3s/sample.mp3 On the code (index.php), I tried putt...

0
Q: how to display only the content with that id in html page?

Csharp_NewbieI have html files with 100 lines of proverbs in that i have id for all proverbs. For example: <a id="1">1. Proverb ...</a> <a id="2">2. Proverb ...</a> //.... <a id="100">100. Proverb ...</a> i have textbox. if user enters 5 in it, it goto /page.html#5 like this basic concept, i was displayi...

0
Q: how prevent preg_replace in PHP from stripping out some special characters

user2643870My software uses the following before performing a search on a mySQL database: $keywords_search = preg_replace("/[^a-zA-Z0-9 ]/", "", $keywords_search); The problem is that it's stripping out words that users may use in other languages, like "españa" (spanish) due to the "ñ" character which is...

0
Q: How to test every module in my application phpunit - zend framework 2

user1835922I already made test for my application module and other module. They are working fine but i want to run all the test (application module and other module) toguether to generate clover report for jenkins. What should i do?? create another config file to invoke other config files??

1
Q: php mail header not sending correctly

jppower175I'm trying to send an HTML email using php. My code is as follows: $to = "test@test.com"; $from = "$senderEmail"; $subject = "Quote Request"; $message = <<<EOF <html> <body bgcolor="#FFFFFF"> <b>Firstname</b> = $senderFirstname<br /><br /> <b>Lastname</b> = $senderLastname<br /><br /> <b>Title</b>...

0
Q: facebook login post to wall doesn't work

John Stocktonbelow is my file facebook.php. What it does is that it redirects user to facebook to login and creates (registers) a user in my database with desired username. If user is already connected, the file redirects him to my website at once. Note that there are no login or logout url's or base_facebook...

0
Q: Which framework is best for user role management, reporting tool and graph generation tool?

Ravi MajithiaMy project has following requirements and I don't know which framework in php can full fill those requirements. User role management: Three layers of users that can manage whole website. Admin. Researcher (lesser feature then admin). Clients (view reports & graph) can download reports in diff...

0
Q: Using X-Send module to server css, javascript and image files

hendr1xI'm building a file server. It is currently serving downloadable files (.doc, .zip) perfectly using X-Send. It is possible to serve text based (css/javascript) or image files using x-send? My understanding is this the most efficient method available but I am always open to ideas. The code I c...

0
Q: Can't send cookie and can't send cahche php

user2818691When running my php code the following errors appear: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/chatvik/public_html/control.php:2) in /home/chatvik/public_html/control.php on line 5 Warning: session_s...

0
Q: passing Audio files in PHP and get HTML5 Audio duration in Javascript

TrustWebI am sending audio files (mp3 and ogg) through PHP / Apache. if($format=="mp3"){ header("Content-Type: audio/mpeg"); } elseif($format=="ogg"){ header("Content-Type: audio/ogg"); } elseif($format=="wav"){ header("Content-Type: audio/wav"); } header('Content-length: '.filesize($file)); header...

0
Q: PHP mail is not working not sending out two emails

user2819330My php mail is not working I have a script that recognizes the level and I have added alerts to let me know if I have passed through the code. The to email addresses are reflecting. I want to send out two emails seperately.But my inbox is not working i have checked my junk mail.Is there something...

0
Q: How Do I Add Calculated Rows Together To Form A Grand Total

Andy NaylorI have created an invoice table that provides rows from the database table where order ID in the database is equal to a value passed in the URL. The table works perfectly. Here is the code: $result = mysqli_query($con,"SELECT * FROM b_sale_basket WHERE ORDER_ID=$ID LIMIT 10"); while($row = my...

0
Q: Post tweets to timeline after sign in with twitter

user1673091my website allow user's to sign in with twitter. what i want that when they sign in with twitter-- dey should be able to post tweets to their timelime direclty from my website without any navigation or popup.. Any suggestion????

0
Q: CakePHP - Handling urls in ajax calls

nsbmWhat is the better way to deal with urls in ajax calls made in javascript files present in the webroot and because of that, are not interpreted by PHP? I'm using CakePHP and require.js and therefore would not put the javascript code directly in views. The only way I found was to declare a variab...

0
Q: mysqli_query() null given error

Anna GeeWhat is wrong on these codes? I am very much new to mysqli. I always get this error Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\localhost\path\core.php on line 11 Error, query failed!!! I tested the connection and it is working and connected so I dont under...

0
Q: How do I hardcode a dynamic url to an image map?

GWanaI am working on a Zip Code search, and have successfully built the search. Now, I need to have the ability to click on an image map of a map, and hardcode an href to a dynamic URL So for example, the search works well displaying contact information for a zip code in PA. But if I have an image ma...

0
Q: PHP How to stop Gearman worker.

user2795358I am using Gearman with supervisor.when action is trigger my code public function actionBulkActions() { ini_set('max_execution_time', 0); // set to infinite ini_set('memory_limit', '512M'); // echo "<pre>"; print_r($_POST); exit("</pre> \n exited here"); switch ($_POST['action']...

0
Q: fake email for testing

anijamI'm making a script that handles an IMAP inbox. I need to do extensive testing, but don't want to sit down and create 150 emails. Is there a way to hardcode something so I can reuse this test later? or should I just fake $sender=''; $message=''; ect for each fake mail?

0
Q: magento top nav categories change root

Roman ffI have list of categories, and they showing in top menu <?php $_menu = $this->getHtml('level-top') ?> Magento displays all of categories, i need to display only a child categories with root category id, for example 23, i find in Mage_Page_Block_Html_Topmenu $this->_menu = new Varien_Data_Tr...

0
Q: How to run PHP 5.5.4 mcrypt run on CentOS 6.4?

OC2PSI am getting the following error: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so' - /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so) Does ...

0
Q: Language PHP array - elegant way to pass to Javascript

AdracatI have a database with strings and which language this string belongs. A string has a unique name, which I use to identify it, and then a translation for each language. With PHP, I get this information from the database and store it in an associative array like: $languages['strings']['lang']['u...

0
Q: Codeigniter Routing

Danny WalshI'm trying to write an application that takes a parameter from the url and supplies it to the index function in the default controller. Then decides what to load depending on this parameter either a default home page or a custom page. $route['(eventguide/:any)'] = 'eventguide'; This code work...

0
Q: PHP Check if date is past to a certain date given in a certain format

Satch3000I have a php event's calender which queries the database to get the dates. I display the event date using: $event['date'] and this display's in this format: 2013-07-31 for example. Now, what I need to do is to check if this date is a past date to the current date. How can I do this?

0
Q: PHP include/require function not working

TorreI have four pages that I am trying to condense and make easier to maintain. I plan to use PHP to create the "web parts" for the common parts of each page. The problem is that the header.php page loads and displays everthing it should, but the html files will not load the php page when i use . I h...

0
Q: PHP sending XML with soap returns unknown rerror

Laci KI'm trying to send user registrations with soap to another server. I'm creating an xml with DOMdocument and than after saveXML I'm running the soap which should return an xml with registration id plus all the data I sent in my xml. But the Soap returns unknown error. exactly this: stdClass Object...

0
Q: PHP oracle database connection string

user2819914I had a weird experience connecting to oracle database using PHP. Firstly, from the past 3 years I am connecting to oracle using easy connection string. I had the code on my windows 7 machine. A week ago I got a new windows 7 machine and when I tried to connect to oracle. It gave me the follo...

-1
Q: An error occurred in script 'C:\xampp\htdocs\forum\includes\footer.html' on line 17: Undefined index: user_level

KabirWhy this message is shown in footer.html An error occurred in script 'C:\xampp\htdocs\forum\includes\footer.html' on line 17: Undefined index: user_level Home // Display links based upon the login status: if (isset($_SESSION['user_id'])) { echo '<a href="logout.php" title="Logout">Logout<...

-1
Q: My header(); function is not working after hosting our website

user2819919<html> <head> <link href="themes/home/style_home.css" rel="stylesheet" type="text/css" media="screen" /> <title>Bulacan</title> <style type="text/css"> .style11 {color: #0B9FCA} .style13 {font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #000000; } </style> </head> <body> <div id...

-1
Q: Magento eshop software architecture

user2819948i'am web developer and i want find Magento commerce software Architecture and my question is : how to find Magento commerce software architecture?

-2
Q: Script to check the blacklist

fntsmnI could use a script to check if one of my server is blacklisted and I wish I could blacklist all of us are on MxToolBox. I wish it was done in php.

2
Q: Improving my PHP search of a MySQL database?

CalebI'm building a website that has records that need to be searched through. I just realized that the search function is too precise. It's a recipe website, so for example, if the user types "keylime pie", the recipe named "Key Lime Pie" won't show up in the results. I'm not sure if there's a scr...

0
Q: PHP pack binary data format CHAR c++

Ricardo MartinsI need to rewrite c++ application to PHP and in c++ i have this structure of message is used in socket tcp/ip communication: So to can send message in one TCP/IP connection in binary i use this code in PHP: $message = pack('N', 1431655765) //HEADER - uint32 ui32Synch1 . ...

0
Q: Does PHP use a FIPS-140 compliant RNG to generate session IDs?

TheTelfA requirement for the deployment of a PHP application I am working on is that is uses FIPS-140 validated cryptographic modules. The customer has specifically flagged up that "PHP utilizes a cryptographically weak random number generator to produce session ID information" and cited this report: h...

0
Q: Wordpress - Make category.php list posts from subcategories as well

JonathanI'm building a blog where three people will be writing, but they will have a separate section on the site. The structure is built upon categories and looks like this: User one Clothes Fashion Life User two Family Life User three Family Friends Life I've set all three users as ...

-4
Q: How to make a comparison website?

Sandeep ViradiyaI want to add functionality of compare items on my website (like we are having on nokia, flipcart etc.). I don't have any clue how to do it. Please give me suggestion on how to start it. I want to use jQuery and PHP. Does anyone have any code or algorithms? Please give me link if possible.

-3
Q: sample example in PHP using MVC architecture

R S GoneI am planing to develop a website using MVC in php. because it increase security and robust coding. please any one help me for basic example.

0
Q: Using regex to get the value from a tag in PHP

KaoukkosUsing regex in PHP how can I get the 108 from this tag? <td class="registration">108</td>

-4
Q: How Can I Retreive web page using localhost ip

user2775918Im under linux, I want to use my local ip 127.0.0.1 to access to another website using CURL $ch = curl_init(); $lien = "website"; curl_setopt($ch, CURLOPT_URL, $lien); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false ); curl_setopt( $ch, CURLOPT_U...

0
Q: Publish a symfony2 website/webapp

NemusI'm working with symfony2 in order to learn this framework. One thing I've never read anywehere is: how to move your project from develpment env to the prodution env? I mean, what is the "to do list" in order to have my symfony website published correctly (assuming that my prod environment is su...

0
Q: Custom error pages for Symfony2.1 don't work in Prod environment

Diego De VitaI'm giving support to a web application based on Symfony 2.1 and previously developed by other people. My task now is trying to add customized Error Pages. What I did was just adding the files below: /app/Resources/TwigBundle/views/Exception/ |-error404.html.t...

0
Q: curl_multi_exec and cookies

nagylzsI want to run a program that uses curl_multi_init / curl_multi_add_handle / curl_multi_exec. The curl handlers should share the same cookies. I think that I can make that happen by passing the same cookie file to curl_setopt($ch,CURLOPT_COOKIEFILE,$filename). However, there is a big question that...

-2
Q: $.getJSON doesn't work when echoing PHP URL parameters

Joel KiddI am trying to download JSON with GET variables so that the response can vary. This works fine: $.getJSON("../api/v1/get/stops/?service=ABC&journey=123, function(data) { alert(data); } This produces an error: $.getJSON('../api/v1/get/stops/?service=<?php echo $_GET["service"] ?>&journey=<...

0
Q: Php : Possible to copy fields?

NerdsRaisedHandSo basically I am having the user fill out a form, at the end, I ask for billing information (Address, city, state, zip, etc), Then I again ask for shipping information (Same). Inbetween them, ive added a check box that asks if the shipping information is the same as the billing information, if...

0
Q: Capturing 404s when using mod_rewrite

jerrygarciuhI'm trying to track down some unexpected 404s in a hybrid WordPress/custom code site. Since the 404s are redirected I'm not seeing the original request in the access_logs. What is a good way to track these given WordPress' rewrite_rules are in the mix? .htaccess is just WP # BEGIN WordPress <I...

0
Q: Problems with elseif conditions

ZZZZZZZZZZI have a section of my code with a few elseif condtions that don't seem to be working properly. I've built a conditional drop down form that's working for the most part so far except for when it reach a couple elseifs. I'm using JS to send the dropdown option name to my PHP script with GET which...

0
Q: Facebook PHP SDK returning user ID even after logout

UtkanosI'm using the FB PHP SDK to log users in. Nothing fancy here - just calling $fb->getLoginUrl() to generate the login link, user goes through to it, authorises, is bounced back to my site and they're logged in. So far, so good. On a page reserveed for logged-in users I have this code: echo $fb->...

0
Q: ApnsPHP: Push notifications working in development but not in production

rokjarcYes: there are many duplicates to this question, but none of the answers helped. I'm posting this Q&A because i believe it can help someone else, too. I am following this great tutorial by Ali Hafizji on using APNS service for push notifications. Testing APNS in development mode: download a...

-2
Q: Wordpress: Parse error: syntax error, unexpected 'array' (T_ARRAY) site broken

user2820037new here and a bit of a noob. was trying to add a field to a custom post type and ended up with a parse error message on all website pages. I've pasted the error message and the contractor-type.php code can anyone tell me how to fix this? I've had no luck reaching the hosting provider to do a ful...

0
Q: send information secured over ssl using a php form POST function

Stefan OostwegelI have created a verry easy website, just displaying some articles. This website is protected with an SSL certificate. I ham using a Postivie SSL CA 2 certificate. When im visiting my website i see that all pages are secured with the ssl protocol (https). Then, when i get to my contact form, ther...

0
Q: Open a web page,insert username and password and click a button in PHP script

daynRailsI got a task to write a script.. That script must follow like at below :- open any browser and navigate to "http://www.facebook.com", fill the username and password into the username and password text boxes hit the sign in button using a script. First of all,i dont know to use what kind of pr...

0
Q: How to override the constructor of an extended class with a namespaced class (old-style constructor)?

arossSome PHP built-in classes use the old naming scheme for their constructor (I.E. their class name). SoapVar's constructor for example is Soapvar::SoapVar(). Now I'm trying to extend that class and override its constructor. I have to use the class name to do that, the usual __constructor() doesn't ...

0
Q: Auth->login() doesn't work

aisasUsing CakePHP version 2.4.1 I can't seem to make Auth->login() work. I followed this tutorial. This is my AdminController: public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('add'); $this->loadModel('Users'); $this->Auth->loginAction = array('controller'=>

0
Q: Get values from mysql to xml

MLLI ran over a problem and need to fix it really fast. I have a php code which gets the value from an xml file but i can't make a dynamic xml with database. My PHP version is 5.2 and my code for xml parsing is: <?php include("system/connect.php"); $q = mysqli_query($link, "select * from elements")...

0
Q: display details when i click "show"

user2656724hello can somebody give me idea how to do this problem? let say for example i have two table "sales" and "rsales" . and i have this ff data for my tables. data from sales receipt | date | total | 1st_id | last_id | 129999 | 09/26/2013 | 1220 | 1 | 2 | 139999 | 09/27/2013 ...

0
Q: Foreach & While Producing Duplicate Output

user2611917I'm still working to pick up PHP and I've spent a good deal of time on this code, and am almost to where I need to be. Basically, the code is intended to grab WP posts from the past 10 days, pick two at random, then display the first image in the post and link to said post. It is also supposed to...

0
Q: PHP - How to hide the form after it's submitted

Frank KluytI have a domain name check form that i have in a container. After I submit the form the availability of the domain name is checked and a message is shown in the same container as the form. When the message is shown, I want the form and first H2 to disappear. How can i do this? My code: <div id=...

0
Q: Angular and CodeIgniter Validation Library

suncoastkidI'm trying to us CodeIgniter's validation library on json data posted from Angularjs. The problem is when I go to set the validation rule the json object is not recognized as a post value by Codeigniter. Anybody know how to set a Codeigniter validation rule for a json object? $data = json_de...

0
Q: Remove trailing slash in wordpress blog URL

Chetan BhopalI decided to use wordpress to power my blog section. I created a folder under my root directory of my site titled blog. Now when I visit http://trekeffect.dev/blog I get redirected to http://trekeffect.dev/blog/ with the trailing slash. How can I remove the trailing slash? .htaccess inside blog ...

-2
Q: how to insert 2 value of checkbox into 1 feild (for make exam page )

Hesam Tabatabaeiguys I want to make one exam page .but i have problem for it. I have 20 question with 4 answers and i decide insert answer into database How can I do it with function for every question? How can I design and make database for it ? Yours truly

0
Q: When posting image using PHP to Facebook wall only thumbnail is displayed

Radek HronWhen publishing picture to my FB page as an Admin using PHP, it appears as a thumbnail. I would like to appear it as full size picture Code I'm using: $page_info = $facebook->api("/$page_id?fields=access_token"); $page_access_token = $page_info['access_token']; $data['picture'] = "image.jpg"; ...

0
Q: Apply autocomplete to dynamically generated textboxes with data from database

Seeya KI have gone through many ques here on stackoverflow with regard to my query here but could not apply them to my problem. Hence I am giving here my files that I have been using. I am successfully able to use autocomplete with a static textbox. I get the data from the database. But however I am n...

0
Q: Running phpunit tests using HHVM (HipHop)

r.bilgilI am trying to run PHPUnit unit tests via HHVM on a virtual Ubuntu 12.04 (64-bit Server) install. The tests usually run using a phpunit.xml file located in my tests directory, which includes a bootstrap file to handle autoloading, and the tests run fine on an ordinary php install. However, I keep...

0
Q: Submitting a form serverside, redirect user

AdelphiaI'm working with paypal buttons. I don't want to have to encrypt them as they will change regularly, so I am wondering if I can somehow submit the POST variables sererside, with cURL perhaps, while still redirecting the user as though the POST was coming from the user. This way the user would ne...

0
Q: Is there a way in magento to detect if an address already exists

FabianIs there any way in magento to detect if an address already exists. The customer can decide - in the OnePageCheckout - if he want to use an existing address or enter a new one. If it is an existing one i don't want to / need to validate it. So is there any way to find out if it's a new addre...

0
Q: Make LoopJ Autocomplete tokenInput dynamic

Iman HejaziI'm trying yo use LoopJ (http://loopj.com/jquery-tokeninput/demo.html) autocompelte to create a functional search box. As you can see on demo page, the following code runs the autocomplete: $(document).ready(function() { $("#demo-input-pre-populated").tokenInput("tvshows.php", { sea...

0
Q: How to locally run another wordpress site with multisite

user1427661So I have a MAMP server set up, pointing to my main wordpress page that works fine. I have enabled multisite on that page. I'm trying to get someone else's wordpress site running on my local host for development purposes. So I've created a new site from the wordpress admin, linked to the url loca...

0
Q: JQuery Unable to retrieve data drupal services through localhost:8888

DoriI have create a service as this tutorial say's, I can see that when I type to the browser this url: http://{localhost}:8888/drupal2/test_test/node/1.jsonp or http://{localhost}:8888/drupal2/test_test/node/1.json or http://{localhost}:8888/drupal2/test_test/system/connect.json I get the j...

3
Q: How to declare a php variable to be constant

PadraigI have some closures that I have bound to some variables. e.g. $x = function() { echo "hi there"; }; I want to make sure that $x never gets inadvertently switched to some other value. Any idea how to do this? I can't use constants as they only resolve to scalar values.

0
Q: error 45 from web page

Cloneu InglewoodI am not a programmer... the query statement does what I want from a MySQL command line but I wish to get the results also on a web page... here is what i wrote for that and just get an error 45 table colspan="1" align="center" VALIGN="top" border="2" cellspacing = "0" cellpadding = "5"> <...

0
Q: If two dynamic height divs in a parent max-height div then second to be positioned at bottom

user2820130I have an outer div with max-height of 800px. Within that I could have one or two divs (depends of results from mysql query), the second of which should always be fixed to the bottom of its parent. I can do this with absolute positioning but how do i resize the first child to take the second abs...

0
Q: Proper data validation for users and programmers

JustinI'm trying to think whats the best way to solve validation on a input field which can be set in multiple places. Lets use user password setting as an example. Typically the user can set his password in few places, registration, user control panel page, and "I forgot my password" page. In the p...

0
Q: href is not working invalid url error

Alvaro ParraWhen i attach a file i create a location in my c:\ $estructura = "C:\\ArchivoDePublicacion"."\\".$url_server."\\"."Archivos"."\\".$ID_CASO."\\"; I save this location into my database(that's not the problem") But when i want to go to that location it fails. this is my href code echo "Nombre: <

-1
Q: Array to string issue , PHP

Steve GreenI'm working on a comment system, pretty basic at the moment. I'm encountering an error when trying to obtain the comment from the database. The curiosity for me is that this is almost identical code to what I used on a similar page and no error then, however... The flow is HTML FORM: <form m...

-2
Q: Parse error: syntax error, unexpected '.', expecting

John GrigoriadicParse error: syntax error, unexpected '.', expecting I get this error Parse error: syntax error, unexpected '.', expecting '}' in /home/l2hantol/public_html/acp/core.php on line 37 Line 37 function testServer($hostname,$user,$password,$database) { try { $handler = new PDO("mysql:...

0
Q: unable to install oci8 due to autoconf error

user307635I am trying to install oci8 on my Lion OSX. I am running below command sudo pecl install oci8 But I am getting this error downloading oci8-1.4.10.tgz ... Starting to download oci8-1.4.10.tgz (169,248 bytes) .....................................done: 169,248 bytes 10 source files, bu...

0
Q: Php email form with checkbox selection

MorneIm new to php and struggle to get a solution to my problem i have a very simple php email form ,but want I want to achieve is I have 4 different departments i want send the mail to, but on my form I want to select a department to which I want to send it to. So my form will contain 5 checkbox of ...

0
Q: calling a php function from a javascript script

user2322972i have a file where i put all my needed functions, the one that i need is this one: //the functions file //........ function user_exists($username){ $username = sanitize($username); $query = mysql_query("SELECT COUNT('user_id') FROM users WHERE username = '$username'"); return (mysql...

-2
Q: Neater version of print_r($_POST)

user2803648I'm trying to creating a php program that simply does the same thing as print_r(), but in a neater format. I created a form that just has some checkboxes and radio buttons and when the user hits the 'submit' button, it takes them to another page that shows them the values of what they picked. I...

0
Q: Magento - Gateway error Authorize.net

user2820178Getting "Gateway error: Unable to read response or response is empty" when I try to post payments to authorize.net. Authorize.net cannot see anything coming through, host provider says no issues on their end. I am using the Authorize.net payment type I have verified my API login and trans ID i...

0
Q: Accessing classes from other classes and in functions PHP

thisispiersI've not written OOP code before, I always tried to avoid the extra keystrokes. Anyway, I'm taking the plunge as it's supposed to increase readability. Anyway, I'm having trouble getting my classes to be able to access each other's methods. Here's my setup: $conf = new Conf(); // boot up! // ...

-1
Q: How to change upload button to text?

Misz JiehaI have used upload file (type=file) to upload a file. I want to change the button to text. Since the user will using either Google chrome or IE. So I have to consider both browsers. I would prefer simple code. Here is my code (I'm using multiple upload files) <td><input type="file" name="picture...

0
Q: Wp e-commerce product 404 but page loads fine

leapDesignI set-up a Wordpress wp e-commerce website a while ago now and there is a problem on the product pages where looking into the page headers the very first request generates a 404 error but the page actually loads fine. This causes problems with Google as it can't index the products. I have not be...

0
Q: PHP having syntax problems with quotations wrapped around a variable in PHP embedded in HTML

user2643898This appears right to me but it is incorrect (code hint coloring around '{$row["type"]}' is wrong wrong -- from the color it is in my IDE it's been considering a string, and it's throwing an error when i run it in the browser). I've spent hours trying to figure this out on my own to no avail. An...

0
Q: How can I open another url from a php file and pass some values with the get method?

ArbiturI have a php script that checks if the user typed the right password for the right username. If its right I want to open another php page and pass some values with the get method. How do I do this? Im pretty new to php.

0
Q: How to combine these two arrays and echo them in PHP?

KaoukkosHow can I combine the following arrays? For example the first $match with the first $register and after that, to echo the array $matches = array(); $registration = array(); preg_match_all('#(69\d{8}|21\d{8}|22\d{8}|23\d{8})#', $str2, $matches); preg_match_all('!<td class="registration">(.*?)</td>

0
Q: Could'nt connect in PDO to mysql database, using apache with easyPHP on port 8080

PeterI'm using EasyPHP on my localhost:8080, and IIS7.5 on my localhost:80. Work like a charm. I can access phpmyadmin with no problem at this address : http://127.0.0.1:8080/modules/phpmyadminXXXXXXXXXXXXX/ Using root and no password. My question is, why is my connection doesn't work at all. N...

0
Q: Laravel 4: Add a filter to a route a pass it a controller

arielcrHow to you add a filter to a route and pass a controller to it?. In Laravel's doc they said that you can add a filter to a route like this: Route::get('/', array('before' => 'auth', function() { return 'Not Authorized'; })); But I need to pass a controller, like this: Route::get('/', ...

1
Q: Problems with a search query in PHP

kanarifuglI have a search query in PHP where you can search in the user database. It's important that only users connected to one specific ID (w_id) shows. And every user have one. In other words, I do not want others administrators to see clients who do not belong to the searcher. So I have specified a ...

0
Q: Incorrect positioning of the featured image when using the_post_thumbnail() in Wordpress

Ric WoodI'm a bit of a newby at this, but I'm trying to create a wordpress function for displaying snippets from the latest 4 post on a page with a shortcode. The idea is to have 4 panels, each showing the post title, featured image, and excerpt. I can get all these elements to appear on the page. Howeve...

 
4:13 PM
1
Q: Using $this when not in object context error within array_walk

carbontwelveI am experiencing an odd problem with using array_walk with closures within a class. The problem does not arise within my development environment using php version 5.4.7 but it does on my deployment environment 5.3.3. The following code runs fine on my production box, but crashes on my deploymen...

0
Q: validating in cakephp model compare two fields

indagoI have a model Interesttype where i want two fields to be validated one should not be more than the other and none should be less than a particular set value. Here is my model. class Interesttype extends AppModel { public $primaryKey = 'int_id'; public $displayField = 'int_...

0
Q: error in creating table in Mysql 5.6

user2787527Hi guys can any one help me with this problem ? Got error in creating table? Page is logging in but the problem found in creating the table. <!DOCTYPE html> <html> <head> </head> <body> <form action="" method="POST"> <b>Enter Username:</b><input type="text" name="username" value=""/><br> <b>...

0
Q: enable <b></b> <i></i> <u></u> and <br> in textbox

user2784722I have created a small text redactor, but, the problem is that when i'm clicking post button to post in mysql, all my text redactions( etc.) disappear, i mean html code! Here is my code: <script type="text/javascript"> function formatText(el,tag){ var selectedText=document.selection?document.sel...

0
Q: Can't decode json. It's an array I encoded as json and stored as a cookie

BranndonHere is the output of what shows when I echo out the cookie directly, then try and json_decode it. $_COOKIE['mycookie'] = {\"table_name\":\"wp_customtable\",\"time\":\"2013-09-26 08:18:23\",\"post_id\":null,\"referer\":\"www.bing.com\",\"keywords\":\"350 rear main seal replacement 11\",\"full_re...

0
Q: PHP's environment variables to CGI's

Yonn TrimoreauI'm trying to implement Paybox's payment solution on my website. To do so, I have to set some environment variables and then call their cgi script. My server is executing the cgi script well, I configured my php.ini safe_mode_allowed_env_vars allowing php to modify corresponding environment vari...

0
Q: Need to Delete CSV File in PHPMyAdmin

sickobluuI uploaded a .csv file to the backend of my ecommerce website. There are 30,000 products in the file, but I forgot to include the price column. I need to find this file in phpmyadmin if possible and delete it so I can upload a new one with the pricing column on it. If I have to run a query, I wi...

-4
Q: Someone can decode this for me?

nasershmaku<?php if (!function_exists("TC9A16C47DA8EEE87")) { function TC9A16C47DA8EEE87($T059EC46CFE335260) { $T059EC46CFE335260 = base64_decode($T059EC46CFE335260); $TC9A16C47DA8EEE87 = 0; $TA7FB8B0A1C0E2E9E = 0; $T17D35BB9DF7A47E4 = 0; $T65CE9F6823D588A7 = ...

0
Q: PHP Replacing dot with comma's not working

WaveZI have this number format : 39289.95 And i want it to look like : 39289,95 My problem is that if i use : str_replace('.', ',', $data) or strtr($data, '.', ',') or number_format($data, 2, ',', '') I get 39289.00 I tried to cast the variable in string before using str function b...

0
Q: Acrobat Reader prompt saving pdf file when closing it (created with TCPDF)

Kristomy problem is with the pdf opened in Acrobat Reader, created with TCPDF on ZF2. The file is created fine (except the size of the file, around 500kb), content is fine, but when trying to close the file, Acrobat prompts for saving the changes, though there is no changes. After saving the file and ...

0
Q: PHP: keeping filled form field values after form errors

NerdsRaisedHandI ve read a few question on the site similar to this but couldn't really take anything from them. I have a form that gets submitted, if there are errors, I notify the user of the errors above the form and display the form below that for them to correct it. This is all good and dandy except that...

2
Q: Mysql inner join query gives a row three times

Erdem EceThanks for reading. I'm trying to learn inner join and join. My aim is to comparing that if the user created the community is also marked as an admin in the CommunityMembers table (I'm not sure if INNER JOIN achieves this) and take all other community information from Community table related to ...

0
Q: Using PHPMailer with SSMTP

Jonathan PellerinI'm not sure if this need to be posted here or on ServerFault because I'm not sure if the problem is with PHPMailer or SSMTP. I'm having some trouble sending emails using PHPMailer and SSMTP. I have configured SSMTP to use an external server to send emails. The authentication is successful and ...

0
Q: Creating Multiple MySQL Databases with PHP

BlackCoderAm i doing some thing wrong. i am trying to create 2 databases in a single attempt. and i am failing.. 2 quiries > sql and sql1 my 2nd query sql1 is running file and but the 1st query sql is giving me error Error You have an error in your SQL syntax; check the manual that corresponds to your ...

0
Q: Is it possible to use GWT with (both) Java and PHP backend?

ClawdidrOk, this is the scenario: I've developed a webapp running Java at backend, everything is working pretty well, but now I have to integrate a PHP module (boss requirement) within the whole system. So, I need to know if both backends can co-exist in a single application and how can I accomplish that.

0
Q: SQL Query Issues

MausHaving a very hard time wrapping my head around how this should be written, I have a key made up of a fixed number column and an incrementing number column. I want to have the select query only return the newest row for each fixed number. For example: 20, 1 20, 2 20, 3 <-- Should only return t...

0
Q: Managing php sessions on multiple file uploads

sagitsim working in a multiple image upload social web app. Im assigning an session['file_id'] to each uploaded file as an array index (file id comes from db). But i only want users to upload a maximum of 4 images per post. So im counting the images.length before upload, and if its == 4, alerting the u...

0
Q: How do I upgrade phpMyAdmin on MAMP Pro?

dmanexeMAMP Pro is crawling slow, and I suspect it's because of having it outdated. Where does localhost/phpMyAdmin reside?

0
Q: Dynamic drop down list NON-DATABASE php

user2803648I'm trying to create a changing drop down list in php, but without a database. Here's what I came up with so far <body> <form method = "post"> <table> <tr> <td> <p>Name</p> </td> <td><input type="text" name="Name" /></td> </tr> <tr> <td><p>State</p> </td>...

-2
Q: Load in multiple random .html files with PHP

Martyn GrayI have 6 html files (test1.html, test2.html, test3.html and so on) and I want 3 of them to be randomly displayed with no duplicates. Then each time the web page is loaded a different order and file will be used. Say: test1.html, test4.html, test2.html Or: test5.html, test2.html, test3.html Or:...

0
Q: Get Email of a current loged in user

Matic PusnikI am trying to modify one plugin (CF7), and I am stuck in the middle of the way. Site is a bit specific, that is the reason, I need this functionality. In the contact form I get a receiver address from a custom field, saved in a post. The code is like that: . . elseif ( '_post_email' == $name...

0
Q: Unable to display uploaded images

user2776664hi i'm new to PHP I was trying to upload images in a simple gallery application but after successful loading it into the data base, I tried displaying the image but it seems not to display. i have also tried run it through a loop the story is still the same. this is the code that display the imag...

1
Q: Creating Assets after rendering

LogicLookingI have this class I was working on which allows you to create an array of assets like so: array( 'css' => array( array('name' => 'bla'), array('name' => 'bla2') ), 'js' => array( array('name' => 'bla.js'), array('name' => 'bla2.js') ) ); This...

0
Q: PDO increment value in MySQL

user1684241quick question = how can I increment a value in MySQL using PDO? what I have now is: $query = $conn->prepare("UPDATE albums SET photos = photos + 1 WHERE id=:album"); But I'm getting an error: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constra...

0
Q: echo id when id is auto increment?

user2816376I can't seem to find this. Maybe I'm asking the wrong question. My first field in my db is an id with INT set to auto increment. When I create a new entry I want to grab the id that was created, but I don't know how. $query = mysqli_query($myConnection, "INSERT INTO books (title, author, descrip...

0
Q: pear XML_Serializer - eliminate superfluous tags

RoyHBI create an array, then push 0..n elements onto one of the subarrays within the array (easiest to see what I mean in the code below) When I run the array through XML_Serializer, it adds extra tags around the pushed elements $serializer_options = array( XML_SERIALIZER_OPTION_INDENT => ' '...

0
Q: htaccess to ignore specific part of the URL

user2816746I'm trying to change language of a website to english when URL has /en/ after the domain. PHP changes a translation file when url has that /en/ after the domain. My system adds that /en/ part to all links, even CSS-file's URL etc. It works ok, but I cannot reach any files when that part is in t...

 
4:43 PM
0
Q: how to optmize this array loop

user1080247i have array which contain many flights info i want only five lowest price.. first i make loop to sort array by price second i print first five array but it take more time..how to reduce this big time foreach ($flights_result->json_data['response']['itineraries'] as $key => $value) { $mid...

-1
Q: creating a table from 1 to 100 in php nested in html

AhmedThis is a practice question I am having a problem with. So far, what I got to create is a table using the following code. I need help to fix it, with explanation on what my mistakes are. What I am trying to to do is pretty simple: generating numbers from 1 to 100 in a table using php nested in a...

0
Q: Fatal error: Cannot run code from this file in conjunction with non encoded files in /home/webtrite/public_html/wp-includes/version.php on line 369

Mohammed AsadFatal error: Cannot run code from this file in conjunction with non encoded files in /home/webtrite/public_html/wp-includes/version.php on line 369. What does this mean? and what is the solution for this error?

0
Q: Run a function on each query string value

Dustin McGrewI have a query string that looks like this.. dinnerPlate=white&lunchPlate=purple&cup=black I also have an array that holds all of the available colors that can be allowed.. $availableColors = array("white","black","red","blue","green","pink"); What I need to do is populate an img's src with ...

0
Q: Laravel hidden attributes. e.g. Password - security

GravyAccording to http://four.laravel.com/docs/eloquent, one can Hide Attributes From Array Or JSON Conversion by using a protected $hidden variable in the Model. class User extends Eloquent { protected $hidden = array('password'); } This is fine for json or array, however is it also possible t...

0
Q: supersized gallery: load other images depending of url

Daniel Ramirez-EscuderoI just began using supersized gallery and I've already created the style as I wanted. The only problem I've seen is that it loads it's images on the javascript file. I have 4 different pages which use this layout but with different url and images. I would like to load different images in each url...

1
Q: Updating to MySQLi and having some trouble

ZZZZZZZZZZSo I've spent a bit of time looking at MySQLi and I'm having trouble updating a script with the new functions. This script is used for a dynamic dropdown form, using data sent to it using JS. You can find a live version of the script here to check out what I'm takling about. I've looked up and do...

0
Q: OOP with sessions

kfirbaLet's say I have a class called product which has 2 properties, pid and quantity. Now, I want to make a session that will hold an array of this class. Code example: <?php public class product{ public $quantity; public $pid; public function __construct($pid,$qty){ $this->$pid ...

0
Q: Extension Redis Not Found in phpinfo

user2820202Days ago, I installed Redis on my ubuntu. And redis always runs well. But now, I cannot use Redis with phpredis. I cannot locate the problem by myself. So, please help. Thanks. These are my os infos: ubuntu 12.04 source dir = /home/wzw/workstation/src installation dir = /home/wzw/workstation/en...

0
Q: how to check mongoDB php driver version?

dykwI installed MongoDB php driver a few months ago. Now, I want to know the version of the mongoDB php diver that I installed. Anyone know how I can do with with a linux command? I googled it but I can't find the solution. Many thanks.

0
Q: Warning: ftp_get(): Delete operation successful

SammitchI've got a bit of code that transfers backups from our development servers, and it randomly seems to behave very strangely and giving the following errors/output: Warning: ftp_get(): Delete operation successful. in /root/cron/get_dev_archives.php on line 106 ERR blahjob: Failed to get file: 2013...

0
Q: how to read text file from pc in E: directory in php on live server

user2816297I have a text file in my pc in E: drive I read this file in php local host it is working properly but when want to read from live site is not working. on local host this this my code $myFile = "E:\\textfile.txt"; $fh = fopen($myFile, 'r'); if ($fh) { $array = explode("\n", fread($fh, filesize($...

0
Q: Getting parseerror when trying to call PHP file via $.ajax but LINT states there are no syntax errors?

neoistheoneI'm trying to call a PHP file of mine, pay.php, but when I try it fails with an error parseerror. So, I compiled the file via php -l and it states No syntax errors detected in pay.php. What am I missing here? JavaScript var request = $.ajax ({ type: "POST", url: "pay.php", dataType...

0
Q: PHP Variable showing {}

Jake gloomingsI wonderd if theres a way you can do this ive seen it on some other php scripting where you do a variable like below <?php //variable as {name} $name = "Jake"; ?> and you can show it by typing {name} or something like that if you include the file with php?

0
Q: Prevent concurrent access and inserts in an instant winning script

MonsieurPouletI'm currently making an instant winning game with the following rule : the first user to register at least half an hour after the last one did wins. So users can win every half an hour. If no one registers during a few hours, the first one to register wins. Server uses PHP 5.2.0, which explains ...

0
Q: how to pass image id to javascript page

Raj Kumari want to pass id of the dynamic image to javascript function but always getting null or [ObjectHTMLElement] ..can anybody help plz..here is my code function image_select(id) { document.onmousemove=function(e) { var avatar = document.getElementsByName(id); avatar.style.position='relative...

0
Q: editing css for content positioning

user2820403i am new to web designing, and I want to edit my css file for displaying a content in left and right alignment alternatively, here is my css #text-box-3 { text-align:center; padding:0px 90px; line-height:24px; } currently it displays all the paragraph in center alignment, but i want it in alt...

0
Q: How to efficiently get specific value from an array?

Gottlieb NotschnabelI have an array like this array(3) { [0]=> array(2) { ["company"]=> string(15) "Company A" ["value"]=> string(6) "100" } [1]=> array(2) { ["company"]=> string(9) "Company B" ["value"]=> string(6) "150" } [2]=> array(2) { ["company"]=> strin...

-1
Q: compare two DateTime Objects

user2047701actually I have 2 DateTime objects $d1 = new DateTime('04/14/2013 8.00 AM'); $d2 = new DateTime('04/14/2013'); so without doing any changes to these 2 objects. is it possible equal these 2 objects.

0
Q: Python POST File To PHP

user1801810I have a PHP with jQuery and jqGrd web application; one of the features of the application is the ability to upload files (on the client side this is handled by jqGrid) and insert the contents into a database. This all works. My problem is I also need to provide a command-line mechanism for man...

0
Q: How to get the links with this specific structure using regex?

KaoukkosI need to get the url or the number (this number is just for example but all the numbers have 7 digits) using regex? It is mandatory not to match all the <a> available in the HTML file, but with this exact structure. <a href="./view/3049532/">

1
Q: JQUERY, add hidden form table row to end of form with variable for many tables

user2820424I have successfully used this code to add a row to a table From a hidden row. $(document).ready(function($) { $("#dispadd").click(function(event) { event.preventDefault(); $('#hiddenrow') .clone() .removeAttr('id') .show() .appendTo( $('#table1...

0
Q: Create Arrays From Numbered List From a String

Guney CobanogluI have a plain string like this: 1 //here is a number defines phrase name 09/25/2013 //here is a date <i>some text goes here</i> //and goes text 2 09/24/2013 text goes on and on 4 //as you can see, the numbers can skip another 09/23/2013 heya i'm a text I need to create array from this but ...

0
Q: Where is the best place to store user preferences in PHP?

João PenteadoI am making a website using PHP and I'd like to know if it is better to store user preferences (such as language, background image, and so on) in a database or in a text file outside the public_html folder (to prevent public access to the info). I ask this because I am worried about the time PHP ...

0
Q: Modify JSON data format for use with FLOT chart

DanielAttardI am trying to create a JSON object to hold data for use with a FLOT chart. The documentation says that the Data Format should be an array of points like this: [ [1, 3], [2, 14.01], [3.5, 3.14] ] The problem that I am having is that my AJAX call is returning a JSON object with a Data Format l...

0
Q: Symfony2/Doctrine2 - same fields in many tables - extend base model?

JoeI'm writing an application and currently I'm working on models. I use YAML to define my models. Now there are multiple tables where some fields are repeating (like user_id, comment_counter, created_at, etc.). For example for created_at field - there will be always the same code. Now my question i...

0
Q: Table Name Availability check with PHP

BlackCoderi am trying to create a table with php script. and before that i am trying to check for available name with PHP. but it is not working. even if i enter a table which exits it is showing Already Exists: Incorrect table name $sql1 = "SELECT * FROM `$mainnamechk`;"; if (mysql_query($sql1)) { echo "<

0
Q: Strange Server Behaviour

user1396585I have a property website. I have a designated upload folder where my client using there own property portal software uploads a blm (property version of xml) data file, associated imagery and pdf/doc files. I have a CRON job at midnight that runs and scans the upload folder for the blm file, if ...

0
Q: Send email to users that checked 'yes' - php and modx

ride_85027I have a database of 'user comments' that holds the comment, the userId, true/false for if they want to be emailed. My issue is that if a user comments on a post 5 times, they are in that database 5 times and thus, they get 5 of the same emails. Here is my setup: Find users in the database tha...

0
Q: Sorting results in php before being displayed

user2820461Let me start by saying that I am very new to PHP and doing what I can. That said, feel free to criticize my code, but know that I am already aware. Okay, all of this code is working right now. I just need to figure out why I cannot get it to sort by 'price' before displaying the results. The c...

 
5:32 PM
0
Q: Selecting 2 random rows from SQL table

halpsbWhat would be the fastest way to select 2 random rows from an SQL table ? (SQL only or not)

0
Q: mysql error: exceeded the max connections per hour

user2216267im getting an error while running php script and for wordpress site on same domain: Could not connect: User 'abc' has exceeded the 'max_connections_per_hour' resource (current value: 10) what should be the limit for mysql database? how to connect to database now?

0
Q: Parsing dynamic values in Behat/Mink Yml file configurations through Mink Extension.php(Selenium2) for Saucelabs

Ben FongI was wondering if there's a possible way to parse dynamic values, specifically the name by using the *.feature Behat/Mink tests as it's running the into the Yml configuration file with Selenium2 Capabilities The behat.yml file uses Behat/Mink/Extension extension file with Selenium 2 Capabilitie...

0
Q: Most efficient way to write large amounts of data to file during loop

Marty WallaceWhat is the most efficient way to write to file when a large amount of data is being generated and written during a loop. The file is in xml format. On each iteration of the loop around 6 lines are written to a file - equates to 3 xml nodes. There are around 100,000 iterations to complete. I ...

0
Q: MyMQLI delete a row from DB

Lior Elenbyi'm trying to learn MySQLI instead of using MySQL functions. my code goes like this: <?php session_start(); ob_start(); if (!$_SESSION['user']) { @include "login.php"; } else { include('top.php'); $id = $_GET['id']; $query = "DELETE FROM gallery WHERE id =".$id.""; echo '<div ...

0
Q: Best way to parse all inputs

Sam FisherI wanna parse my inputs/outputs based on condition. Now condition is if ($var == "USD") { $symbol = '$'; $customerprice = $symbol.$customerprice; $earned = $symbol.$earned; $cut = $symbol.$cut; // etc } I'd like to parse this before I insert them into the database, o...

-1
Q: how to obtain the information from input field inside php

Vladimir VasilevI have a form in which I have the following field : <input class="form-field" type="file" name="photo" /> how I can get the information from this field to be used in a if cycle in php ? if ($photo != '') {

0
Q: Gaining xp and ranking up in a php mafia game does not work. Bad coding?

Lasse StenløsI'm now creating a text based mafia game. No, not another one of them. I'm just making one for the purpose of practicing PHP. I've already learned a lot, but I have encountered a problem which I can't find an answer to on the internet due to the fact that I don't know what to search for, and thus...

0
Q: PHP rewrites not working (maybe due to Apache rewrites)

LeonI developing a php website. I am trying to get rid of the .html extension from the URL. Right now I am on the staging server. Now, here is how the server is setup by a remote IT team. The server is called 'int-dev.mydomain.com'. The URL of my website is 'staging.mydomain.com/dev/home.html'. When...

0
Q: function resize() on a non-object in codeignitor controller while image resizing

Likhani want to resize image into two pictures after upload.one is big image(600*600) and another is small image(150*150 ) but showing a error "$this->image_lib->resize()" in this portion and that is function resize() on a non-object. class Upload extends CI_Controller { function __construct() { ...

-1
Q: How to make a Jquery function to write a Div instead of a Textbox?

kostI have a jquery function which gets data from a json php mysql. And the results are appearing in textboxes function renderDetails(wine) { $('#Id').val(wine.id); $('#question').val(wine.question); $('#answer').val(wine.answer); $('#link').val(wine.link).html(); } The textboxes in H...

0
Q: login system error in different browers php

DjOnceI am trying to make a login system. This is my file that checks if the user is logged in or not: <?php require_once("config.inc.php"); session_start(); if( isset($_SESSION['username']) ) { header('location:' . $website_url . '/home.php'); } ?> <?php date_default_timezone_set("Europe/Tirane"...

-1
Q: Are there are frameworks for writing RESTful APIs?

Philip ComputerI'm looking to create a few RESTful APIs for a number of internal computer systems at work, so we can perform actions on these systems viar http requests. I don't really mind what language these are written in, .net, php, etc but I want to make them as consistent and easy to use as possible. A...

0
Q: Check values of sub-arrays, use key as new value in new array - PHP

John AI have an array, let call it $mainArray, which looks like this: - Array ( [1] => Array ( ) [5] => Array ( [0] => 10 [1] => 15 [2] => 20 [3] => 25 ) [80] => Array ( [0] => 20 [1] => 40 [2] => 50 [3] =>...

0
Q: crawl specific website data

Usf Ahmed SubehiThere is This Website Jeeran it's listings website contain places and photos of the places what im looking to crawl is the places and there category like full crawl of it places - photos - categories and every thing in it Just the data How is That Possible using PHP ?

0
Q: PHP PDO Log In Script doesn't work. Contains errors

Jesse DijkstraI´m not very familiar with security, therefore I rely on what I find on the internet. I found a site of someone who explains a bit what he does and how his method works. People may copy-paste it to ease things up. Though I do understand quite a lot, I couldn't come up with it myself (I'm pretty n...

0
Q: selecting triple unique(or distinct) value from mysql

TrueSkillZThe database looks like this: http://sqlfiddle.com/#!2/cc89c Column translations to understand it better: pardavejas - seller kaina - price data - date I need to get the latest prices of each model_id and pardavejas. The simple query would look like... SELECT DISTINCT pardavejas, DISTINCT mode...

0
Q: PostgreSQL search all indexes of an array

TharlineIn my table 'products' I have a column named 'keywords'. It's defined like this: CREATE TABLE products ( id integer, keywords character varying[] //rest of the definition ommited for clarity ); A record in column categories could look something like this: {music,...

-1
Q: Verifying user's email id in sign up form

Aditya KashyapI am making website which runs on localhost XAMPP i.e. it is not live yet. I have made a sign up form which requires email verification i.e. whenever any user sign up, a verification link is sent to user's email id from where user activates his account by clicking on that link.I have employed the...

0
Q: Sending popup message in the middle of session

aniI wonder is there a way to send users an alert message in the middle of a session? for example when a transaction status changes from "process" to "succeed" I want the user to know it in the middle of their session. I hope my question can be answered using jQuery AJAX. Many thanks.

0
Q: header not working in else section

MLLI have a code which is half-working. One half (if) is working, and redirecting, else is not working <?php session_start(); error_reporting(E_ALL); ini_set("display_errors", 1); require("system/connect.php"); $es = mysqli_real_escape_string($link, $_GET['es']); $mm = mysqli_real_escape_string($li...

-1
Q: Which framework to use for a small web app?

goeI need to build a small web application that will use MySQL on the db side and will have all the basic features like: register screen login screen summary screen grid screen add/edit screen delete action logout action Which framework would you recommend using? I want to use an MVC approa...

0
Q: Exlipse PDT - Javascript Code Assist

Kevin TurnerIm moving from Dreamweaver to Eclipse PDT and im happy with many many benifits of eclipse. But one issue im missing very much. In Dreamweaver i get Code-Assist for following code: project = new Object(); project.ajax_url = 'index.php?ajax=1'; project.currency = '€'; project.debug = t...

1
Q: Retrieve comments on runtime?

New CoI want to call Ajax which fetches all the comments from database. Now how to put a check on that Ajax Script to Run, when only someone comments. Same as the stackoverflow notifications. When we comment on question, The Notification appears without reloading page (i.e On Runtime ). Right now ...

0
Q: PHP Tutorials: Register & Login (Part 5): User Login (Part 2) - Can't find user

samyoueli am currently doing a login and register course with php academy and i cant seem to get past this problem i am having with finding the username in the database. The problem seems to line with the line which tries to find the username or it could also be a mysql problem. <?php //creating fu...

0
Q: <br /><b>Fatal error</b>: Call to a member function get() on a non-object in <b>

KaigeI have a worpdress site I was working on but now when I try to visit my site or login I get an error message across the top of the browser and a blank screen. I found out how to fix the error when it relates to plugins but not the login screen. Could my error be the result of a plugin? Fatal err...

0
Q: Wordpress Loop For Even/Odd Posts

Steven MorganI have two columns and I want one post type to get distributed to each column evenly. So it’s two side-by-side divs and I want: Div1 = Post1, Post3, Post5 Div2 = Post2, Post4, Post6 So basically get odd/even posts. Not exactly sure how to do it. <?php query_posts('post_type=post-type'); ?> <?...

0
Q: MongoDB - PHP manual references approach suitability

leseMongoDB newbie here. I'm having the first approach on references, and my main doubt is if i'am using the appropriate strategy(manual references) for my situation. Working on 2 collections(user, message) in the same db, lets make an example of a document stored in user collection: array ( '_id' =

0
Q: Smarty echo out an email from mysql database

MazzonI'm using the CS-CART software and i'm trying to echo out an email via Smarty template engine based on a specific ID that i have in smarty {$user_id} but i'm having issue pulling that out from the table "cscart_users" field "email" I have researched for hour but couldn't find an example of this ...

0
Q: sql 'is not' ( <> ) is not working

user2763309I have no idea what I do wrong... this is my code: SELECT * FROM messages WHERE userId = "6" OR toUserId = "6" OR toAll = "1" AND id <> "4" ORDER BY time DESC LIMIT 1 The problem is that the 'is not' (<>) is not working, it still returns a result where id is 4. What's the problem?

0
Q: PHP Mail: Not Received

Michael WatsonAlright, here we go. So there's this legacy client of ours that has apparently been having email troubles on a site I had no involvement with in the distant past. Their emails were being received nicely up until (allegedly!) a month or so ago. They initially wanted a captcha for the form so ...

0
Q: PDF attachment sent via PHP not always working

James KordenI made a simple email registration system with a validating md5 hash. When the validating link has been followed and the account becomes "active", I am trying to send a pdf to the user. This is working sometimes, and not on others. I am using the following code: $subject = 'Your free PDF'; $...

0
Q: Checking if site is overloaded

James PoulsonI've seen some sites that display a message to say that they are overloaded. Is this done programatically ? Or through a server setting ?

0
Q: how to convert this json data in php

KapilI am using an api which is giving me a very strange json format.. i'm posting its data which i am getting thru it.. info = { "title" : "Asian Dad: B Again!? (you die)", "image" : "http://i.ytimg.com/vi/IN7o2Iy89WQ/default.jpg", "length" : "2", "status" : "serving", "progress_speed" : "", "progre...

0
Q: Group post by name from 2nd table php

Milan MilosevicThis is litle complicated query for me, but if anyone have idea please post id... I want to make something like this SITE 1 post post post SITE 2 post post post here is my query $result = mysql_query("SELECT content.* FROM content WHERE content.site IN (SELECT site_id FROM site_subscr...

0
Q: What is the technology with best mysql performance?

JackTurkyMy client asks me to design and develop a website that allow people to search between 30 different sources (some are SOAP webservices and other just simple xml feed). Since every search request of sources requires 0.5 second in average, i prefer to use a Java Servlet to perform a multiple parall...

-2
Q: Learn zend framework

D. N. SahooI would like to learn zend framework, I haven't done any projects in ZF. Could you please let me know whether ZF2 is good for me or older version of ZF to start learning. Please give some video tutorial urls or name of good books contains example to learn.

0
Q: How to ad if statement

C DogNeed some help with trying to add on an if statement to the following code. // determine email $email = '<a href="mailto:' . get_post_meta($post->ID, 'resource_email', true) . '">'. get_post_meta($post->ID, 'resource_email', true) .'</a>'; $tpl = str_replace( '%%EMAIL%%', $email, $tpl ); What ...

1
Q: Bulid recursive function run on stdClass Object

PHPILI want to build item tree with recursive function...(<ul><li>) someone can help me with this? how can i run on this array? for example... I use Codeigniter If it changes anything.... Array ( [0] => stdClass Object ( [id] => 1000 [children] => Array ...

0
Q: Symfony2 and composer not installing packages

SvengaliI'm trying to install the FOSUserBundle on Symfony2. On trying to run this command in the Terminal composer update friendsofsymfony/user-bundle I am presented with this error: Loading composer repositories with package information Updating dependencies (including require-dev) Your r...

0
Q: How to store user information in php and then display it in a table

WyattI am trying to create a table of login credentials. I have a login button that takes usernames and passwords and is able to send them via POST. I would like to display the information in an html table. My index.html looks like this: <html><head> <title>Login</title> </head> <body style="left:-1p...

0
Q: getimagesize() fails on valid image reference

ShiquemanoI am trying to determine metadata for an image. This code works for every valid image reference I have come across, until now. Here is the code I am using: <?php $url = "http://206.196.103.100/Vendor%20Images/ADI36462.jpg"; try { list($content, $img_info) = captureImageData($url); pr...

0
Q: What are some good practices to insert properties for class and methods to a class?

piosoiqNow, I know almost everyone is going to say through the injecting it thought the __construct() But, what is you have around 10 parameters, and they are different in that some handle database connections, others import properties to class, and others apply only yo specific methods inside the class...

0
Q: Duplication of assets

LogicLookingI recently asked a question about rendering assets, based on an array passed in, any ways I have re-factored my class since, but now I am getting a different kind of issue - and the re-factoring must still continue yet as some methods are longer then intended. Any ways, in the example of CSS, I ...

0
Q: How to compile PHP to be portable?

rooseveltI can compile PHP etc... but I am trying to make it portable so all the paths to the modules, php.ini file are self-contained and portable. But I noticed that after I compile using something like configure --prefix=.../ --eprefix=.../ make && make install The PHP executable actually searche...

-1
Q: PHP HOW TO GET SUM, get the row value of my yearly expenses using php, i want to get the sum horizontally

user2820747i have this year expenses jan feb march april may june july august sept oct nov december TOTAL 2009 waterbill 56 33 232 12 67 112 768 2322 45 355 34 45 ? 2009 office exp 5 67 555 56 77 32 22 444 44 445 43 34 ? the question mark indica...

0
Q: showing loading image php

LmxcI am trying to show loading image until php excutes, the query works on the second page but the results aren't showing on the first page, I know I am missing something here, can someone help me out? I am new to jquery or ajax thing. home.php <html> <head> <!--Javascript--> <script type="text/ja...

0
Q: attaching javascript results to PHP Mailer

user2756478I am having an issue with my PHP Mailer. The mail is sent, but it is only reporting the $answers_correct variable in the email results. I would like to also have the users name input and $failedQuestions variable to be sent via the mailer. Here is a JSFiddle link: Any guidance would be much ap...

-1
Q: country of visitors php

Bashir AljounaidyI have php code to fetch my visitors ip adress and send it to my email how can make php sending the country of visitors with thier ip to my email ? i tried with "http://www.codetrip.info/iframe/getcountry-city.php?ip=" but how can fetch this data [country] => US [region] => from this ...

-1
Q: Upload files using HTML and PHP

Matthew Borg CarrI need to create a function that allows the user to upload a file from his/her computer to the web server. To do this I want to use HTML & PHP. Please note that I want to have the php file separate from the html code. HTML CODE <input type="file" name="upload.php" style="display: none"/> <...

0
Q: PHP - passing parameters through session (security)

Panos AlymatirisI am a new programmer and i use PHP. I know how to pass parameters between pages with 2 ways: using POST and <input type="hidden"> using $_SESSION["variable_name"] I find the second way easier. My wonder is if it is as secure as the first one, because in most tutorials i see they use the firs...

-1
Q: MYSQL post query - not working need advise

Coopers SeafoodCan someone take a look at this and maybe see why this is not updating my database? It is a form that pulls data from my database and when I click the update button it SHOULD update the database, but it dosn't. Is there a way to show if it is returning a error? <!DOCTYPE html PUBLIC "-//W3C//...

0
Q: PHP isset not working with blanks

SC-LeeI am just getting back in to PHP after many years and building a basic sit to start things off. I have an index.php on my root and want to check for input from isset when either the value is ?home or just simply blank. So easy enough I can start with: if (isset($_GET['home'])) { include $_SERV...

-1
Q: PHP How to create 4G file quickly?

Jason OOOI wonder if there is easy way to write 4G data to a file, this is just for test, I want to create 5 files with 4GB data (Random data or any data) but as quick as possible? Please just provide me an approach or guide. Thanks for reading.

0
Q: Do I need html tags to do carriage returns?

KimomaruI'm working on a problem whereby identical output is being presented differently on an html page. If I have; Test Test as an entry in a database table, one part of my page will permit the linespaces (which I want), but another part of my page will not and just cut out the spaces, making ...

1
Q: Mysql Join Won't Select

Nicolas RacineI have been doing a lots of research online and from my understanding i think my query is ok That is why i need your help to point me out what im doing wrong. What My Query Should Do My query should fetch our stock level from both warehouse Problem Is if the product is not in both warehouse t...

1
Q: Laravel 4 passwords and python

Godzilla74I have a hashed password using the Hash::make() function of laravel when a user is created. I eventually need to take that hashed password, and pass it to a python script to perform a login and download of site resources. I know the hash is a one-way action, but I'd like to keep the password ha...

0
Q: PHP Mysql insert if exist modify field

Styrso my actual code is: for ($i=0; $i<sizeof($array); $i++) { if ($array[$i]) { mysql_query(" INSERT INTO guest(nomeconv) VALUES( '".$array[$i]."', )"); } } but i want if the value of $array[$i] already exists in table, i want to add $array[$...

0
Q: How can I compare the content of the database with the input?

cring/*I am new in php. I know I can connect to the database. I had check it before I revised my code. I have to make my code goes this way. When the one logs in is the admin (it is stored also in the database test table user column username)the system will direct to tableedit.php but if the user is n...

0
Q: WP_Query by cat where cat comes from $_GET[] returns all post

juanmeanwhileI am trying to get all post of a cetegory throught a WP_Query: //url whould be www.blablabla.com/?cat=4 $featured = new WP_Query('cat=$_GET["cat"]'); where cat is the Http GET param. This retuns all the post ignoring the "cat" parameter. But if I write an integer value instead of the $_GET I g...

0
Q: I have implemented fullcalendar with php mysqli integration, but can't get the page to render events stored in the database

apothicI have managed to get events to add to the database by calling addevents.php and passing variables via ajax to the php script. I have events.php that SELECTS everything from the table and passes it back to the calendar (default.html) as a string. However the calendar will not populate. events.php <

0
Q: PHP href email on a page

user2820838I have this code **<dt>Email :</dt> <dd style="font-size:14px;"><?php print $user->email; ?></dd>** I would like to make the email clickable, what is the extra code i need to add to it? thank you

0
Q: php / any other language ,functionality of session?

user2820823How does 'php' or any other language that is server side ,stores session on client machine ? How does a server side language access client machine to store session ? could you help me out here ?

0
Q: Get txn_id with PayPal Parallel Payments

Wesly WaidOk So I have just about everything working with Paypal, the only thing I am not sure of is how to get the txn_id I save to the DB. This is what I get in from the IPN. transaction[1].id_for_sender_txn=537739490P362492Y transaction[1].id=86178217DM2623826 Now I am not sure Which one I am suppos...

0
Q: Add file attachment to send email action

Michael van EijdenWe currently try to add an attachment to a Zend_Mail PHP form. $file = $_FILES['file1']['name']; $at = new Zend_Mime_Part(file_get_contents($file)); $at->filename = basename($file); $at->disposition = Zend_Mime::DISPOSITION_ATTACHMENT; $at->encoding = Zend_Mime::ENCODING_8BIT; $mail->addAttachme...

0
Q: form needs to be submitted twice before sending updated data

craigso basic outline... I have 'posts' pulled from the database and displayed like so: <div class="blogtest"> <form action="process/updatepost.php" class="updatepost" method="post"> <input type="button" class='.$editenabled.' value="Edit"> <input type="submit" class="saveupdate...

0
Q: What's the best way of adding a time interval in PHP?

Nelson TeixeiraI want to add time to an existing date. I have 2 string variables: $date = "2013-01-05 10:55:15"; $interval = "50:25:10"; I want to calculate the final date "2013-01-07 13:20:25". The hours in time can be bigger than 23, meaning that this interval can be greater than a whole day....

0
Q: Is it more efficent to use AJAX to pull in page elements, or simply hide and show them?

Abtool KabashIn web development (jQuery more specifically) am I better off "pre-loading" my page before hand and just use jQuery to manipulate the DOM or the other way around. It is a question of the following: <div id="item1"></div> <div id="item2"></div> <div id="element><!-- AJAX --></div> $("#item1").c...

0
Q: Getting last item in count variable

Caden GrantSo I'm using WordPress and created a variable $post_count to track the number of posts. Right now I'm using if($post_count == 1) to add a class if it's the first post, which works fine, but I can't figure out how to get the last post. Would that be possible using just a variable to count posts?...

0
Q: php include or include_once function is not working

loganI have php code in parameter_file.php file as below. when i called this file in index.php file, its not reading any values ! parameter_file.php <?php $color='red'; $car='BMW'; ?> Body of index.php <?php include 'parameter_file.php'; echo "value is : ".$color; ?> Could you please tell wher...

0
Q: INSERT Statement not working Concrete5

William WilkersonIm trying to insert some values into the DB inside a concrete5 single page and it's telling me that my syntax is wrong. I'm not sure where the syntax is wrong because i went by what was on their website. My code is Below. <?php defined('C5_EXECUTE') or die("Access Denied."); $db = Loader::db(); ...

0
Q: PDO update error

Edouard LibionI'm asking you because I'm stuck for a all day. I'm trying to make a UPDATE script for a wargame that I'm making in PHP. Here is the script which must content the error: if(($donnees_reglages['maj_attaques']+86390) <= time()) { $selection_joueurs = $bdd->query('SELECT id FROM membres'); ...

0
Q: How to upload file via AJAX AND colorbox popup page

Hadi RajaniI'm a new programmer and stucked in a code. I have a page called addstudents.php.. And I am showing this page in colorbox (popup).. This (addstudents.php) contains form to upload file in this way < form id="Form_upload" action="upload_pic.php" method="post" enctype="multipart/form-data" > <...

0
Q: Data not being processed when user uses a single quotation in an input/textarea

aarogrammerI wasn't too sure on how to word the title, so I'll try my best to explain here. I've created a register system and came across a bug that I never took into consideration when developing the system. When a user types in the input boxes or a textarea, if they use single quotations the data won't ...

0
Q: Best approach to duplicating a form on request in Symfony2

B RadI have looked all over and have found limited answers and maybe because its so obvious that its never needed to be asked. I am trying to create a form. The purpose of this form is to allow members to recommend others to the site. You need to fill out first_name, last_name, and email. The pr...

-1
Q: using pre defined sql query with mysql

user1091286I am new to php and there is something I cant understand nor find an answer to (I googled quite a bit) - I need something similar to safe sqlsrv_query with a mysql server on the php manual on php.net It says that mysql_query() is deprected and the aletrnatives are not supported in some servers.....

0
Q: Can PHP find a number in a list similar to Coldfusion?

KeithWI am converting a Coldfusion website to PHP. I have a query that looks in a list of comma separated numbers to see if there is a match and then responds accordingly. This is the where statement I am currently using. WHERE (`link_issue_category`.`Category_ID` IN (<CFQUERYPARAM value="#Category_...

0
Q: Mongodb and php find()

PioI have a question on how to do properly a find: $res = MDB::alloc()->{'game'}->findOne( array( '_id' => $this->gameID ), array( 'currentRound' => 1, 'answers.round_'.$round.'_'.$iteration => 1, ...

0
Q: Get request parameter in embedding controller

claudio3949In Symfony1 i can: blog: url: /blog/slug param: { module: blog, action: index } and in action/controller i can get slug with: $request->getParameter('slug'); In Symfony2: blog: path: /blog/{slug} defaults: { _controller: AcmeBlogBundle:Blog:show } and i create "componen...

0
Q: CakePHP Architecture

Pete BekiszI'm trying to figure out if there is a way to share controllers, models, and views for multiple CakePHP apps, but override specific methods within them if necessary. So, for example, if I had the following structure... /my_cool_app /core /app /Model Person.php ->findP...

0
Q: PHP : select all row but one?

user2820873I got some trouble with some part of PHP code. It's part of a CMS' module (Hikashop/Joomla). Here are the line : echo $this->payment->display('new_payment_method',$row->order_payment_method,$row->order_payment_id,false);} else{ $text = JText::sprintf('PAY_WITH_X',$this->payment-> ...

0
Q: Receive Option Value In PHP Form

Liam HodnettI have a PHP Form, I am receiving input fields with no problem, however I have a number of option fields which do not seem to send to the email client. Below is the HTML code and also the PHP script .. Any help would be greatly appreciated :) Thanks guys <form action="http://sellandmoveon.co....

0
Q: Zend Stack Trace not showing up due to fatal error

6elephantsI have a Zend 1.11 application that is giving me a similar fatal error when any error exists The Error is as follows: Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'No connection could be made because the target machine actively refused it. ' in C:\xampp\php\pear\...

0
Q: Send mails list with php mailer class

user2734398I try send mail list simple with the clas php mailer but i supose i have one problem in my code : $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authenticati...

-2
Q: fast crc checksum or hash for both javascript/PHP

y2kI am going to serialize some data into a string and I just need a hash or checksum of it. Something really fast in Javascript even on crappy computers. Collision rate doesnt have to be anything super special you know? I also need the algorithm in PHP too.

0
Q: cPanel backup script fails

Luca ScoglioI have a script which backs up my cPanel home directory. It first empties the target folder (to delete old backups) and then runs a home directory backup. I run this script using a cron job and am getting an error during the deletion phase. I'm using an FTP account which only has access to the pa...

0
Q: load js when loading a subview in laravel

arrowill12Is there a way to load js into the <head> section of the page whena subview is loaded. I would like to only load specific JS files based on the view that is being called. I am using the blade template engine.

0
Q: PHP accessing protected properties of an object from a static method

ChrisNot sure if this is even a question. My understanding of protected/private properties and methods is that they can only be accessed from within the class. I have a static method which is sort of a quick method for saving an object to a database. I creating the object from within the static method...

0
Q: Why I can not pass a variable between controller functions in codeigniter

John DoeI have this in a codeigniter controller: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Test extends CI_Controller { public $idioma; public function index() { parent::__construct(); // get the browser language. $this->idi...

0
Q: PHP PDO fetchColumn error

asdasd asdai am newbie at pdo and this is not my code i just need help for make it work properly. this the problem code: public function findTriplet($credential,$token, $persistentToken,$t) { // We don't store the sha1 as binary values because otherwise we could not use // proper XML tes...

0
Q: Using checkboxes to pass info to next form

Bill FlippenI run a query $querymail=mysql_query ("select sp.player_num as Pnum,concat(sp.first_name,' ',sp.last_name)as PName, st.name as Team, sp.email_address as Email,spt_league_id as League, ss.Season_name as Season from stats_player sp inner join stats_player_team stp, stats_team st, stats_season ss ...

0
Q: Magento Pull in addresses from separate database table to save under customer data when account created

CaitlinHavenerI have an extra field in my customer account registration where the customer can choose a US school from our database that they are affiliated with. We want to have the school address populated into the customer data when the customer account is created. I have turned on address fields in custo...

0
Q: Hide fields if it is empty

M IslamI am using this code, I want to just those field there is no empty if any fields is empty then not open the image from my sql server, Please any body can help me. Thanks in Advanced $Query = "SELECT * FROM movie_post WHERE id=$id AND NOT IS NULL(linkfrom2,m_link2,linkfrom3,m_link3,linkfrom4,m_li...

0
Q: How can I return an array/json object containing json objects through an ajax php call?

wizzkidBasically what I'm trying to do is returning the results of a mysql query. I know how to put each row of the query results into its own JSON object, now I'm just struggling with a way so that if there's multiple lines of results to return it to my jquery. In my jquery I call the $.ajax() function...

0
Q: Codeigniter - logout link doesn't works - session and cookies not destroyed

sbaaaangi made a simple logout url with the controller and it looks like this: class Auth extends MX_Controller{ function logout(){ $this->session->sess_destroy(); $this->bootstrap->unsetUserCookie(); redirect(base_url(),'',301); } } then class Boot...

0
Q: Get a Tiny URL's real URL and store as PHP variable

RCNeilI want to get the video ID of a Youtube URL, but often the URL is condensed into a Tiny URL when being shared. For example, I have a script that gets the Youtube video's thumbnail based on its video ID = <?php $vlog = "OeqlkEymQ94"; ?> <img src="http://img.youtube.com/vi/<?=$vlog;?>/0.jpg" alt...

0
Q: htaccess password protect files with different users

UziTechI have a files server and I use mod_autoindex to server the files. I have a username and password in htaccess so only certain people can access the files. I have added another user to htpasswd but I would only like that user to access some of the files/folders. Here is my htaccess file now: Aut...

0
Q: how apache recognises compiler?

user2820823how does a server like apache recognise that '.php' files will be compiled by the php compiler only ? I read something about libphp5 and php5_module.dll , but I couldnt understand.

0
Q: Out of memory error when trying to build a webpage from php with a lot of images

WolferI ran into an interesting (well at least in my opinion) problem. I have a PHP script that should generate the formatting (eg. the absolute positioning values of each image so they get displayed next to each other in a logical pattern) and the image sources when run. When completed it would load ...

0
Q: Regular expression to allow 1 digit at beginning of 5 letter group

TecBratI currently have this regular expression: /(^| )[a-z]{5}-[a-z]{5}( |$)/i start of string or space, 5 letters, literal dash, 5 letters, space or end of string, case insensitive. This finds a string that looks like this: pejnd-zxdgn I need to allow the first letter only to be a digit instead of...

0
Q: SQLite and PHP connection

AnanI am trying to connect the SQLite studio browser to fetch contents in spiceworks databse backup using PHP. I am confused after having read so many forums as to what exact code ill have to put up for connecting the SQLite and PHP. I presume it is--- $db = new PDO('sqlite:C:\Program Files (x86)\Sp...

0
Q: Why is this code executing?

HELPMEPLEASESeems like the last stretch is getting harder! So I have if statements and inside those statements code should execute if they are true. The problem is the code is executing even though its no true. Code that execute even though Spproved is set to 1 if($user_data['permissions'] >= 1) { /...

0
Q: lost $_POST array after sending form

Rafal WycislikI have written simple MVC framework to my engineering project and i have problem with $_POST data. I have form where I'm writing down sign in information and I will send it to /myfolder/user/do_login (user is controller and do_login is action and it is /myfolder/index.php?url=user/do_login)... An...

0
Q: Show file on website ( PHP/EXE/BATCH)

Malin PedersenIs it possible to run a batch-file when entering a spesific page, and then its visible on the webpage? for example: IF yes, will it then be possible to track down the batch file to view the batch itself source code? IF i format my batch file to a exe file, can it be done the same way? ( as sh...

0
Q: representing canvas image as an actual image in other pages

maxhere is my canvas image in a page called canvas.php <html> <body> <style type="text/css"> table { border=5; } </style> <p><canvas id="canvas" style="border:2px solid black;" width="500" height="500"></canvas> <script> var canvas = document.getElementByI...

0
Q: Decode JSON in Visual Basic 2010 Express

Josh Luke BleaseI am just learning the basics in VB 2010, and I am trying to design a program to maintain a database. I have a JSON string in the database that contains a list of image files and their relevant ID numbers. This is in JSON as a website also uses this data. The example code is {"0":"p184js94ku1gvk...

0
Q: Add file attachment to send email action

Michael van EijdenWe currently try to add and send multiple attachments to a Zend_Mail PHP form. Please see our code below: for($i=0; $i<count($_FILES['file']['name']); $i++) { $tmpFilePath = $_FILES['file']['tmp_name'][$i]; if ($tmpFilePath != ""){ $newFilePath = "./media/complaintsuploads/" ....

0
Q: Don't have access to index.html on apache?

user2747609I'm running Apache/2.2.15 (Red Hat) Server (I think). When I ssh in and run grep apache, there's no output. But...another file (index.php, read below) on the same machine/ip/directory is showing. I'm actually taking over for someone. Site/pages are kept at /var/www/html. In that directory there...

0
Q: What is the best tool for mongodb like phpMyAdmin?

Chandima RanaweeraI have used Rockmongo and phpMoAdmin but I can convert mongo JavaScript syntax to PHP. Is there a good tool to automatically build mongo queries in PHP?

1
Q: PHP JSON object nested loop data syntax

Michael SI'm trying to loop through some JSON data and pull out specific values. Here is the JSON data and the partially working code. $jsondata = ' [ { "id" : "421356", "trip_update" : { "trip" : { "trip_id" : "421356", "start_time" : "12:05:00", "start_date" : "20130926", ...

0
Q: replace a folder on server with content from another webserver with worpdress api?

Stephan AhlfDoes there exist an easy way to download, extract and replace folder in the Wordpress Api ? I cant find anything special in the api docs... http://phpxref.ftwr.co.uk/wordpress/nav.html?wp-admin/includes/class-wp-filesystem-base.php.source.html Is interesting but every thing points to plugin upda...

0
Q: PHPMySQL: How to determine if value already exists in database

ChrisI have a form button that I need to do two different things, based on user input and whether that input already exists in my database. If the input DOES NOT exist, then the button will create a new record. If it DOES exist, then the existing record will be updated. Here's my PDO query as it stan...

0
Q: Ebay Tradding API Get All Item that im selling

Nicolas RacineIm currently using this call GetMyeBaySelling Problem is this call don't return item that stock level is at 0. Im looking for an api call that would return me all item that i have

0
Q: Comma Delimited Arrays in PHP

user2440987so I am probably not phrasing this the best way but as an example, assume I have an array like this: Array ( [0] => 1,24,5 [1] => 4 [2] => 88, 12, 19, 6 ) And what I want to do is get this: Array ( [0] => 1 [1] => 24 [2] => 5 [3] => 4 [4] => 88 [5] => 12 [6] => 1...

0
Q: Image viewer js plugin wont work

user2620338Ok just to clarify this first, this is NOT homework! I have a gallery page that has 2 links on it both with a class .gallerylinks with href being 1 or 2. When one is clicked the class is sent to a js file and ajax posted to another php file to get all the records from a mysql table based on the ...

0
Q: How to load an extention in php's built-in server?

piosoiqIn the PHPs built-in server, I can see there are two php.ini-development and php.ini-production files, now, since I am trying to enable curl I un-commented both files and restarted the server, but everytime I need to use curl, php says, curl extention is not loaded, even with I checked even with ...

0
Q: BigCommerce API with PHP library - Create Order error with products field

Marc StedmanI'm having problems posting a new order via the BigCommerce API. I have many other API calls working and also tested the create order POST via the playground and it works. When using the PHP library, and using the following code, I get this error: The required field 'products' was not supplie...

 

« first day (219 days earlier)      last day (91 days later) »