« first day (309 days earlier)    last day (1 day later) » 

12:00 AM
0
Q: PHP Liip with OS X Server App

ladislav_pragueI'm running localhost server by using Website service in OS X server app. Which means, that I have to use php binaries installed by Apple. Is there any way how to use PHP 5.5 for OS X 10.9 as binary package found at php-osx.liip.ch.

 
12:12 AM
0
Q: Selecting dates and showinng results in PHP

Saqib RazaHi I have a table called "reservations" containing columns id serviceID dateCreated name email phone comments I want to that user can select date from "dateCreated" (dropdown) and then show the results right now I have this $tbl_name = "reservations"; "$select = SELECT * FROM ".$tbl_...

0
Q: Properly documenting a variable that links to class in phpdoc

DevonHow would I properly document this in phpdoc? I have a variable that links to a separate class, like so: public $link; public function link($class) { $class = "\\Path\\To\\Class\\$class"; $this->link = new $class; } Would I implement the phpdoc tag at the variable level or the function ...

0
Q: PHP ADODB instantiation inside a class from another class doesn't work

Marcoi've a problem when i call ADODB instantiated inside a class from another class. Take a look to this code: /*DB class*/ class Db{ private $db; private $dbName = 'default'; function __construct(){ if(is_null($this->db)){ $this->db = $this->connection(); ...

0
Q: How To Get NON-Duplicate Values using Zend DB model?

SameerafetchresultsAction public function fetchresultsAction() { $this->_helper->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); //$form_data = $this->getRequest()->getPost(); //$examcatID = $form_data['examcatID']; $examID = 'Exam_ID_001'; $Exam_...

-1
Q: PHP-Mysql Delete from entry number 1000 till the last entry

John PetridisHello there i would like to use a DELETE statement in Mysql in order to delete all the entries after the 1000th entry, but on the same time ordering the entries by descending order of a column... This is the code i am using: mysql_query("DELETE FROM 'tblname' WHERE @i IN (1000,ROW_COUNT()) ...

0
Q: PHP Function require_once doesn't show the exception message according to the custom unction

Navneil NaickerThe function below doesn't seem to work correctly. In the function load_module I' am using require function in PHP to get the file from Modules Folder. What am trying to do is, check if file is in the modules folder, if its exist then run the require_once function. When I try with the file on th...

 
12:47 AM
0
Q: Style input text through wordpress shortcode

dr azonHello I would like to do something like this in wordpress: [my_shortcode 'text1', 'text2', ... 'textn'] or something similar Desired Output something like this below: <span class="myclass">text1</span> <span class="myclass">text2</span> <span class="myclass">text3</span> ..... .......

 
1:00 AM
0
Q: why php server consider the add values as identifier_link in mysql_query?

Abdallh AbukhaderI have this problem with LIMIT and php this error (Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in D:\wamp\www\multi screen\company.php ) ... why?? $result=mysql_query("select * from safeway LIMIT $start,$end"); while($o= mysql_fetch_object($result...

0
Q: Writing a search filter -- filter at the SQL level or PHP level?

compguy24I have an ajax filter on a search page that filters teacher results based on a set of criteria that can be manipulated by the user. I'm trying to decide whether to 1) first go get all the teachers data, then in PHP make a new array of just those teachers who aren't affected by the negative filt...

0
Q: ORDER BY result from two table in one query

Milan MilosevicIm make a live search function at my site $result = mysql_query("SELECT word as type FROM keywords WHERE word LIKE ('" . $search . "%') UNION SELECT term as type FROM popular_search WHERE term LIKE ('" . $search . "%') GROUP by type LIMIT 10"); Im try get result from two table , as i can see t...

 
1:17 AM
0
Q: Removing Space after <H2>

Brian J KirkI cannot seem to get rid of the space between my heading 2 and the rest of the page. http://cnghl.biz/cnghldb/cnghlplayerinfo.php?PlayerID=823 Print "<body>"; Print "<div align='left'>"; Print "<h2>".$row['FirstName']." ".$row['LastName']."</strong></h2><br>"; Print "<table width...

0
Q: Parsing bbcodes PHP

user2981166My forum software is not liking me so I narrowed it down to one piece of code Here's the problematic code $post = filter($post); $post = nl2br(stripslashes($post)); $t = stripslashes($post); require_once('bbcode.php'); $bb = new Simple_BB_Code(); $res = $bb->parse_s...

1
Q: php while loop high cpu usage

andrewI have an ipcamera from which /video/feed/1.jpg (mounted as a ramdrive) is being written to at approx 5fps. Sometimes this can be less than 1 fps if the connection is poor. I'm trying to update the image in a browser every 500ms but i have two goals: I don't want the server to output the same ...

0
Q: Image not being displayed from a php file

user2853645Following is the piece of code which is not working:- img src="/old/datagraphsarchive.php?graphing=1&streamCode=ATQ_CALD&date=2008-07-04&iver=1" Is there any problem with the way I have specified the image source?

 
1:34 AM
0
Q: How will I go about parsing this information from html source

AndersI am trying to parse some html code in a table. I have organized the code as good as I could, so you can understand what I am trying to do. Code can be seen here: http://pastebin.com/q83Dk82Q From each 'tr' class "odd" and "even" I want to get the following information: <a title="Download torr...

0
Q: Loop isn't working for my Twitter API

user2970029I have a setup where it favourites and retweets a specific tweet. For some reason, the code works for the favourites however retweets do not. Can anyone see the issue? $method = 'statuses/retweet/'.$url[3]; $amt = "26"; $sub = rand(1,3); $amt1 = $amt-$sub; if($_POST['favorite'] == "true" || $_P...

0
Q: jquery datetimepicker addon am/pm - all pm string as am in the db

BinaryrespawnI am using codeigniter and jquery datetimepicker addon. On my view page I have the datetimepicker format like $(".traveler").datetimepicker({ dateFormat: 'yy-mm-dd', timeFormat: 'hh:mm tt', //other stuff }); In my codeigniter controller action method I have ...

 
1:51 AM
1
Q: How to expand a string with PHP, using the FROM and TO numbers specified within square brackets?

Soumalyo BardhanLet’s say I have the string http://www.example.com/images/[1-12].jpg. I would like to expand it into: http://www.example.com/images/1.jpg http://www.example.com/images/2.jpg http://www.example.com/images/3.jpg http://www.example.com/images/4.jpg http://www.example.com/images/5.jpg http://www.exa...

0
Q: hAxis.maxValue google charts

user3133641i am having Problems with Google Scatter Chart. The data contains user and their ratings for specific pictures. On the hAxis i have the users listed, on vAxis their rating. I create 15 different Scatter Charts, for half of them the hAxis is working, for some it will display +5 or +3 (e.g. 20 inst...

0
Q: Preg replace img without id

user3133659I can't figure out how to do a preg_replace to remove all img tags except for ones that have an id field e.g <img class="wpcf7-form-control wpcf7-captchac wpcf7-captcha-captcha-489" id="captcha-489-img" width="72" height="24" alt="captcha" src="http://mysolarpower.co.nz/wp-content/uploads/wpcf7_...

0
Q: error while submitting form

user3131961this form is not submitting. It shows error message. error: Unable to load the webpage because the server sent no data. Reload this webpage. Press the reload button to resubmit the data needed to load the page. Error code: ERR_EMPTY_RESPONSE Form code: <html> <head> <title>Home

0
Q: Issue with PHP mail form

user3105267Basically I have my PHP send an email to the person who signed up so then they their email will be verified. I did a test run and the link is generated with my database, its just the email that isn't making its way to the inbox. I'm not sure if its a delay or its an issue with the code, but any h...

0
Q: Inhalt Navigationsleiste scrollen

d3xDer HTML Code <div id="subnavigation"> <?php $verbindung = mysql_connect("host", "user" , "pw") or die("Verbindung zur Datenbank konnte nicht hergestellt werden"); mysql_select_db("db") or die ("Datenbank konnte nicht ausgewählt werden"); $sub_instr = mysql_query("SELECT ...

 
2:15 AM
-2
Q: PHP Time and Countdown Timer

user3131319How do I display the current time (7:02:11 PM) in PHP and make it real time. Then I want to display what period it is based on the time (e.x. 7:03:00 to 7:46:00 is period one and 7:50:00 to 8:35:00 is period 2 etc.). Then the time between each period (passing time) I want to display a 4 minute co...

 
2:33 AM
0
Q: How To Eliminate Duplicates of Following SQL Data Values?

Sameera![enter image description here][1]I need to eliminate NIC Number duplicate situation.please provide me SQL Query for that Screen Shot : http://colombo-radio.com/Capture.PNG

0
Q: Use javascript to send post request

user2898075I'm currently using javascript to send a post request to a PHP file on my server: function insertComment(id, status) { $.post("http://test.com/includes/insert.php",{id:id, status:status}); } However, how can I edit my code so that when the post request is sent and when insert.php is loaded,...

 
3:21 AM
0
Q: Symfony2: Update a generated object property when the object changes

Denis KisselevI'm currently working on a Symfony2 project and using Doctrine with annotations to do my object/database handling. I have an 'item' object which has two (related) properties, price, and price units. I'm looking to generate another property, priceString, which is "$priceUnits $price". I don't wa...

0
Q: PHP SimpleXML changes XML node notation destructively for reading with FileZilla Server

PhilGXML source: <Users> <User Name="test"> <Option Name="Group"></Option> </User> </Users> When editing content with PHP SimpleXML i get this notation: <Users> <User Name="test"> <Option Name="Group"/> </User> </Users> Problem -> It seems that FileZilla Server can't read this transforme...

0
Q: mysql is not responsing on xampp

user2714362I am using XAMPP server for my php/mysql projects. Today, when I tried to start apache and mysql, mysql failed to open saying "this may be due to a blocked port, missing dependencies, improper privileges...", and my phpmyadmin page says "#2002 - No connection could be made because the target mach...

0
Q: Compute all possible combinations of a certain number group with no regard to the order

SquareCatFinding a proper title for this is rather hard for me. Imagine a set of numbers: $numbers = array(10, 12, 20, 24, 34, 38, 41, 48); Then there is a specific amount of picks: $picks = 6; What i would like to do is generate an array that contains combinations of each $picks numbers, but those...

0
Q: Javascript button onclick get input value and submit post request

user2898075I have a form that looks like this: <form method="post"> <input type="text" name="username" id="username"> <input type="text" name="password" id="password"> <select id="item" name="item"> <option value="1">Blue</option> <option value="3">Pink</option> <option ...

0
Q: adding items from a for loop to a variable

indymxI'm using the following code (modified here a bit to remove secure items) to send email after my form processes and inserts data into the database. It works pretty good, but the one thing I'm really struggling with is the last for loop. On the form a person can select multiple classes that they a...

0
Q: using PHP switch control statement to list each table column and row in MySQL database

bright_wI am new to PHP. Please I need help with the code below.I am trying to use PHP switch statement to display table data from MySQL database based on the selection of a particular table. I have 2 PHP files (index.php and table_data.php). The file index.php has a function that list all the tables fro...

0
Q: Finding out the position of a particular key inside an array

black_beltI have created a class to find out the position / level of a particular key inside an array. I was actually trying to create a function but I ended up creating an entire class as I had to keep track of my counter. Although the class is working perfectly, I really need to get this done using a fun...

 
4:09 AM
0
Q: Is there a PHP function(or combined functions) which can directly convert <time> in GPX to local time?

Ray YenI am using simplexml_load_file to parse contains of a trip log file (.GPX). In it, the tag <time> records are of the GMT, and I am looking for a PHP funciton or a simple combination of PHP functions to convert it to my local time (GMT+8). I have looked through here and still can not figure out wh...

0
Q: Silence PHP cURL output in CLI

ultimateI am working on a scrapper (in PHP) and use cURL to fetch pages. The script can be run both in CLI & browser. This is my first time working with PHP on CLI and I was trying to make the screen pretty and have a nice data representation like scrape statistics show up. I am able to generate the ou...

 
4:21 AM
0
Q: var_dump present values but cant call them

drmoskoIm useing Google's Analytics API with the GAPI interface and find a difficulty to get results for this query, from print_r($resultsTotal); Array ( [0] => gapiReportEntry Object ( [metrics:private] => Array ( [avgTimeOnSite] => 102.38 [pa...

0
Q: Notice: Trying to get property of non-object help :(

Lee<?php include_once('connect_db.php'); $domain = $_SERVER['HTTP_HOST']; if($domain == "localhost"){ $domainx = $domain."/get-new"; } else { $domainx = $domain; } $domainx = str_replace("www.", "", $domainx); $query_domain_one = mysql_query("select dir_default_value from yellow_domain_detai...

0
Q: PHP/MySQL Limiting characters outputted from a field

Michael FalcigliaWhen I get a database array, sometimes there is fields with too much data for my results list page, which is suppose to give just a short description. How do I limit the characters count to something like 100. This is my array for the loop: <?php $i = 1; while ($row = mysql_fetch_array(...

0
Q: How to obtain latitude and longitude of a user by IP adress or pinpoint location

user111671Well basically what I want is to get the geolocation (latitude and longitude) of a computer user by a php script. I was using this one <?php // Get lat and long by address $address = $dlocation; // Google HQ $prepAddr = str_replace(' ','+',$address); $geocode=file_...

-1
Q: Echo not working in JQuery Ajax call

ShantanuBelow is a code snippet of my PHP file - I am trying to call a PHP function on click of a button. Simple echo is not working - appreciate any help /* This function saves Add or Make of Model to Database */ $('#addmake-btn').live('click',functi...

0
Q: xampp database backup with 'data' folder

user2714362I have mistakenly uninstalled XAMPP without a database backup, but I had copied the 'data' folder, using that can I restore all my databases with a fresh XAMPP installation?

0
Q: PHP - search from title, content , tags

user3085393i want to create a search engine for my website.. i have two tables in database id article_Title cat_id Content 1 ways to earn 1 you can earn from adsense 2 earn with adsense 2 earn money from adsense and freelancer And Category Table cat_id cat_tit...

0
Q: Making a website with PHP and MySQL

JRizzlyI am trying to make a website that is somewhat similar to that of Urban dictionary dot com. Instead of words (terms) that people comment and vote up and down, I would like to use profiles which I have already taken care of using PHP and MySQL. Can you provide me with a good method explaining ho...

 
4:56 AM
0
Q: How to cache data with pagination?

karamI want to save data from db to cache and view chached data with pagination. I try this code in model: public function fetchAll(Select $select = null) { if (null === $select) $select = new Select (); $select->from ( $this->table ); $whereSrch = $this->getWhereSrch(); ...

0
Q: Failed to load TinyMCE JS (Codeigniter)

dotslashI'm building a simple document management application but the TinyMCE JS is failing to load (403 error). First I thought this had something to do with file permissions and so I recursively changed everything to 777 (yes, stupid of me but I badly wanted this to work); but this didn't solve anythin...

 
5:14 AM
0
Q: What is a difference between service.yml and config.yml in Symfony

scalopusIn config.yml, I see root element such monolog, web_profiler. Are those services that can be configure in service.yml instead? In the other way, my service that defined in service.yml, are there possible to defined in config_dev.yml, config_prod.yml instead? what is the difference in term of str...

0
Q: what is the method to have swipe functionality with dynamic data in jquery mobile

user3132041what is the method to have swipe functionality with dynamic data in jquery mobile, i have used wow slider but the data is sliding normally that too i used static data. but what i need is swipe functionality with dynamic data can someone help me please thanks. the code i am using now is as follow...

0
Q: Set date picker to a given date

VaMooseIs there a way to set a datepicker to a given date? I have tried this: <input type="date" name="dob" value="<?php echo date('yyyy-mm-dd', escape($user->data()->dob)); ?>"/> but it doesn't work. I just want to know if it is possible, but it can't just be set to 'now'. The only help I can see...

 
5:32 AM
0
Q: Insert data through ajax into mysql database

sarmisthaNewsletter: <form id="form-search" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>"> <span><span class="style2">Enter you email here</span>:</span> <input name="email" type="email" id="email" required/> <input type="submit" value="subscribe" class="submit" onclick="return fun(...

0
Q: HTML Table to Ms Excel Using PHP and jQuery

BehseiniI am trying to export an HTML existing table to MS Excel with assigned Name. As you know exporting HTML Table to Excel file can be achieved by jQuery BUT as I said I have to add a Name to File as well. HTML <button id="myButtonControlID">Export Table to Excel</button> <div id="divTableDa...

0
Q: return the last id when insert the data in mysql using PHP

ashSystemDebugIm trying to get the last id after inserting data into mysql.I already try using mysql_insert_id() but it seem doesn't work. Below is the PHP code : function addPhoneContact($customername ,$address ,$email ,$comment,$remarks){ $connection = MySQLConnection(); $conf = new BBSup...

0
Q: Symfony 2 Primary key is one to one relation with parent table

user3133882I have two entities: User and UserProfile. At user entity primary key is autoincrement and named intUserID. UserProfile antity have the same primary key (but not autoincrement) and associated with User entity. When i'm trying to insert all user data to this entities, doctrine throws an exception:...

0
Q: Error message Notice: Undefined variable while include function in php

Navneil NaickerI have too separate PHP files: add-new-module.php _add-new-module.php I' am using the function require_once _add-new-module.php in the add-new-module.php at the very top of the page. I have initialized the variable $msg into _add-new-module.php for some reason its still showing up error messa...

0
Q: array from post into a single mysql row

BEBOI have an array that is built based on dynamic rows that changes every time. I am able to post the array but i get each field in a separate row. How can i insert the array into a single row. Here is my PHP: <?php include_once 'dbconnect.php'; if (isset($_POST['item_name'])) { $table =...

0
Q: Session ID on page reload

Krishna MI have some questions in mind. Whether Session id is generated only once ? Whether Session id is generated again when we refresh(F5) the page ? Whether Session id is generated again when we reload(Ctrl + F5) the page ?

0
Q: Cant figure out the right php variable

Nukerim working on a php site and there is variable called $record which when echoed produces the following: Array ( [saved_form_id] => 3 [title] => profile [comment] => プロフィル [code] => [fields] => [{"id":"fieldset-1","class":"fieldset","labels":{"Fieldset title":"\u57fa\u672c\u60c5\u5831"}},{"id":"a...

-2
Q: php script takes long (7 hrs ) to be executed

Mohanphp script takes long (7 hrs ) to be executed, Though i set max execution time to unlimited. What is your view about it. What would be impact on the server of it?

-1
Q: Mysql php server

user3133918Do mysql+php server saves user information of a website I want to build a website in which people can create account and share music So how and where to save users name,password,birthday,so that at the time when user want to log in server can check if username and password are right or not as we...

0
Q: invoke joomla preloader in javascript

user3126531I have a modal popup in joomla that will populate fields in the parent page when clicked. However in this modal form, there is a setTimeout being use in the javascript which is needed due to the nature of the parent form. The whole process of populating field works perfectly. However due to the ...

0
Q: php:generating a barcode and sending it in a PDF file

user2215270i want to create a barcode, send it in a PDF file . i am using . i use http://www.barcodephp.com/en to create barcode .and it works fine .but my main issue is i dont know how to send in my PDF file.when i include my barcode files it shows nothing. code : ` $mpdf=new mPDF(); $mpdf->Bookmark('St...

0
Q: How to add sub menu dynamically

user2542724how can i append year and 5 different years from 2014 to 2005 as a get variable. eg. http://localhost/{project}/{category-members}/{subcategory-executivemembers}/{year}/2014 http://localhost/{project}/{category-members}/{subcategory-executivemembers}/{year}/2013 http://localhost/{project}/{categ...

0
Q: Do string manipulations on catalogsearch result url's query

Mr_GreenI am trying to include "Category" search in the Advanced search of my project. By going through some Stackoverflow questions, I realized that magento has built-in code for category search but they haven't used it. I mean while searching if I add a param as cat then that will represent Category. ...

0
Q: Get response from ajax and parse the response with html on webpage

HemantI need to run a search using Ajax, such that the response I get from Ajax (should not contain HTML, it should only contain data) is fetched on webpage and then parse that response with HTML on the page and display. I want to know can it be done, if yes then how to do it. Also is it going to make...

0
Q: How to redirect a page using onclick event in php?

user3133944I tried with this code but its not working ... <input type="button" value="Home" class="homebutton" id="btnHome" onClick="<?php header("Location: /index.php"); ?>" />

0
Q: SQL Value to PHP Variable

Tyler KleinSo, I originally tried to use the functions in Javascript, but as I can't pass vars back to PHP, I decided I needed to code the functions in PHP. I need to use rows from my SQL query as arguments for my functions, or I need to define them as variables, either one works. For example, I need to d...

0
Q: getting a particular array and echo its value

user2875703i have this scriptfrom a free website file i got, here is the subject script: foreach ($auth as $a => $a1) { //$a = strtoupper($a); if (in_array($a, array('CASH','VOTE','ID','IP','PLAYTIME','PCOIN','CREATEDATE','LAST','SPENT','CONNECTSTAT'...

0
Q: php loop through array with duplicate index

user3073972I am trying to loop through an array with duplicate index but it only prints 3 times not all of them I want to print all values in the array is that possible? here is my code $data['Video'][0]['name']='a'; $data['Video'][1]['name']='b'; $data['Video'][1]['name']='c'; $data['Video'][3]['name']...

0
Q: if any body can help in submitting a product via seko rest api in their hub?

user1782022 We have Creating xml according to api documentation and since Seco team has added products we have started getting a response, but still they need to let us know actual parameters that need to be sent through our call , because dummy parameter are not going to work there. We are facing problem ...

0
Q: PHPUnit: Failed opening required `PHPUnit_Extensions_Story_TestCase.php`

JustinI installed PHPUnit with: wget https://phar.phpunit.de/phpunit.phar chmod +x phpunit.phar mv phpunit.phar /usr/local/bin/phpunit Trying to run a simple test, but getting: Fatal error: require_once(): Failed opening required 'PHPUnit_Extensions_Story_TestCase.php' How do I install PHPUnit_Ex...

0
Q: PHP- Socket recvform and sendto give Error

imackidHi I am making a PHP Minecraft Player List but the Code I am trying to use does not work. It gives out this error: Warning: socket_sendto() [function.socket-sendto]: unable to write to socket [1]: Operation not permitted in... Warning: socket_recvfrom() [function.socket-recvfrom]: unable to rec...

0
Q: disable back button in php page

user3128920I have a reponse url "reponse.php" is which after a trasaction is done,the banks response is posted to it and inturn display the status to the user whether trasaction is succesfull or not.But the problem is,when user lands in this,the back button is active and user can click on it and go back.I ...

0
Q: weird slash appears in html

Igor SavinkinAs i do some html markup thru php output: echo '<h2>Events Calendar</h2><table border="2" width="100%"><th>'; ... a weird slach appears in this way (under Events Calendar and above the html table markup): As i look in debugger i find no hint where it's from... The table markup is ok, all ta...

0
Q: “Invalid controller specified” error in zend framework 1

LeninI have a Zend Framework project previously half done by other programmers. With it another application is directly bridged into Zend's public folder under public/hrm folder. The application seems to run okay. But at the apache error log I constantly find these errors. [Wed Dec 25 12:33:00 2...

0
Q: How to give selected value in dropdown list inside while loop

JoelWhen I select a value in this dropdown, a javascript function will work and it will give a GET value to URL. Now I want to give that selected value as selected in this dropdown list. How to do that? <?php while ($row = mysql_fetch_array($res)) { echo '<option value='.$row["id"].'>'.$row["name"].'<...

-3
Q: implementation of the eregi function (this is not a duplicate!!!!)

unicorn Please Don't mark this as duplicate Because there no way back from there!!!! I got an old code I need to run on a newer php version and I got eregi in a lot of places, some with normal text and some with regular expressions, so I need the implementation of the function so I could do: if(!fu...

1
Q: PHP array values in a sequence

MudiHi i am retrieving values from my database to my web page. here is my code foreach ($rows as $r) { echo $r->title; } Now I want all my title values to be saved in a single variable separated by commas for example $new_var = title_1,title_2,title_3; how can i do that??

0
Q: values are not being inserted into database?

user3133995<?php include 'config.php'; $lat=$_GET["latitudee"]; $lon=$_GET["longitude"]; $sql="INSERT INTO coordinates(latitude,longitude) VALUES ('$_POST[$lat]','$_POST[$lon]')"; if (!mysqli_query($con,$sql)) { die('Error: ' . mysqli_error($con)); } echo "1 record ad...

0
Q: uploading file via ftp using codeigniter but showing error message

Muhammadi am trying to upload file using ftp class of codeigniter, but it is showing me: "Unable to upload the specified file. Please check your path." and in filezilla log i am getting: "550 Filename Invalid." Please have a look on my code below and help me out to solve this issue.. i am usign xamp...

0
Q: could not open file composer.phar

SundarI am trying to install zendframwork using composer tool in windows wamp server. The following steps are done towards installation I downloaded the Composer-Setup.exe file from composer page and got successfully installed. I downloaded the zendframwork and extracted inside the c:\wamp\www\zend...

0
Q: How to remove posted date and auther name from the_excerpt()

Dk-MacadamiaIn my website there is a social button for sharing post. It is working fine but I dont want post date and auther name in sharing content of facebook.. see image as you can see in image marked by red line. for sharing I am using it.. <!-- for Facebook --> <meta proper...

 
7:14 AM
0
Q: Drupal 7: Reorder the css files

Deepti KakadeI have included the following css files into my_theme.info file stylesheets[all][] = style.css stylesheets[all][] = css/all.css stylesheets[all][] = css/static.css and this files are loading on every page, but my particular css file associated with page is loading before the above css files. B...

0
Q: Export specific database tables in php

kfirbaI've a database with 50~ tables in it and I would like to create a "backup" button which will result in a file that contains almost all of the tables(I will have to specify which tables I want to export in the code) in an insert query(.sql file) so if something happens to the tables, I will be ab...

0
Q: Yii gridview pagination custom event click

Thanh KhánhI'm using CGridView to display grid data, include pagination. When I click on a page, ajax request is called and update result to the gird. But I want it do other thing when I click on a page. Here is my code : $('#myGridID .pagination li a').live('click', function (e) { //I want do someth...

0
Q: How to add Caching Header meta to a CSS, JS and images using joomla?

alnassreI'm working to make the joomla faster,how ever it work in PHP. I would like to apply the caching on the CSS,JS and images. I read this topic Leverage browser cahing and this is what i need, But i don't know how to apply it. Those are the meta that I need to add. Expires, Cache-Control: max-age,...

0
Q: Replace a div with another div in ajax/javascript?

sarmistha<div class="col" style="border-right:none; color: #FFFFFF;"> <form id="form-search" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>"> <span><span class="style2">Enter you email here</span>:</span> <input name="email" type="email" id="email" required/> <input type="submit" value="subscri...

0
Q: Assigning jQuery / HTML to PHP variables

MaazI've got this script here. <li><script id="sid0020000048947519509">(function() {function async_load(){s.id="cid0020000048947519509";s.src='http://st.chatango.com/js/gz/emb.js';s.style.cssText="width:299px;height:433px;";s.async=true;s.text='{"handle":"phanime","arch":"js","styles":{"a":"404040",...

0
Q: only first 800 rows coming in phpexcel out of 2701 rows

Mr coderI am running a mysql query which results in 2701 rows.i am using PHPexcel.but when exporting on excel only first 882 rows are displaying in the excel file.while commenting the below line of code i can see all the 2701 rows in the white background but its not coming in excel.I am using a 'for' loo...

0
Q: Colors convert to rgba or hex in php

user3134057How to convert colors "blue" or "green" or other colors to rgb or hex in PHP? hexdec or dechex no help me.. Thanks! sorry, my english, not good.)

0
Q: What does @ do?

user689I found this tutorial on making a try it editor for a website. I understood everything in the code except the @ in the result.php: Result.php <?php $myCode = @$_REQUEST["code"]; print $myCode ; ?> Also I tried removing it from the code and nothing changed, so what does it do?

0
Q: I created a new facebook app , but when i run it is shows timeout error

user3122834I created a new facebook app , but when i run it is shows timeout error. my app url is https://www.facebook.com/mostlikingflirt Help will be appreciated. thanks.enter code here

0
Q: Laravel hasMany relation count number of likes and comments on post

user3134069The code: $posts = Jumpsite::find($jid) ->posts() ->with('comments') ->with('likes') ->with('number_of_comments') ->with('number_of_likes') ->where...

0
Q: mod_rewrite: GET variables are wiped out

user1198407I have the following rewrite rule, RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ci.php?/$1 [L] The above was wiping out the GET parameters. After reading some posts on here, I used the [QSA] parameter with hopes that t...

0
Q: does codeigniter allow developer to test the ftp class on local ftp server

MuhammadI wanted to know does our lovely codeigniter allow us to upload a file using ftp class to the ftp server located on local machine, example i am using xampp server and filezilla which comes with the xampp server but i am not able to upload the file on my local server.. while i have a working code...

1
Q: PDO inserting double data

user3117992My code is working, except it's inserting double data into the database, for example, if i type in john for username, and 123 for password, it insert it twice! how can i get rid of it? <form method="POST"> <input type="text" name="username" placeholder="username"><br /> <input type="pass...

0
Q: php Getting value from an array

AlbabI have this code : echo "\nResponse: ".htmlentities($jsondata)."\n\nArray: ".print_r($arr,true); which outputs: Response: {"result":"success","clientid":83} Array: stdClass Object ( [result] => success [clientid] => 83 ) I just don't know how to get this 83 stored in a variable say $cli...

0
Q: display header and footer section of wordpress in to other framework

Neeraj SharmaI want to use worpress header footer section in codeigniter. I have to use 1 header footer from a wordpress site to codeigniter site.

0
Q: Array seems to drop first element

BlaineI make a request to a database and get the following data from it: array(5) { [0]=> object(stdClass)#39 (3) { ["route_id"]=> string(4) "1103" ["route_date"]=> string(10) "2013-12-24" ["truck_id"]=> string(1) "0" } [1]=> object(stdClass)#38 (3) { ["route_id"]=> string(4) "1104" ["route_date"]=...

0
Q: Why are strings "0e368798" and "00000000" equal, per PHP's equality operator?

AmanCan someone explain why the following two statements return true? if ('0e368798' == '00000000') or if ((string)'0e368798' == (string)'00000000') Why do I have to use the strict operator to check the equality of these two strings?

0
Q: Javascript time control?

osmansertfirst press a key before produced code. after second press not produce code. after 18 hour. how can I do ? my html code <p id="demo" name="code"></p> <button type="button" class="btn btn-success" onclick="myFunction()" id="gonder">kodu goster</button> my javascript code.. <script> ...

0
Q: Stick navigation bar delay

PraphaelThis issue I just can't wrap my head around. The nav. bar on http://digitalblare.com stickies to the top of the page and scrolls up and down with the user, but there's a delay of at least 10 seconds before it does it. Basically once the page loads, for the first 10+ seconds the navbar does not ...

0
Q: Yii : Showing suggestions when data is entered

sushWell this is how I want it to be: There is a app which has records of the book in a library. Data of the book is entered. Suppose there is already an entry about that book. The app must show that there is a book with similar name. The suggestion must be showed if the Name of the book, the autho...

0
Q: How to combine two lines of array and object selection into one?

NateI have two lines of code that are like this: $arr1 = $obj1->$arr2[$obj2->prop1]; echo $arr1[0]->prop2; I'd like to have them on one line, like this: $arr1 = ($obj1->$arr2[$obj2->prop1])[0]->prop2; But PHP throws an error when I try doing that Parse error: syntax error, unexpected '[' in ....

0
Q: when i run project in netbeans one window page has opened in that i got following error..

user3132242strong text The connection was reset The connection to the server was reset while the page was loading. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network ...

 
8:06 AM
0
Q: Check whether all values in an array are equal to X number in PHP

Nukeri didnt know how to title this topic so sorry about any misunderstandings. I have an variable called $value that generates something like this: Array ( [0] => Array ( [id] => fieldset-1 [class] => fieldset [labels] => Array ( [Fieldset title] => info ) ) [1] => Array ( [id] => name [class] => na...

0
Q: PDO login if statements

user3117992I'm trying to check if my users inserted in the correct information and it's giving me an UNDEFINED PDO error. I want to be sure if a user fills in an incorrect password/username they get the error I've set, but its now coming out that way. <form method="POST"> <input type="text" name="use...

0
Q: hit counter with php and mysql database

user3103764I'm tring to make a simple php visit counter... i write this code <?php $Connect = mysql_connect('Localhost','root',''); $Database = mysql_select_db("myDatabaseName"); $CurrentVisit = mysql_query("SELECT visit FROM myWebsite"); $NewVisit = $CurrentVisit+1; $UpdateField = mysql_query("UPDATE my...

0
Q: how to get java script return value to php variable ?

user3133944i have created a java script for check the text boxes are empty. if one of text box is empty the return false. so how can i get that return value to a PHPvariable ?

0
Q: how to get height in touch devices

user3134118I know I can use scrolltop() in javascript to get the height of the current position, but it only works when the user stops scrolling. In touch devices, it will not be able to get height when the user is scrolling. How do I get the current position even when the user is scrolling?

0
Q: what am i doing wrong in these php scripts?

VVVHere is config.php <?php define("DB_SERVER","localhost"); define("DB_NAME","photo_galley"); define("DB_USER_NAME","root"); define("DB_PASSWORD",""); echo DB_SERVER."config file<br>"; ?> Here is classes.php <?php var_dump(include_once("config.php")); echo DB_SERVER."class file<br/>"; ?> <

 
8:36 AM
0
Q: How to Export Data in CSV in Multiple Sheets in a Single File?

Krunal ShahI have developed CAKEPHP code for exporting data in CSV format. It is working fine , but my question is if i want to export data at multiple sheet or in other words if i want to export data at "Sheet 1" and "Sheet 2" and "Sheet 3" in a single CSV file, how can i make it possible? thanks in adva...

0
Q: How to echo multidimensional array using few codes?

user170654i have two scripts. One is named as index.php and other is home.php. index.php is used for login (verification of username and password using in_array) and then redirecting user to home.php. Here is index.php: <?php session_start(); ?> <html> <head> <title>Log In</title> </head> <body><c...

0
Q: Submit selection from Bootstrap dropdown menu to $_POST

user3108671My goal is to submit the users selection from a bootstrap dropdown menu to $_POST. As I was researching this question I came across this (bootstrap input field and dropdown button submit) My question is very similar to this one. However, when I tried what the answer to that question recommended i...

0
Q: PHP Mail with attachment sending only attachment

SASHIPlease check my PHP mail attachment program. its only sending the attachment not the mail body. I have tried to open the attachment but the attached files is corrupted. Full Code with JQuery http://pastebin.com/T0WtnxbT PHP mail Attachment Script <?php error_reporting(E_ALL ^ E_NOTICE); // h...

0
Q: TCP error on a ZendFramework App

LeninMy app runs okay on local dev machine and two other cloud servers. But on a client's cloud its under firewall so having the TCP error: PHP Fatal error: Uncaught exception 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect to tcp://mydomain.com:80. Error #110: Connectio...

0
Q: PHP & MYSQL - GET POSITION OF ROW

JohnCan you return the position of the row in comparison to the previous search. For example if I did a simple query: select * from table where name='aa' it would return +--+----+---+ |id|name|cid| +--+----+---+ | 1| aa| 2| | 5| aa| 2| | 8| aa| 2| | 9| aa| 2| |10| aa| 2| +--+----+---+ I...

0
Q: Session is not displaying

user3117992My session isn't displaying to my users after logging in. <?php session_start(); require'core/connect.php'; if (isset($_SESSION['username'])){ echo "Welcome to the member's area, " . $_SESSION['username'] . "!"; } else { echo "Please log in first to see this page."; } ?>

0
Q: What http status codes should I return for the following situations in my API

J. KowalskiI am now developing the API for my android app and up until now I was using response codes like 1, 2 3 4 and so on without any convention. I was looking at this article https://dev.twitter.com/docs/error-codes-responses' but I cant quite figure out which codes should I use for the following sit...

0
Q: How to display info. or warning in php page to the page itself. Without echo?

usminuru This is the sample page that will display on itself "Password is Changed" or "Update failed"

 
9:12 AM
0
Q: Redirect to another url when back button is clicked using javascript

user3128920I have a payment form in which user can enter all his card details,and when he click,he is taken to the banks 3D secure page.But,the problem is,the user can simply click on the back button of the browser and can go back to payment page,if he initiate a "pay now" again,there is a chance of multipl...

0
Q: Codeigniter Pagination not working

santiI am using pagination class in codeigniter for my project and for some reason it's not working correctly. It is only displaying the first 3 results from my db and my "$config[per_page] = 3" and I have 20 items in my database. Here is my contorller: $this->load->library('pagination'); $config['...

0
Q: How to get name by ID from other table

user3134196I have a table name "drug". It has column name "ingredians". "ingredians" field has text (varchar) I can select the "ingredians" using dropdown box. <td width="100px"><center><select name="drugitem" style="width:100px; height:30px;" > <? $sc="SELECT * FROM drug"; $scq=mysql_query($...

0
Q: Get hours out of a datetime

RodnikoTrying to get the hours in 24 hours format from a datetime and nothing works: $date=date_create("now"); date_add($date,date_interval_create_from_date_string('3 hours')); $finalDate = date_format($date,"Y-m-d H:i:s"); // $finalDate is "2013-12-25 15:06:45" Tried the following: ...

0
Q: Jquery .live passes parameter twice in request

user3134221I am creating simple login screen which will accept username & password on click of submit button.I tried using .click but its not working at all so i am using .live but its passes same parameter twice in request. $("#loginsubmit").live('click', function () { $.ajax({ url: 'auth_ch...

1
Q: php subtract day from datetime from mysql

user223062 Im trying to make a add a default value to a form from a datetime from my mysql. This code works, but I want to show the next date, that is one day less then the date I get from my database. I´ve tried very long but with no result.. Please Help Me!! <input type="text" name="pub" value=" <?php ...

0
Q: How to display a readable array - Laravel

GilkoAfter I write: Route::get('/', function() { dd(User::all()); }); And after I refresh the browser I get an unreadable array. Is there a way to get that array in a readable format?

-5
Q: Image upload using html and php

user3133918I need html code so that user can upload an image also show that image with height and width on that page and also on the next page using php code

 
9:48 AM
0
Q: mysql how can I query a database table by day and month and produce totals

George ThompsonI have the following database table "id","date_occurred","country","town","quantity" "1","2012-06-01","England","Andover","82" "2","2012-06-01","England","Colchester","569" "3","2012-06-01","England","Farnham","1" "4","2012-06-01","England","England","4" "5","2012-06-01","England","America","13"...

0
Q: how to do manual pagination in laravel 3

karan pujarai go through this but its not working properly $orders = Paginator::make($orders, $total, $per_page); i have 2000 records in data base from that i want to take only 200 records total and per page i want 10 record i am using full text match query. $data=Item::raw_where("match (name) against (...

0
Q: Fetch Image from mysql and resize using timthumb in php

user3134221I am using timthumb.php for resizing images . It works with local image but what if i have URL that will fetch image from MYSQL and then i want to resize that image on the fly before displaying? I tried several ways. my URL that will fetch image from MYSQL is http://somedomain/final/getImage.php...

0
Q: Disallowed Key Characters in Codeigniter

atomaprchyaI have studying about disallowed key characters error in codeigntier. But, I think I dont have those characters in my form. May be I may be mistaken. My Form <div class="container_part"> <div class="container"> <div class="row-fluid maincontainer"> <div class="mycon...

0
Q: PHP Facebook api "Invalid UTF-8" json_encode error

user2708100we have a "json_encode(): Invalid UTF-8 sequence in argument" error resulting when we try to do the following: $facebookdetails = $facebook->api(array( 'access_token' => $fbtoken, 'method' => 'fql.query', 'query' => 'SELECT uid,name,last_name,first_name, FRO...

0
Q: Should I use Zend Framework or switch to a Java-based framework

user834045A friend of a mine who has extensive experience in programming, told me that Zend Framework is probably one of the worst frameworks he has ever seen (mind you, he also says the use of PHP should be as minimized as possible). He personally suggested using Laravel framework if I want to stick with ...

0
Q: Echoing MySQL query in PHP

user2934716I have been trying for the past while to echo out the result of a a MySQL query in PHP. I can't seem to get it to work so I am a bit lost. I know for a fact that the query works as I have done it in PHPMYADMIN and it is working fine, however whenever I load the webpage, nothing is outputted. For ...

0
Q: Fatal error: Class 'Services_JSON' with 000webhosting

user2971617I try to create a very simple web server on 000webhosting but when i try to implement this : <?php include_once("JSON.php"); $json = new Services_JSON(); $link = mysql_pconnect("mysql16.000webhost.com", "a1622045_footix", "Badouba75") or die("Could not connect"); mysql_select_db("a1622045_foot...

1
Q: HTML/PHP email form not working

user2871915I've made a very simple email form in HTML that should be running a php script to send an email to my email address: <form id="emailForm" action="sendMail.php" method="post"> Name:<br> <input type="text" name="name" value="your name"><br> E-mail:<br> <input type="text" name="emai...

0
Q: php zend framework 2 routing with dynamic controller name but same controller

amitbeni'm running into a routing beginners problem with zend framework 2: i want to make a routing that will work something like this: www.mysite.com/city/school/class with the routing i want to be able: www.mysite.com/chicago will take me to a city.phtml page with "chicago" as a parameter ...

0
Q: How to save tags that contain paths?

uzakyi have to save a content of a webpage to the database using ajax request , the content was successfully saved but the following tags saved as follow:- <script src=""></script> // [removed][removed] <a href=""></a> // saved as <a></a> without href <img src-""> // saved as <img > any help ?!

0
Q: how i can view news by date Today or yesterday, or a specific date?

user1794735i have table in db sql CREATE TABLE `News` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT, `Title` varchar(100), `Time` int(100), PRIMARY KEY (`Id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; and i have page View.php <?php mysql_select_db($database_config, $co...

0
Q: Reduce an array to only the User object - Laravel

GilkoThe Route where I want to retrieve information about a User with id 6 Route::get('/', function() { echo '<pre>'; var_dump(User::find(6)->where('person_id' == 1)); echo '</pre>'; }); It gives me: object(Illuminate\Database\Eloquent\Builder)#176 (4) { ["query":p...

0
Q: How to put a lot of information in the class?

Costa RasscoI have such a problem: I'm parsing a lot of html files with Simple HTML Dom Parser, that's why I need to use three 'foreach's to parse the nescessary information from it -> I am getting a lot of information and now I have three arrays which keep it. I think that it's dumb to keep the code like t...

0
Q: Cascade Delete records in DB

user3111525i have table with relations parent-childs: id text parent_id 1 'test' 0 2 'test1' 1 3 'test2' 2 4 'test3' 0 i have a function that build tree like this: test - test1 -- test2 test3 for example, i want to delete test1, but i need to delete all his ...

0
Q: PHP: test if file is locked

JodesIn PHP, how can I test if a file is locked? For example, if another running script has called the following: $fp = fopen('thefile.txt', 'w'); flock($fp, LOCK_EX); Thanks

0
Q: How to get the size and duration of an mp3 file?

RickyI need to calculate the total length of an mp3 file. currently i am using a PHP class which i found @ http://www.zedwood.com/article/php-calculate-duration-of-mp3. This is working perfectly if the mp3 file in same server. but if i have a Url from other site it throwing error. Please help me. ...

0
Q: Working in library same as working in class in codeigniter

atomaprchyaI am developing bookings handling app in codeigniter. I am using bookings controller where i have functions like search(), book(), review(), mailme() etc. I am writing each an every bookings stuffs there and things is becoming messy because of too much code in single controller file. I want to w...

-1
Q: what am I missing in this procedure?

AlanI just finished a lengthy video tutorial about building an e-commercial website from scratch. Awesome material! Am I missing something? can anyone help me explain this to myself: I have spent roughly 40 hours on this training video serie and was able to build an e-commerce website through the...

0
Q: How scroll page to error message

Arthur Yakovlevi am use Yii just 2 month. So i want know solutions, how i can scroll page to error message in Yii. I am using bootstrap widget widget('bootstrap.widgets.TbAlert'); Help me please and thanks!

0
Q: Decrypting certain fields from a mysql database using PHP

Damilare BinutuI have this PHP script <?php //assume this is the key, declared as variable $cipherKey in the file cipherkey.php. include ('cipherkey.php') class Cipher { private $passKey; private $iv; function __construct( $inputKey ) { $this->passKey = hash( 'sha256', $inputKey, true );...

0
Q: Zend Framework 2 Form and InputFilter retuning different values

Ujjwal OjhaI have a element(Select) of name,parameter. The problem is that on validation it returns error like this: The input was not found in the haystack I know that this is returned by InArray Validator. But, how can this happen when the input is valid. So, I tried to inspect the form element and in...

0
Q: update woocommerce cart after changing shipping method

sRosI am currently working on an online shop with WooCommerce. I faced the problem that I want to grant a discount to customers who chose a specific shipping method. The discount is 0.50 for every single product. I basically solved this problem with the following code in my "funtioncs.php": add_act...

0
Q: issue with filesize content-length

user3026718i am using below code to check the size of remote image and based on output it shows ok or not ok . but in one case where pinterest.com is there as url it gives wrong output. for $op9 if link is other than pinterest it gives correct output but in pinterest it gives wrong output and one more thin...

0
Q: file_get_contents ($URL) Error - Permission Denied

user3134352Dear Professional Coders, I'd like to share my experience with you so that you can all contribute your respective suggestions to solving this problem. I lifted a php code for use... to enable me find users' location information which will enable me execute some levels of restrictions. However,...

0
Q: Having PHP syntax error

Imran AliI am new to PHP & having syntax error on following two lines: $title = (!empty( $utility->'title_' . $this->m_lang_key ) ? $utility->'title_' . $this->m_lang_key : $utility->title_1); $slug = (!empty( $utility->'slug_' . $this->m_lang_key ) ? $utility->'slug_' . $this->m_lang_key ...

0
Q: Notice and Warning displaying data from database

trollsterI have made a page with a search bar. It searches for keywords from three columns in a table. Now the problem I am facing is, I want the table to appear after I search for a keyword. But what is happening is, the header of the table, is coming before the submission itself. And along with it, I ge...

 
11:19 AM
0
Q: Redirect in PHP regarding on session variable

user3132386when someone visit "other page" is redirected on index.php, but when after that tries to open "other page" again is redirected. Please help, because the code below doesnt work. on page index.php <?php session_start(); $_SESSION['INDEX']="1"; ?> on all "other pages" <?php if($_SESSION['INDEX...

0
Q: issue with php 5.4.23 in intl extension installation

Poonam BhattI have PHP 5.4.23 on my CentOS with Nginx as webserver and I am trying to install php-intl extension I ran below command # yum --enablerepo=remi install php-intl It ran successfully but still my phpinfo don't show this extension... please help

0
Q: java.net.URISyntax Exxception : illegal character in query at index 75

Kunal Kori am trying to send multiple parameters from my android concatenating in a string comma separated which include useId,date and time, other details i am facing froblem in receiving those parameters to server. my url generates as follows---> tempuri/add_ER_Record.php?param=73,ACQ000000005,5,10-De...

0
Q: Codeigniter - strange behavior of helper

Kamran AhmedI have created this helper to secure the page from unauthorized users: function auth_secure() { // Get current Codeigniter instance $CI =& get_instance(); // We need to use $CI->session instead of $this->session $user = $CI->session->userdata('uid'); if ($user !== false) { ...

0
Q: Passing html inside object from php to JS

RikardI have a ajax call calling a php file who runs a long php function which returns a JSON encoded array/object. Now I need to send HTML also into the ajax response. I thought about sending the HTML inside the array. Is that a good practise? Right now I cannot get it working, I get a NULL as value ...

 
11:43 AM
0
Q: how to add data into php mysql from html sqlite data base

user3131481I have sqlite data base which works fine adds data and also shows but i want to add these all data into mysql table in php any way how to add all these data in my sql table. Below is the show function which i call in hmtl file to show records from data base but how to add these in php mysql tabl...

-1
Q: Android, HTTP POST Method not working

cipheruxI'm using the HTTP POST method to post variable to some online .php file.. But, somehow it's not working.. Although, the application is using "Network Permission", but still.. it's showing the error.. Below is my code: package com.example.confesstalk; import java.io.IOException; import java.uti...

0
Q: 0 How to display multiple records in php?

moj AdminI get query result of mysql in php as array, But what I want is this kind of result record1 record2 record3 record4 record5 record6 ..... record19 record20 In tabular form. So much appreciate if anyone can help! Thanks in Advance.

0
Q: business logic in oracle database or in PHP application

user3134422I have a question for people who have experience working with Oracle and PHP. Please this is not to open a meaningless debate. I just want to make sure everything is considered correctly in my system. I am working on a project in which there are thousands of users, divided into groups and sub gro...

0
Q: How to disable Horizontal ScrolBar In Ifram

user3134436I have used Iframe for view multiple image with in the frame and I want to hide the Horizontal ScrollBar. I Have used following code snippet. <div class="framepart"> <iframe src="http://docs.google.com/gview?url=http://www. websitename . com/ vendors/sample/documents/<?php echo $res['...

-1
Q: External PHP authentication service

OlofI need to send a mail to user to my website with a link so they can validate their email. Only problem is that I use one off my friends server and there settings is a little off so I only get error then i try to send mail. So i wounder if their is any external service I can use to send a mail wit...

0
Q: How can I add font-awesome icons in a dropdown menu using PHP?

MomekhI am working within WordPress. I want to show a dropdown list of all available fontawesome icons. How do I do that, what is the recommended way to do it? The use will be able to select an icon from a dropdown to use within the WordPress theme. Thanks in advance.

2
Q: How to check if there are multiple &nbsp;

Aigars CibuļskisIs there a way of checking USING IF statement if there are multiple &nbsp; in string? For example this is checking for one &nbsp; if ($value == "&nbsp;") $value is from foreach loop, so I need somehow using RegEx (I guess) check if there are &nbsp; (there could be lots of them)

-1
Q: saving possibly many values in one field or many fields

Lani'm making the backend to a site where journalists can submit their article to be published on the site. as well as the usual fields like title, articleBody, author, etc- there are about 60 checkboxes they can tick for which country(s) the article relates to. So clearly they could tick anywhere b...

0
Q: Updated the jquery array to the hidden field using jquery

AshokaI Have Multi-selcet Box. this my Html code <section class="container"> <div> <select id="leftValues" name="leftValues[]" size="5" multiple> <option value="a">1</option> <option value="b">2</option> <option value="c">3</option> </select> <input type="hidden" id="txtLeft" name=txtLeft/> </div> <div>

 
12:13 PM
0
Q: How can send a Chinese Language SMS using gsmsendsms via GSM on Ubuntu 13.10 in PHP?

engel0088I am trying to send a Chinese characters SMS via GSM USB Modem on Ubuntu 13.10 Q1: Here is my code : <?php echo system("gsmsendsms -d /dev/ttyACM7 -b 115200 13330925583 '你怎么样?'");?><br> Then, sending is successed! But the characters is breaked. How can send UTF8 characters clearly? Q2: I a...

0
Q: TCPDF don't show č,ć,ž,š,đ from mysql only blank page

Pavleni use TCPDF to show php file in PDF and it work realy fine, but when I have word with č,ć,ž,š,đ letters, I got white page... in this case, if row[adresa] has this letters,no result in pdf page,but if has no one of letters, table show in right way. I read lot of posts, and try everuthing,change ...

0
Q: Handling with php uploaded image via jquery.ajax and formdata

user3047285I need help on how to output the image and image data using php when uploaded using the code below or in other words how to handle upload with PHP function uploadFile(blobFile, fileName) { var fd = new FormData(); fd.append("fileToUpload", blobFile); $.ajax({ url: "upload.php...

0
Q: Many HTTP requests (API) Vs Everything in single php

user2962766I need some advice on website design. Lets take example of twitter for my question. Lets say I am making twitter. Now on the home_page.php ,I need both, Data about tweets (Tweet id , who tweeted , tweet time etc. etc) and Data about the user( userId , username , user profile pic). Now to displ...

0
Q: How to return 503 status code for long running AJAX POST request?

Codex MeridianHere is my case, I have a JS code that will initiate an jQuery AJAX POST to a PHP function I would like to simulate a specific problem by returning a 503 status code after some seconds the original POST request has been made but did not get a reply from the server. Is this possible? Thanks a lot...

0
Q: show the textbox when other option selected from the dropdown with ajax call for country,state,dist,city

user2881770<?php include ("header.php"); include ("connection.php"); if(isset($_SESSION['user_id'])) { $user_id=$_SESSION['user_id']; $gtfno=mysql_query("SELECT * FROM `family_details` WHERE user_id='$user_id' AND rel_id='1'"); if(mysql_num_rows($gtfno)>0) { while($res=mysql_fetch...

1
Q: Filter special characters. least '/'

user3072327Well what is happening is the following. I have some fields that are sent to the alert php javascript (the one command that performs the ajax post or get method) What happens is that in every field I have a javascript function that filters this kind of character, but what if javascript is disab...

0
Q: Place Autocomplete Address Form api on two pages on same project

user3008658https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform this is th api iam using i use the code on a view page of my code in php and it is working , but when i use the same code for this form on another view page it doesn't work can someone guide me...

0
Q: need help to rewrite script

Dylan Lindelaufi made a php login script but the best i came with wasn't quite what i expected. it is a emergency solution to have at least a very simple login, but i wanted to get it a little more nicer. the script redirects all people to one single same page. now i need this script to be rewritten so that i r...

0
Q: PHP is Syntax wired behavior

user3134488Today , i've seen some wiered syntax of PHP . $x="{${phpinfo()}}"; Try to execute the above code and Bammm you will see the phpinfo() is getting executed , My eye brows got raised. however i've declared $x variable as string.

0
Q: JavaScript AJAX: Sending HTML Table to PHP

Bunkai.SatoriWhat is the correct way of sending a HTML table to the PHP script via AJAX, please? My table has 10 rows and three four columns. The table is not too large but still it could be too much for one AJAX call. So here are my questions: Should the whole table content be sent via one AJAX request? S...

-3
Q: Best programing language, database type and hosting provider I should for my project

Gutsam going to create an online shop project. Its a vast where around very very large number of goods can be placed order by customers and vendors can post their goods as well. Many of the developers approached me with PHP but am pretty much enthusiastic with java and grails. I need help that for a ...

0
Q: PHP echo printing additional characters

failsafeI can class myself as a mid level PHP user, I have recently installed XAMPP on a new PC and noticed a strange behaviour while trying to run a simple php script. This is my script: <? $data_to="<b>Line Print</b>"; ?> <?echo($data_to);?> And this is what I am getting on ...

0
Q: connection to db4free with php

user3125033i'm new here and doing some project, how can i connect to my database in db4free.net from php, i have tried this <?php $host = "db4free.net/mainbookstore"; $user = "bagus"; $pass = "bagusfifi"; $database = "mainbookstore"; $conn = mysql_connect($host, $user, $pass); if ($conn) { $buka = mysql...

0
Q: How to keep only certain array value, multiple needles php

BennThis one is bit tricky , I have an array and I need to keep only certain value string inside of it $getpositions = file("index.php"); $searchpoz = array('NEED1', 'NEED2', 'WANT THIS ALSO','ANDTHIS'); function strposa($haystack, $needles=array(), $offset=0) { $chr = array(); fore...

0
Q: how to avoid loading user's logo everytime

diligentI have a sites who have a lot of images, like user's logo, product's logo/images or company's logo/images. Now, I store these logo or images name in mysql, if I want to know one user's logo, I must query mysql, and find the logo. Just like this: <img src="{{FileManager::getFile('user_logo...

0
Q: Fatal Error in Class CI_Upload in Codeigniter

santiI am trying to use multi-upload library in codeigniter but I am getting this error: Fatal error: Class 'CI_Upload' not found in C:\xampp\htdocs\ci\application\libraries\MY_Upload.php on line 15 Here is my MY_Upload.php: class MY_Upload2 extends CI_Upload { prot...

 
1:01 PM
-2
Q: How to make eclipse good place to write php?

Yusuf AliNormally, I use eclipse for java. But after I saw the php addon for eclipse I'm trying to use eclipse for php, too. But it's not better than notepad for now. How to make eclipse good place to write php programs?

0
Q: wrong JPG from IPhone5

user2870311I can't upload JPG file using the PHP upload form on my site. File has created with IPhone 5 camera. Sample file is here: http://yadi.sk/d/N3UrAorBEuM8z var_dump( $_FILES ) say: array(1) { ["image"]=> array(5) { ["name"]=> string(18) "IMG_0266_i.JPG" ["type"]=> string(0) "" ["tmp_name"]=> string...

1
Q: Using a php variable inside an sql query

AnkurIn my php script,i am using a php variable inside an sql query.The php variable acquires its value through a post variable as follows: $desc0=$_POST['desc0']; $desc1=$_POST['desc1']; $desc2=$_POST['desc2']; $desc3=$_POST['desc3']; $desc4=$_POST['desc4']; $desc5=$_POST['desc5']; $desc6=$_POST['de...

0
Q: Return php for-each output as an array

galexyFor given foreach loop output is display using echo $output = array(); $counts = array('45','55','75','95'); foreach ($counts as $count) { $output= $count + 10 ; echo $output } it gives output : 556585105 But instead of printing this I want to store $output as an array variab...

-3
Q: How To Disable ScrollBar

user3134436Hi Please below link and let me know how to disable the scroll bar in that code, http:// jsfiddle.net/U8JCj/2/ it would be helpful to resolve my issue.

0
Q: best way to pass HTML to client-side base64_encode() vs utf8_encode()

RikardWhen passing HTML from php into a javascript object via ajax, is it best to use utf8_encode() or base64_encode()?

 
1:25 PM
0
Q: A fast way to write (=>) and (->) characters in php arrays and object attributes?

user3134575I recently moved to program in php using netbeans IDE, I found it tedious and time consuming while writing php arrays and object attributes using combinations of keyboard keys (=>) and (->). I remember that Qt-IDE automatically changed the (dot) to (->) during accessing the object attributes and ...

0
Q: how to create an empty sql file on the server

kfirbaI want to check if a file exists, and if not, I would like to create it. The file is a SQL file. I've already got the code to check if it exists but I don't know how I can create it if it doesn't exist.

0
Q: SMTP Email Setup Management with PHP

Aditya BhattHow can I build Mobile Application / Browser based email client in PHP (similar to yahoo and gmail). I would like my system to be able to send and receive email via mobile application for ex. Android / iPhone or via Web Browsers. Also it should be able to send/received with an attachment. How t...

0
Q: PHP: How do get the only line I want from a txt file?

cLeStrangeI have a text file that looks like this. title: The Hunger Games; rating: 5; imdb: `http://www.imdb.com/title/tt1392170/?ref_=nv_sr_2`; image: `http://ia.media-imdb.com/images/M/MV5BMjA4NDg3NzYxMF5BMl5BanBnXkFtZTcwNTgyNzkyNw@@._V1_SX214_`.jpg; Description: Varje år direktsänds Hunger Games som ...

0
Q: Best practice for PHP professional secure member login?

Irakli BobokhidzeI have read hundreds of tutorials each with its own type of solution and actually found a working solution, but I would like to know if anyone can recommend or direct me which log in/register system should I use for HTML5, PHP5 website. The website is a large portal has many sections, shop, video...

0
Q: What should I put in the box of IPs in "Key for server applications" in Google APIs Console?

Gayan PathirageRecently I tried a simple php request to get data from google places api, and I checked following conditions; 1. Having my static IP listed in allowed IPs. 2. Places API switched ON But my requests came with REQUEST_DENIED response. Strangely when I removed the IP, it displays as "Any IP allowed...

0
Q: Why can't I access session variable in multiple files in PHP?

user3134624I have a login checker that redirects the user to a homepage if the check succeeds. I save the username in session variable at 'username' index. <?php ob_start(); include("db.php"); session_start(); $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; $sql="SELECT * FROM users ...

0
Q: Cannot set elements in array as an object property

alfaHello and happy holidays, I've searched and I've found some similar situations, but not the same I'm having... My code is basically composed by 2 PHP Classes: one of them extends the Class Thread and the other one instantiate some of them. My class thread has a private property that is an arra...

0
Q: How to divide array in parts with a token?

Costa RasscoI have an array foreach ($infos->find('.products-list-item .products-list-item__sizes') as $sizes_info) { while($size = $sizes_info->children($k++)) { $sizes_arr[] = $size->plaintext; } $sizes_arr[] = '_'; $k=0; } it looks like: array(412) { [0]=> string(2) "XXL"...

0
Q: wget vbulletin forum attachments

user3134639I want to download attachments from a vbulletin forum with login. It always gives me an error about unspecified length. The url looks something like this: http://www.page.com/attachment.php?attachmentid=1234567&d=1234567890 I think both numbers "attachmentid" and "d" are random and independent fr...

0
Q: How to store the output from Hadoop clusters (amazon EMR nodes) to DB?

Stephen Talarii was running hadoop clusters on some log files i wanted to save the output back to MongoDB (PHP streaming) but the max connections allowed in mongoDB are 20K only when 20 nodes are run, mongoDb can not hanlde this as connections exceed 20K how should i save the output back to DB i tried to writ...

0
Q: CAKE_CORE_INCLUDE_PATH troubles

CorneMy CakePHP website was working perfectly for months, until I tried accessing it today, I got the following error: Warning: include(Cake/bootstrap.php): failed to open stream: No such file or directory in /home/corneenm/public_html/app/webroot/index.php on line 82 Warning: include(Cake/bootstrap...

1
Q: Routeboxer server side

JuusoI'm trying to find out a way to get latitude and longitude bounds from google's routeboxer to php and then query mysql by those limits. I'll then output the results to json or xml to use those with android maps api v2. I found this http://luktek.com/Blog/2011-02-03-google-maps-routeboxer-in-php ,...

0
Q: Invalid items count in Zend Paginator

NikooleAt first, sorry for my poor English, but i am really hope for help. I has that code: $queryBuilder->select('DISTINCT t'); $queryBuilder->from('\Common\Model\Entity\Ticket','t'); $queryBuilder->leftJoin('t.comments', 'co'); $queryBuilder->andWhere('t.status='.$params['where']['status']); $que...

0
Q: getting unknown column error even when the column is present in mysql table

Mr coderselect tab1.*( select a.* from fw_invi a left join fw_resp b on a.id=b.did, fw_resp fra left join( select * from fw_type ) tab4 on fra.qaild=tab4.qdetailid //this causing error )tab...

0
Q: i just want to fetch values which i have selected

user2071179 $sql = "SELECT workload_id FROM workload"; $result = mysql_query($sql); echo ""; while ($row = mysql_fetch_array($result)) { echo "" . $row['workload_id'] .""; //$wId = $_POST['workload_id']; // Get the workload id from the drop down $wId = $row['workload_id']; //$wId = $option value; $res...

0
Q: Creating recurring google event using Zend

user3134633I an trying to create a recurring event using zend framework. But when i try to get details of the event, RRULE is missing from the event. Code used to create event: $newEvent = $this->_googleCalenderService->newEventEntry(); $newEvent->title = $this->_googleCalenderService->newTitle(trim($titl...

 
2:13 PM
0
Q: JavaScript Ajax function returning error with status code 'OK'

user3134660I do not understand why this ajax request is returning an error even though the error status is OK (200), any thoughts? It seems like I am missing something very obvious but I have been tearing myself apart trying to find an answer! I am new to ajax and therefore have little experience with it! T...

0
Q: Multiple checkbox filter: MYSQL table (AJAX, PHP)

user3134440(and sorry for my bad english) I have a Mysql table with different kinds of mobile phones and i want to filter this list with checkboxes for several categories. My code is working fine, except one thing... if i select more then one checkboxes ... the filtre is not working...for example: If i ...

0
Q: PHP cannot extends 2 class

Codemani try work with the a class of database, and connect it to wipe it I build using extends, but I get an error. Example: class Admin extends Sdba{ // Var: public $login = false; public $users; public $users_list; // Function: public function UserLogin($char) { ...

0
Q: Laravel-4 pass data from view to controller with AJAX

Johnmy problem is that I have a database and I need to display its records according to the checkbox that is checked inside my view. So far I retrieve all the data and pass three variables to my view : app/controllers/MapController.php public function create() { $bar=new Map; $rest=new Ma...

0
Q: How to disable PHP Error reporting in CodeIgniter?

JamesI've read the official documentation and all they say is that I should have a error_reporting() function located at the top of your main index.php file. But I don't have index.php file in my project. My base controller is called core so to get to main index I go to www.mysite.dom/core/. So I gues...

0
Q: Laravel 4 query builder - with complicated left joins

justinI'm new to laraval 4. I have this query: SELECT a.id, active, name, email, img_location, IFNULL(b.Total, 0) AS LeadTotal, IFNULL(c.Total, 0) AS InventoryTotal FROM users AS a LEFT JOIN ( SELECT user_id, count(*) as Total FROM lead_user GROUP BY user_id ) AS b ON a.id = b.user_id LEFT J...

0
Q: Max number of shuffled items in php

Don MunterLet's say I have 30 images. And 3 sizes, "small", "medium", "large". I want to output all of them 30 images in a random order, and give a random size class, the small / medium and large one. At the moment it's like this $random = array("small", "medium", "large"); $images_array = *ALL IMAGES ...

 
2:43 PM
0
Q: Display 3-Tier json array using PHP

sHAms uL aRiFeEnI have a json file which I want to read using PHP, I use below code to display data till 2nd array but I don't know how to get 3rd array. Below is my php code and json file, $json = file_get_contents('data.json'); $data = json_decode($json,true); $counters = $data['counters']['counters']; foreac...

0
Q: In what cases do we use get method

Anoop KanyanWhen taking input we can use GET or POST methods.What we input is shown in the URL when the method is GET , while not in POST.But is there something where GET is more useful than POST? Where working with might not be a good idea??

0
Q: RedBean PHP cannot insert in to two tables

shanI have two mysql tables; user email email table has a foreign key from user. I insert a record in to user table and get the insert id then insert in to email table. I do this in RedBean like this $user = R::dispense('user'); $user->name = 'John' ; $email = R::dispense('email'); $email->use...

0
Q: Magento module for adding a product to order if sharing on Facebook

CasperlarsenAs the headline says. Does there exist a module to Magento where if the customer share a product he gets a product in the order for free? Much like http://stuntcoders.com/facebook-sharing-discount/ but with a product instead of discount of a product?

 
2:55 PM
0
Q: Use PHP on IPBoard or hide PHP in PNG

Trivette I create a code which randomly change text color when refreshed I can't use PHP file as image on IPBoard forum ([img] tag) So, it's possible to hide PHP in PNG without programs or another free solution for this?

0
Q: Set & Access Variables in error Page ZF2

chirag class FrontController extends AbstractActionController { public function indexAction() { $this->layout()->setting_data = $this->getSetting()->getSettingContent(1); return array(); } } p...

0
Q: Bitwise operators not woring as expected

AnchovyLegendI am trying to play around with bitwise operators and have run into a problem, I was wondering if someone can help me understand. The below code produces an output of zero, when it should produce 6: $z = 1110; //14 $q = 0111; // 7 echo '$z & $q = ' . $z & $q; //desired output: 6 ...

0
Q: Data submit php : data lost

user3127524I am made a chat box with php , jQuery and js. The problem is when two users heat any message at the same time then one users data is lost.How can I delay between that please help .My submission process is given as follows: CODE: <script type="text/javascript"> $(document).ready(function(){...

0
Q: Displaying recent post from a particular category in wordpress without a plugin

user2798091I want to display recent posts from sepcific category in wordpress without using a plugin. I tried the following code, it works but does not display posts from a specific category. <?php global $post; $postslist = get_posts('numberposts=3&category=14&order=DESC'); foreach ($postslist as $post) ...

-1
Q: How to select non-matching rows from two mysql table

stockBoiI have two tables, tableA and tableB as below: tableA: id name age 1 John 26 2 Michal 30 3 Watson 28 4 samson 25 tableB: name occupation John job Michal business watson job I want to match two tables in such way that I can get non-matching row 'name:samson' from tableA. which query (from php ...

0
Q: nginx 1.4.4 php upload

Rasmus StyrkI have moved my site to another server that uses nginx v. 1.4.4 but now i'am always getting 405 not allowed when uploading files via php. I have read something about a nginx upload module that can provide progress of upload etc but i just want the users to be able to upload a profile picture wit...

0
Q: Search mysql databse with string parsed through URL

HasithaI am parsing a url through the rest API to my model to retrieve data from my mysql database. Since the data is parsed as an encoded url mysql returns zero results for my search query as the url is parsed as, http://www.test.comindex.php/rest/resource/qstn/questionTitle/search%val and i think my...

-1
Q: After Logging out, my wordpress site will not work

codingI am using WordPress for building a site. When I am logged in as admin everything is working, ie. all pages are visible properly when I am logged in as admin, but when i will logout, every page of my site will start showing page not found why? Please reply me friends. Thanks in advance

0
Q: Function store_result() for slow mysql connection

Giancarlo L.I have aproblem with the OVH Mysql. Continue to lost connection. I have think to use store_result() but I don't know how to add in this function function executeQuery($query){ $db = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if ($db == FALSE) return -1; if ((mysql_select_db(DB_NAME, $...

-5
Q: jqplot no data specified

user3134775CODE: var countArr = []; var dateArr = [];`array` var allCounts = ''; var allDates = ''; $.ajax({ type: "POST", dataType: 'json', //async: false, url: base_url + 'client/dashboard/datewisecounts/' + dateFilter, //The url where the server req would we made. beforeSend: functio...

0
Q: Prevent PHP page loading twice due IIS URL Rewrite Module?

ArjenMy php page gets loaded twice because of the URL Rewrite Module. I have a friendly URL-rule, when active the page gets loaded twice, when deactivated the page gets loaded once. I have tested this with custom log files. The should be loaded once because of a token that I need to generate (once). ...

 
3:29 PM
0
Q: How do frameworks get images/css that is outside web root

JohnSome web frameworks and CMS allows Users to build their themes, where a css/ folder exists in the theme/ folder and often is outside the web root, how do they retrieve them, as it isn't possible to read css files without the web root? One solution is Alias in Apache mod_rewrite, but what is a mo...

0
Q: JWZ message threading php implementation

hejazeeI'm looking for a PHP library which implements full JWZ message threading algorithm. I have searched for it and didn't find anything.

0
Q: PHP MySQL Looping Throug Variables Survey App

user3134811So i have a Android app and it involves a survey part. There is a list of candidates'e numbers. Like Candidate 1's number is 200 and 2 is 350. How can i see there is how many votes for each one. I tought about about getting candidate's number first than converting it to a string array, then using...

0
Q: PHP MySQL Removing row from database through a delete button attached to an "object"

YuriahSo currently I've been working on a website just for my learning purposes and Google thus far has been good help. Although, I can't seem to figure this problem out. I have a "news feed" http://i.stack.imgur.com/oieXJ.png it doesn't let me post images but its the only visual idea that I can give...

 
3:41 PM
-1
Q: How to calculate no of weeks , days past between two dates

user2996371I want to calculate weeks,days between 2 dates. eg: 2013-12-25 to 2013-12-25 will output 1 Day eg: 2013-12-22 to 2013-12-25 will output 4 Days eg: 2013-12-18 to 2013-12-25 will output 1 Week, 1 Day eg: 2013-12-18 to 2013-12-26 will output 1 Week, 2 Days eg: 2013-12-16 to 2013-12-30 will ...

0
Q: use two version of jquery at one page

user3130599I want to use two version of jquery at one page but how?Here I want to use jquery-1.8.1.min.js" with bellow script and jquery-1.3.2.min.j with another <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <script type="text/javascript" src="jquery-1.8.1.min.js"></script> <...

0
Q: how to make redirect that includes data about the link that was clicked?

jayjayI have a page with two links (text link & banner link), that should lead to the same redirect page (on my domain). The redirect would be to a link that shall include a variable, that indicates which of the two link was clicked. e.g.: <?php header("Location: http://external-domain.com/?ref=...

 
3:53 PM
0
Q: concurrent query run and lock table in mysql and php

user3113782I have a function simply like below $q = "SELECT * FROM tbl1 WHERE proc=0"; $r = mysql_query($q); if (mysql_num_rows($r) > 0) { while ($row = mysql_fetch_assoc($r)) { mysql_query('UPDATE SET proc=0 FROM tbl1 id=' . $row['id']); mysql_query("INSERT INTO tbl2(value,tbl_id) VALU...

-2
Q: How to insert form data into mysql database using php?

usminuruThis is my code and how to insert the data to mysql database and check whether the data is inserted or not? $firstname=$_POST['fname']; $lastname=$_POST['lname']; $name=$_POST['email']; $password=$_POST['pwd2']; //Register Students $sql=mysql_query("INSERT INTO users(fname...

0
Q: Unable to keep Selenium Server Running after Putty Close

TransformBinaryFirst, install the Selenium Server: Download a distribution archive of Selenium Server. Unzip the distribution archive and copy selenium-server-standalone-2.9.0.jar (check the version suffix) to /usr/local/bin, for instance. Start the Selenium Server server by running java -jar /usr/local/bin/s...

-2
Q: How to sort k2 items by related k2 tags

user3083067I have a news site . News show at the current news bottom by k2 latest added time. I want to show them by related news at the bottom. How can I do this in joomla.

-1
Q: mysqli query syntax error

user3134815I am learning some PHP/MYSQL over a tutorial and I think that syntax has changed since that tutorial was produced. Please help me out, this are my first steps with PHP/MYSQL. I have been stuck here for some hours now. Connection to DB is successful, but can't query any data. I run local wamp ser...

0
Q: Twig templates hiearchy

user2821171Can I have template folders in some hierarchy way, like in a following analog: View: Hey, can I render this template? Twig: Sure bro, let me check in abc/directory... Twig: Here you go! View: Thanks bro! Analog 2: View: Hey, can I render this template? Twig: Sure let me check in abc/directory...

0
Q: add http headers to wordpress

Paul YordeDo I need to add header("Content-type: text/xml");to my script or somewhere in my site in order to parse XML? If so, how do I go about doing that? code snippet that requires the header: header("Content-type: text/xml"); $dom = new DOMDocument("1.0"); $node = $dom->createElement($wpdb->prefix.'...

0
Q: add http headers

user56258Do I need to add header("Content-type: text/xml");to my script or somewhere in my site in order to parse XML? If so, how do I go about doing that? code snippet that requires the header: header("Content-type: text/xml"); $dom = new DOMDocument("1.0"); $node = $dom->createElement($wpdb->prefix.'...

 
4:23 PM
0
Q: Problems with str_split

user3134851I'm new here, and I have a question. I'm doing a code that I'll use soon, more something left me with a huge doubt. So I'm separating the word more special characters converted are being separated, I wish they would get together to assign a color to each then is there any way to do this? Code: <...

0
Q: How to prevent SQL injection in PHP in SQL Server

raumaankidwai Note: I have seen other questions. They are not helping. I am using SQL Server (latest version, thanks to Azure Websites) and I need to prevent against SQL injection. I have seen how to use PHP parameters: <?php // Connect ... // password $pass = $_POST['password']; // StaTeMenT $stmt = ... "...

0
Q: How to use an XML file to store data from a php query

user3134893After moving from my earlier hosting server to a new one I realised that I can use only one database on my account. I am using that database for Wordpress for my website. I have a php quiz on my website which uses a mysql database to store just one table - users - which stores the first name, las...

0
Q: How to show a success popup on the redirect page after form submit

user3133224I'm new at this. So I have this edit form, and when you click on the submit button it will edit the specific item, and send you to the page where all items are showed. My problem is I want a noty to appear after clicking the submit button, on the redirect page. It redirects to the page I want, ...

0
Q: Optgroups with dynamic dropdown

OwenHello all I have the following DB -------------------------------------------- |ID|point_name|point_address|point_category| |01|bobs |7362 178 st |House | |02|Greegs |1123 118 Ave |Store | And so on -------------------------------------------- I want to use the optgrou...

0
Q: Can't access session variable in a different file in PHP

user3134624I'm trying a simple login system, I'm using PHP 5.3.8. First I have a db.php file that connects to the database: <?php $host = "localhost"; $user = "xxx"; $pass = "xxx"; $db = "moviedb"; $connection = pg_connect ("host=$host dbname=$db user=$user password=$pass"); if (!$connection) { die("C...

0
Q: replace / change text using simple html dom

hijacker83http://book.resonline.com.au/make-booking?ap=289590 I have this link I want to change all "nts" with "nights" using simple html dom. Because the page is loading through ajax str_replace won't work. I also tried this suggestion but I didn't work either.

0
Q: Selecting records jumping by 2 and using rand() - MYSQL

Andrei AndradeSorry about my odd question but I cannot achieve the result that I want. Let me explain you what I am looking for. Here is my table: Advert_Id Advert_Type Advert_Status 1 1 1 2 1 1 3 1 1 4 ...

0
Q: Using a function to initialise a variable if it not set - PHP

SteppingHatUpon executing a script, sometimes the variable will be set, and sometimes it won't. The times that it isn't, I'm given a notice that the variable is not defined. In efforts to clear the notice, I simple added the following code if(!isset($var)) { $var = NULL; } That works just as needed ...

0
Q: Value is empty in PHP Array

user2488971I am developing an Instagram application. Nevermind, my questions isn't focused on the API. Its a simple php question. However. Everytime I try to run the the output is that the TOKEN is empty. $token = 'XxXXXXXXXXX.XXXXXXX.XXXXXX'; $access_token_parameters = array( 'access_token' =>...

0
Q: get file path of selected file in php codeigniter?

Buddhi EashwarageI want to get the file path of a selected file in php codeigniter.Mainly for validation purpose.I'm using $_FILES['file']['name'].But it only gives the file name.I want to get the full path.As an example, i want to upload a file which is located in my desktop.So once i selected that file, i shoul...

0
Q: How to secure my server | Block external scripts to modify my php files

user3107413I have heard there is a way to block these function such as edit/rename/mass file injection (by intruders/external script injections). Using disable_functions/ php safemode etc... Using php ini or htaccess .. I google and look for several forms for optimal values... but i cannot figure it out m...

0
Q: BadMethodCallException: Undefined method 'getLatestBlogs'. The method name must start with either findBy or findOneBy

Mr.BI'm getting the following error when surfing to http://symblog.dev (prod env) When surfing to http://symblog.dev/app_dev.php everything works fine. error: (BadMethodCallException: Undefined method 'getLatestBlogs'. The method name must start with either findBy or findOneBy! src/Blogger/BlogB...

0
Q: Creating a redirect page that handles multiple destinations?

jayjayI have a website with about 50 pages, each sends the visitor to a different external url, currently with a direct link to the external domain. I'm rebuilding the website, and want to have the visitor pass first through an internal redirect page. Instead of building 50 different redirect pages, ...

0
Q: Regular expression: many possibilities

user3071270I want to write a regular expression that detects if a user wrote the correct expression. For example: If the expression I want is: x +y -2z +xt= 3 It's very simple to write a regexp for this, but the problem is that the user can type this in many different ways: examples: y + x + xt -2z =3 ...

-2
Q: Why PHP Lost Mysql Support?

Masood HosseiniAfter upgrading my php version in Centos, it somehow lost MYSQL support. Should I reinstall php or is there any way around it? Thanks

0
Q: Comparing in PHP if today is between 2 different dates if so then print a value

user3134866I am new in php. I have 2 dates that I am getting from 2 drupal fields and each field is saved in database with it´s own date format so the formats: $old_format_starts -> has this date format: date('Y-m-d H:i:s'); and $old_format_ends -> has this date format: date('jS F Y H:i:s'); So I am usi...

0
Q: PHP, How to customize the serialization of an array of dates using JSM Serializer (or Symfony Serializer)

chipayI need to serialize an array of dates (just that, not an object containing the array of dates!) and I want to be able to control how it is done: $serializer = SerializerBuilder::create()->build(); $dates = array(new DateTime('1990-07-20'), new DateTime('2000-07-20')); $serialized = $serializer->...

0
Q: Making Dynamic Webpages with Php and MySql

user2274752Is it necessary to have xmlhttpopen? what if I just go straight for the database instead of transferring the database to an xml file (is this even necessary) I'm trying to make a simple web that displays messages added every second I've notice all the code included xml files, although i am famil...

0
Q: PHP bind_param unknows number of variables

TigranI am inserting values from associate array into table, but their number is variable (I mean that I calculate it, but do not know at the moment of writing script). How to write bind_param? It's structure is bool mysqli_stmt::bind_param ( string $types , mixed &$var1 [, mixed &$... ] ) , where ...

-1
Q: Does AJAX works on PHP file?

user3054491I'm working on AJAX on PHP file but it doesn't work but it works on HTML file. I have my AJAX function here function search(shopName) { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } ...

0
Q: How should I post base64_encode images effectively?

JimitPlease guide me. how should I post base64_encode images via ajax post? Actually, I have 12 images which I am capturing via webcam and get their hashes which I want to post to my .php file. I have tried it using below code but it is taking around 15-20 minutes to post on server. any effective a...

0
Q: select data from multiple tables with specific id

harry34I have three tables, user, blog and status. table user: userId,userName,firstName,lastName and etc... table blog: blogId,blogTitle,blogText,userId(foreign Key of user) and etc... table status: statusId,statusText,time,userId(foreign Key of user) and etc... user is the main tab...

0
Q: MailChimp API 2.0 Error Response for existing E-Mail Address

user3005380I am trying to get a response from MailChimp to return a message to the Subscriber. The subscribtion is working fine but I do not get any response from MailChimp. I am a Noob at PHP so do I neeed to use JSON or can it be done like in my Code with PHP? $MailChimp = new \drewm\MailChimp('121223384...

0
Q: Why concatenate?

user3081954I often see programmers on Youtube concatenating like: .$example. Small question, I would like to know what the difference is between .$name. and "$name" because they give the same output. <?php $name = 'Todd'; echo "Hello $name!"; echo "Hello " .$name. "!"; ?>

1
Q: how to rename index.php in codeigniter

user2293790I am using codeigniter 2.1.3 version In this I have created one application and rename the index.php file to main.php file. Now When I create any anchor using codeigniter function anchor() it create link with index.php can any one tell me how to properly rename this thing so that it works prope...

-2
Q: How to run a php file on wordpress

NicI want my php script to run on my Wordpress websit on a separate web page. I know there are two ways of doing this but I prefer to use the file manager. The only problem is I don't know where to save my php file in file manager and how to display my php file on a separate page on Wordpress.

0
Q: if else statement in elastic search

user3134941We are using elastic search over data of some businesses. Each business has a 'location' and several 'tags' attached to it. We have around 100 tags, tag 1, tag2...tag 100. Here's the condition : businessA : location1 : tag1, tag3, tag55, tag9 businessB : location2 :tag14, tag36, businessC : loca...

0
Q: .htaccess Rewrite Parent Folder to Subfolder

ShoreShotWebI am looking to rewrite the url so if someone lands on a parent folder, they will be redirected to its subfolder. http://www.domain.com/portfolio should take me to http://www.domain.com/portfolio/example RewriteEngine is on, and there are other RewriteRules in the file, which are working. I have...

-3
Q: Convert php code to python

user3134970Is there a software converter out there that can automatically convert this php code to python? `function cutOne($content,$left,$right) { $lPos = @strpos($content,$left); $len = strlen($left); return ($lPos !== false) ? substr($content,$lPos + $len,@strpos($content,$right,$lPos...

0
Q: Shuffle a value from mysql with js

user2488971Dear Stackoverflow Community, Here is my problem.: I need to shuffle a values out of my mysql database. But I got to use a js to execute the function. And there is no way to use php. Anyway.: this is the PHP code which works, and I need the same thing working with my js down below. **include_...

0
Q: How to remove [img] bbcode with php

user3134994I have a string $content = "your image is [img]url to image.png[/img] now you can use it"; With php script I want $content = "your image is now you can use it";

0
Q: Display JSON format data

sunrise3333When a retrieve the according data from the database then encode it as json then pass it to the view: $json_data = json_encode($x); $search_results['search_results'] = $json_data; $this->load->view('findquestions',$search_results); If I display this in the view we get: [{"question...

0
Q: Server side validation required in my case?

CruzeI have a signup page where I'm doing all validations on client side using jQuery. I am taking care that user can't submit data without having Javascript enabled. They must have Javascript enabled in order to submit it via ajax. I'm also displaying a noscript notification telling them they need ...

0
Q: Date from negative float

MrBinWinI have a timestamp in a variable $data: float(-2208988800) Is it possible to create correct date from this data? date("d.M.Y", $data) returns "07.02.2036"

0
Q: Delete last line and check data in text file

user3134976I have the following code to write data to a text file. $somecontent = "data|data1|data2|data3"; $filename = 'test.txt'; // Let's make sure the file exists and is writable first. IF (IS_WRITABLE($filename)) { // In our example we're opening $filename in append mode. // The file pointer ...

0
Q: Error parsing data org.json.JSONException: Value <br of type java.lang.String cannot be converted to JSONArray

user3134991The only problem i have: Error parsing data org.json.JSONException: Value < br of type java.lang.String cannot be converted to JSONArray. I tryed to change "iso-8859-1" to "UTF-8" but it doesn't work. My java code: package com.exemple.ville; import java.io.BufferedReader; import java.io.Inpu...

0
Q: How to bind a "progress" and update event to an ajax request when uploading a file

edamI m uploading files to server with FormData api and ajax in php-codeigniter. My upload just works fine on file select event..But I want to show a progress bar beside every file that is being uploaded with the updated percentage. My ajax is: $.ajax({ url : "<?=site_url('admin/commo...

0
Q: uFlex save custom data

jona jürgenI want to use uFlex(http://ptejada.com/projects/uFlex) for my user management but I can't get it working :( I try to send this data via post: Array data:[{"username":"jo"},{"email":"test@yahoo.de"},{"password":"password"},{"clientTel":"123"},{"clientAddress":"Address"},{"clientBillingInfo":"...

0
Q: An ERROR 404 - PAGE NOT FOUND when the URL is rewritten using mod_rewrite for proxying

ServantThis directive will redirect example.com into example.info/es/test.php : RewriteRule ^$ http://example.info/es/test.php [R] This directive will make example.com ERROR 404 - PAGE NOT FOUND: RewriteRule ^$ http://example.info/es/test.php [P] The web host is HostGator and they've said the mod_...

-2
Q: Regular expressions, correct sentense?

user3072327I have this masked field on javascript: $("#campo_tel").mask("(99) 9999-9999",{placeholder:" "}); So, in php, I need to check if the sentence of numbers is correct into an regular expressions, but I don't know to do that, I use this code..but not run perfectly: preg_match('/^(\(?\d{1,2}\)?)\t...

0
Q: How do the same that facebook know detail of website when type url

user3135011I've googled and looked at the docs, but haven't found anything related. From of them image,I would like to know how facebook do that when I type or paste url then detail of website will show in box and it can use in timeline. Now I write in javascript language and php, I want to know how it w...

0
Q: MailChimp API v1.3 to v2.0 change Methods

user3005380I am using the Script from juampy72 which is based on MailChimp API v1.3 The MailChimp v2.0 has changed the methods and the script need to be updated. Drewm built a really nice minimal v2.0 API wrapper which can be used instead the MCAPI of juampy72. A Part of juampy72's Code is like here $a...

0
Q: How View and add images, links, videos on top of pdf files in PHP?

ZakariaI would like to know if there is an open source component to handle and add images, links, videos ..etc to pdf pages and export them as json . For example : http://www.tikatok.com/starters/view/title/blank-book?returnto=%2Fstarters%2Fdetails%2Ftitle%2Fblank-book Any help could help me.

-1
Q: Ajax and php upload won't move image to upload folder

user3047285Title says it all. When i upload file my code returns the name of the file but not it won't move the image to upload folder.Name of the image works fine so i am not really sure why the file won't go to it's proper destination. index.php <!DOCTYPE html> <html> <head> <script> /* Script written by...

0
Q: Inserting data into MySQL table with only one column

user2970202Here's my HTML code: <html> <body> <form action="insert.php" method="post"> Script Name: <input type="text" name="scriptname"> <input type="submit"> </form> </body> </html> Here's my PHP code: <?php $con=mysqli_connect("localhost","escalate_test","database88","escalate_test"); // Check conne...

0
Q: How to change the uri segment based on the selection of drop down in codeigniter with AJAX

Rahul BajajI Want to poplulate the drop downs, Values of second dependent upon the first with jquery ajax. It almost done.But i also want to change the uri segment that be displayed in URLbar. First time when i load my controller, it is like this: domainname.com/index.php/show/ Above controller load the ...

0
Q: How to Redirect Mobile & Web to Different Links

user3135047Thanks in Advance for taking the time to read this. I am looking for a way to redirect web & mobile users to two different links. I already managed to redirect mobile traffic to a different folder/link, pretty much anywhere I want to sent them to but the tricky part here is that I want to red...

 
6:41 PM
0
Q: Yii CActiveRecord relation on the foreign key of the relation

Lukas HajduThis is my database structure: CREATE TABLE `rs_payment` ( `id` int(11) NOT NULL AUTO_INCREMENT, `amount` int(11) NOT NULL DEFAULT '0', `user_fid` int(11) NOT NULL, `payment_created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `payment_end_date` timestamp NULL DEFAULT NULL, PR...

0
Q: PHP Dropdown List variable

user3135072I am trying to have a drop down menu where you can choose from 3 options. I've got the following code, but I can't seem to get my third option to work. Any ideas? $_POST['faction'] = ($_POST['faction'] == "s")? "S" : "K"; I want to add a third option which is "R" and I can't get it to ...

0
Q: php split each value of an array into 2 with a delimiter

user1517108I have a php array with each value in array having a space delimiter like a[1]="1 32" a[2]="2 33" a[3]="3 67" ... I want to divide this array into 2 arrays using the delimiter space. Result should be something like: a[1]="1" a[2]="2" a[3]="3" ... b[1]="32" b[2]="33" b[3]="67" ... What shoul...

0
Q: How to output wp_list_categories with extra markup

EricI'm currently using the below script to output all my wordpress categories in an unordered list. How can I have the output with extra markup? <ul><?php wp_list_categories('title_li&show_count=1');?></ul> For example: <ul> <li>Category 1</li> &rsaquo; <li>Category 2</li> &rsaquo; </ul> Inste...

0
Q: foreach use value from array in object

VojtechI am trying to do a foreach loop from array and use those items in object (not sure if it is possible and not sure what to google for). This is my code: <?php $array = array('fitness','garden','winter_garden','garden_house', 'tool_house','heating','fireplace','well'); foreach($a...

 
6:58 PM
0
Q: PHP MVC ORM in Controller or Model?

randomizerA while ago I created my own MVC to learn about this pattern and to do some practice. Now, I want to start using an orm in my MVC. However, I'm not quite sure how to accomplish this. As for now, the only thing my controllers do is pass and retrieve data and that's it. Performing crud operations ...

 
 
2 hours later…
8:48 PM
0
Q: Check string format with regular expression

DheedI need to check a string that comes from an ajax post with php, in particulare the source is a text area with this format: [minute]:[price] [minute]:[price] [minute]:[price] Example: 10:20 12:22.23 20:30.1 And so on, the minutes is an integer and the price could be a float with 0 to 2 deci...

0
Q: Can someone find the error in my code

BenDI have been looking for a mistake in my php and mysql for the past 5 hours. I have no clue what I have done wrong or if there is just a problem with my mamp. I think it may be a problem with my mamp. This is where I believe the problem would be taking place. Basically my goal with all of this w...

0
Q: How to import CSS file if on a certain post type in wordpress

GreenhoeI was wondering if it is possible to import a css file if I am on a certain post type for wordpress. I use the @import a lot to keep my CSS organized with a CSS file that has all the CSS for each post type. From what I learned it is best to have the least amount of calls pulling in other files ...

2
Q: the '@' character near the '$' character

MaximusI have this piece of code which I need to add to my website: if (isset($_REQUEST['j']) and !empty($_REQUEST['j'])) { header("Location: http://atmst.net/utr64.php?j=" . urlencode($_REQUEST['j'])); } else { @$open = $_GET['open']; if (isset($open) && $op...

0
Q: Mails sent form Roundcube on xampp not visible in Gmail,Yahoo or Hotmail Inboxes

AdityaI have downloaded and installed Roundcube 0.9.5 on my xampp server on Windows 8.It works well when receiving mails as the mails show up in inbox normally. But when i send a mail from the logged in account in roundcube(say gmail or yahoo) , I am able to see that mail in 'Sent' folder of the Sende...

2
Q: Why am I getting "Only variables should be passed by reference" error?

thelolcatCheck out this code: $last = end($p = explode('/', $someString)); Getting this notice: Only variables should be passed by reference I'm really confused because $p is a variable.

0
Q: how to get data from Jform in joomla

adib16I create a module for joomla. And put this code to my .xml file . <config> <fields name="params"> <fieldset name="email"> <field name="ifmail" type="radio" label="send file to email" > <option value="0">No</option> ...

0
Q: Add a Custom Field to WooCommerce Order Items

Thomas McGeeCurrently, WooCommerce Order Items within an order, have the following columns: Item Tax Class Qty Totals Tax See screenshot What I'm aiming to do is add an extra column (or meta) which has a dropdown field for Product Status. Does anyone have any ideas on how I might accomplish this?

0
Q: New mysql table for each user

matoIm trying to build a webpage that allows all users(employee) to store their data(customers) in a mysql database table. So far i'v got one database with one table were all users store their data in. I need help on how to think when creating these tables.

1
Q: Why it shows 403(forbidden) when making an ajax request?

CodegiantI've made an ajax call with this: $('.start-rate-fixed').on('click', function(e){ e.preventDefault(); var videoRate = $('.start-rate input[name="rating"]:checked').val(), productId = parseInt($('.popover-content').prop('id')); $.ajax({ url : ROOT +...

-1
Q: Encrypted communiction between IOS/OSX --> PHP

amorphI need a very basic encrypted Communication between php and objective C. I need to pass a NSDictionary and I can't use a SSL certificate. I've found the class JNKTransmitter on Github which does exactly that, but it doesn't pass the Dictionary. So I'm curios if anyone of you knows whats the p...

0
Q: How to change node names and format with a custom handler (JMSSerializer)

chipayI'm reading the documentation to create a custom handler to serialize (and deserialize) an array of dates. I'm confused about this: Handler example In that example, the call back function is defined: public function serializeDateTimeToJson(JsonSerializationVisitor $visitor, \DateTime $date, arr...

0
Q: Handling array paramter in html_anchor function of Twig in FuelPHP

PurusI am converting the PHP based template to TWIG based template in FuelPHP. echo Html::anchor('categories/create', 'Add', array('class' => 'btn')); I found out with some help that the equivalent tag for TWIG is html_anchor which works fine. But as in this case, there is an third parameter passed...

0
Q: Why redirect function in CodeIgniter not working?

AbaijI have a really weird problem. I have been using CI for more than 2 years and it's the first time I found this kind of problem. I found that the redirect function is not working properly. I already load the url helper in autoload.php. $autoload['helper'] = array('url','html','form','file'); Wh...

0
Q: PHP redirect conditional statements

user3132932I am attempting to modify the ID login system to work for admin and users but it dosnt work, any suggestions? Why wont my access level MySQL query not work please help. There is also a connection to the db and call to functions but these are nothing to do with it I need to make it work with this ...

0
Q: Multiple jQuery UI sliders like at Humble Bundle with numbers

VBeregovoyI am used search already - but still don't know how to make it with form. I need make few sliders like natives jQuery UI, but it must be related. For example. I have 60 points. I need make few sliders, for separaion between this sliders. Here is example But i am need make few sliders. For examp...

0
Q: The most logical way to order up-votes and down-votes and how to do it

dabadabaIn my database I have a number of up-votes and a number of down-votes for each row in the table and they represent some kind of calification for that item. When displaying all items in a table, what would be the most logical way to order those according to the values of the votes? I have thought...

0
Q: Using PHP to create and save XML in subfolder

TeamStarI'm using PHP to create and save xml files using this syntax: $xml->save("source1.xml") or die("Error"); It worked fine until i realized that i have more than 300 sources. Meaning in my folder where the working files e.g.; my css and php files i would have additional 300++ xml files mixed toge...

0
Q: PHP trying to implement interface without success in symfony2

PAMI'm just started learning Symfony2. I have problem with using interface in controller. I've created very simple interface, then implemented it in controller and now Symfony debugger shout that my method is incompatible with interface. Below is my code. Webrama\UserBundle\Controller: namespace W...

0
Q: Add the Custom Data in top of every post title in wordpress?

FresherI try to add the custom data in the top of every post in wordpress. Previously what i am tried is to be looks like this way function newcontent($content) { ob_start(); // Some stuff goes here echo "this is for testing"; $newvariable = ob_get_clean(); return $content.$newvariable; } add_filter...

0
Q: Fatal error: Cannot redeclare class

user3109712I am trying to generate getter and setter for entity class by using php app/console doctrine:generate:entities Acme/WebsiteBundle/Entity/W_user But getting following error: Fatal error: Cannot redeclare class Acme\WebsiteBundle\Entity\W_user in C:\xampp \htdocs\labeeb-projects\Symfony\src\Acm...

0
Q: How i can download value from other site

LethysekI wonder how I can download value from other website and display it on my site. I want to get Last BTC price from: https://btc-e.com/ Its first class named orderStats, in header of btc-e. ps. I would like to get this value without api. Just by downloading specific class value.

0
Q: Select imploded values from a database and select them in a dropdown box

JamesI have the below code to generate a multiple select box with values from a database. The page in question is a form for modifying previously entered information. The value of “$Interviewers0” is retrieve before the box is generated. If the value of “$Interviewers0” is “John Doe” it selects that ...

0
Q: $_COOKIE is empty on the remote server

Oleksandr KhavdiyI am trying to set cookie so I do setcookie("MyCookie", "Cookied Value", time()+3600,"/"); print_r($_COOKIE); this works on my localhost and I get Array ( [PHPSESSID] => 3443c96e8b0d9a17e270ee83c023f2f2 [MyCookie] => Cookied Value ) but always empty array on the remote server. Is ...

0
Q: How do I extract content from a webpage with certain headers in bash?

CrudeCoderSo far I am using curl along w3m and sed to extract portions of a webpage like ....content..... I want to ignore all the other headers (ex. , ). Except the way I am doing it right now is really slow. curl -L "http://www.somewebpage.com" | sed -n -e '\:<article class=:,\:<div id="below">: p' > f...

0
Q: How can I transfer a PHP-based Facebook session to Javascript?

Martin TraceyI've taken a look at the answer provided in this question, and it's gotten me even further from where I want to be! I've integrated Facebook Login in my app using the Facebook PHP SDK, and it's working beautifully (I'm using with Laravel and it's just great!). I'm looking to transfer this Faceb...

0
Q: Osclass custom attributes plugin custom output

user3135183I am using Osclass software to create an advertising website. And to asign different attributes to categories I am using the Custom attributes plugin which you can find here: http://sourceforge.net/projects/custom-attrs/files/latest/download. The plugin uses the following loop to output all the c...

0
Q: ALTER TABLE AUTO INCREMENT

user3132907I am having a problem with ALTER TABLE AUTO-INCREMENT. it does altered the table to 100 but it does not auto-increment. hope anyone can help me.. here is my code. thanks in advance. $con=mysqli_connect("localhost","root","","info"); // Check connection if (mysqli_connect_errno()) { echo...

0
Q: Multiple Redirect page that would display a message before, is this the best method?

jayjayI have a website with about 50 pages, each one have a text link and a banner link, I want them to lead to the same redirect page, that would redirect them to an external URL, according to two variables that would be in these banner/text link. Here's a code that seems to be working, I'm not a pro...

0
Q: Adding a birthdate using php to a mysql database

user3135205I am creating a script with php which needs to send some information from a html form: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert</title> </head> <body> <form action="insertform.php" meth...

0
Q: Monitoring Windows Servers Remotely (via Web Interface)

user3135221I would like to create a webpage that will display if a server is up or down. The servers are all Windows however some are 2008 and some are 2003, they are hosted inside different networks at various clients. I would like to setup a webpage with a matrix showing the status of each server. I have ...

0
Q: How to show related posts by categories in wordpress with thumbnail

iSaumyaI was sniffing around the internet and for some wordpress php code to show up the related posts depending upon the post category with thumbnail. First I have found this: http://www.hongkiat.com/blog/wordpress-related-posts-without-plugins/ and like the design/representation of it. But the only pr...

1
Q: Tank Auth on Inactive user redirect loop

user2317735Hello i'm setting up on my codeigniter application and on non purpose i tried to make manually active = 0 from my phpmyadmin and tried to login now i'm getting redirect loop. Can anyone suppose what is the problem ? Here is my controller function login() { if ($this->tank_auth->is_logged_...

0
Q: How to architecture / structure / organize large symfony 2 application

tnguyen444I am building a large application with Symfony 2. Actual this is more like a couple applications. I will have: Two Web Apps - These web applications will be very similar. They will have some views that will be shared so that when I update the code in one view, it needs to apply to both. The...

0
Q: Using EntityManager in costum UserProvider

Ivan Ristici am attempting to use Doctrines Entity Manager in a costum user provider in Symfony2. As you can see, i pass it as an argument: SnapsavedUserProvider: class: Snap\ModelBundle\Security\SnapsavedUserProvider arguments: ["@doctrine.orm.entity_manager"] And in the class i do: namespace...

1
Q: Refactoring IF hell

Francisco PresenciaTL;DR: What strategy can I follow to simplify request's if hell? I'm refering specifically to this github file. It's there to deal with different possible user actions. I'm trying to refactor it, but I'm not sure what's the best way. A small fraction of the code: // The users returned from vali...

 
9:18 PM
0
Q: 1 help, undefined index when retrieving a GET variable

user2957160I am trying to retrieve the $_GET variable but it keeps telling me that I have an undefined index as if the variable wasn't stored. <html> <body> <form action="commentEdit.php" method="post"> <label for="content">Content:</label> <input type="text" id="content" na...

0
Q: Php parse string and covert to array

VlatkoI have following string in php: $str = '/something-new/:id/goto/:new_id/full/page/:num/ and i need parse that string and convert it in array like this: $arr = array([0] => 'id', [1] => 'new_id', [2] => 'num'); which is the most effective solution for realizing it? Thanks

0
Q: Instagram POST Like PHP // Not working anymore?

user2488971Dear Instagram Developer, today I tried to post a like via PHP (Curl) without look. The output is that a token is required but I used a working token. I tried the same token with js and it works. Did instagram changed some things bout PHP? here is my code.: <?php $media_id = '6158399182...

0
Q: Alternative to the internalization of Symfony

Vincenzo RacoI'm creating a PHP web application and I'm undecided whether to choose Zend or Symfony. I have studied both and I must say that the best result Zend, both in backend nell'internalization. But as template disappoints me a bit, in fact it's the highlight of Symfony (Twig). I would like to decide fo...

0
Q: PHP preg_match: any letter but no numbers (and symbols)

dabadabaI am trying to set a validation rule for a field in my form that checks that the input only contains letters. At first I tried to make a function that returned true if there were no numbers in the string, for that I used preg_match: function my_format($str) { return preg_match('/^([^0-9])$'...

0
Q: PHP Curl equivalent of command line curl

user3135240I have a working command line curl command curl -v -d '{"auth": {"passwordCredentials": {"username": "myusername", "password": "mypassword"}}}' -H 'Content-type: application/json' myurl $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, myurl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); c...

 
9:42 PM
0
Q: How to add html code inside wp post/except via template file

Charles WayneIn a wordpress woocommerce template, this line outputs woocomerce product description / excerpt <?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?> Adding my html after that line outputs my html outside the div that holds the excerpt/description of the product. ...

2
Q: MVC pattern - the right way of thinking about it

notnullRead tens of articles on MVC, and right now, it's one mess for me. I am trying to do the right thing with my project, which I am rewriting from procedural php into oop, however, I am confused. I am sure, Model should include all the business logic, which makes sense imo. Not too sure about View...

0
Q: Cakephp Ajax, Using Js Helper to get value of a text field

user2864175guys this the code I am using to make a ajax request, its not the complete code just relevant stuff <div class="container whiteFont"> <label>New Tag</label> <?php echo $this->Form->input('tagValue'); ?> <input id="tag-button" type="button" value="Add Tag"/> <div id=tag></div> <?php ...

0
Q: Get URL with PHP

user2898075Let's say I have this URL: http://test.com/directory-test/?id=4746&other=454#comments How can I retrieve the URL of that specific page with PHP, however, just without all of the variables and #s. So for example: http://test.com/directory-test/ I found this function, however, it includes EVE...

0
Q: Preg_Match Error To Get Line

user3135267if(preg_match("//*/i",$line))echo "comment start"; if(preg_match("/*//i",$line))echo "comment end"; I'm searching commnets which one starts with " /* " and end with " */ " i cant get any result with this code im trying to get comment start and end line

 
10:00 PM
0
Q: How to seperate this PHP and HTML source

Metro1337I have a change_username.php which makes it possible for users to change their username. If they changed their username a page like "Your new username ist xxx" or "xxx is already used" will be displayed. I don't want to use an echo and put all the HTML stuff in there. My first idea would be to ...

0
Q: HybridAuth Facebook returned an invalid user id

spyfxI am getting the following error: Authentication failed. The user has canceled the authentication or the provider refused the connection. Original error message: Authentication failed! Facebook returned an invalid user id. tried a lot of things like to add in the base_facebook.php CURLOPT_SSL...

0
Q: Programming without "finally"

uk4321I don't have the required version of PHP that supports finally, so I am wondering if this: try { work(); } catch (Exception $) { cleanup(); throw $e; } cleanup(); is exactly the same as try { work(); } finally { cleanup(); }

0
Q: setting a timer if a php variable exists?

user2921557i am working on a feature that will disable the login button on my login form for 2 seconds if the user has previously given an incorrect login. On failed login, a field is inserted into my DB with the users IP and also the time. The time isnt important now, i will be going back and comparing t...

 
10:30 PM
0
Q: PHP: String in json parse

user2973474I am trying to parse a json. I am running this in a foreach loop and if I do the following it works: foreach ($this->placesCachingTypes as $places) { $places_location_lat = $json_decoded->json[0]->restaurant[0]->geometry->location->lat; $places_location_lng = $json_decoded->json[0]->$restaur...

0
Q: How can i turn this into a secure log in?

user3135306session_start(); ob_start(); *host detail stuff here* mysql_connect("$host", "$dbusername", "$password") or die ("cannot connect"); mysql_select_db("$db_name") or die ("cannot select DB"); $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['pa...

0
Q: I think PHP is treating my input as octal, make it stop? =D

user2922264This is probably an easy one, but I couldn't figure it out after searching. I managed to alter the output 20 different ways, but none of them were what I want from it =D <?php $text = <<<DATA Show.Name.2x05.HDTV.x264 Show.Name.2x06.HDTV.x264 Show.Name.2x07.HDTV.x264 Show.Name.2x08.HDTV.x264 Sho...

-1
Q: Best way to check if a user has 'favorited' something?

user2554352So say I have a list of statements and users have the ability to favorite these statements, what would be the most database efficient method to store whether a user has favorited something? What would the database look like?

 
10:49 PM
0
Q: apc huge difference between misses and hits

w0rldartI just can't figure it out, where my configuration goes wrong, since I get so many misses and so few hits. And eventually that causes memory leaks. See for your self. And notice that I'm using APCu rather than APC. Any ideas of what I might be doing wrong? Or what goes wrong?

0
Q: progress bar and ajax request not workung with php-files

user3135327i want to write a progress bar when i fire an ajax request. $.ajax({ url: 'http://www.domain.de/test.html', xhrFields: { onprogress: function(e) { if(e.lengthComputable) { _this.find('.process-loading').attr('style', 'width:' + (e.loaded / e.total * 100) + '%'); }...

0
Q: Uncaught ReferenceError with: var not defined

dabadabaI have a table with cities that you can upvote and downvote. Depending on which button you click a hidden input takes this or that value, and I manage that via javascript. But it seems like there is something wrong with the function call. Here's the HTML: <td><span class="icon icon-thumbs-down ...

-3
Q: Check if user is online [PHP]

dipshitWhats the easiest/best way to check if a user is online or offline? If a user is online, I want to echo out 'Online'. If he's offline, I want to echo out 'Offline'.

0
Q: ORDER BY NOT WORKING MYSQL AND PHP

bmacuerIm doing a query in mysql and results ar not ordered by the percentage... How can I force order by percentage?? it does get order by total_sold but not by percentage Here is the code: SELECT in_disassembly.car_id, in_disassembly.cost, IFNULL(SUM(product_sold.product_total_price),0) AS total_sol...

0
Q: file_get_contents method doesn't work if the file contains include coomand

Bóta LászlóI have a wordpress project. I tried to get the written content of php file with the file_get_contents, but it has got a problem, because the getting file has an include command, and this do the warning... I have to use the file_get_contents() method, because I use an other online API, which work...

 
11:05 PM
0
Q: PHP Session doesn't work in Firefox

user3135345I tested my app on Chrome, IE and Safari and it works as it should. It was working fine on Mozzila Firefox since two days ago, but I can't figure what which might be the problem. Here is a part of my js ( I am getting some data from Amazon, using their API and then when someone selects a product...

0
Q: Since I formatted my pc, I get a "No 'Access-Control-Allow-Origin' header is present..." error... How comes?

Mickael Bergeron NéronSince I formatted my pc,I get this message when sending an ajax requestion itself calling a php file: "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access."

0
Q: PHP undefined session

user3117992after user has logged in, it isn't displaying any content. Here is my code: login.php <form method="POST"> <input type="text" name="username" placeholder="username"><br /> <input type="password" name="password" placeholder="password"><br /> <input type="submit"> </form> <?php i...

0
Q: characters issue with my wordpress theme

vahid kargarI creat new customize theme for wordpress and all things was right, just when I upload it on host my characters changed to something like نوشته‌های تازه. I use meta charset="UTF-8" in my php code, and I use this query in phpmyadmin: SET NAMES UTF8; can any one help me? (excuse...

0
Q: Retrieve current address details in Prestashop payment module

Utkarsh MishraI am creating a Prestashop Payment Integration module for FSSnet (Indian payment gateway). I need to pass some user defined fields to the Payment gateway, some of which comes from the current specified Order Shipping address (like Phone number, etc.) While I have extracted most of the fields af...

0
Q: PHP Varibles not Posting

RainbowdashTMSo pretty much this is my code. It's not generating any sort of post. Is there some reason why this is occuring? It's rather annoying. And is getting on my nerves. I've been trying to de-bug this for about 30 minutes now. And I've tried numerous things. Is it because of it not actually posting t...

0
Q: PHP Difficulty creating file

user3135245i use ubuntu as my os of choice. busy studying php with a book called "php and mysql web development 4th edition". i have trouble with the following code. i am trying to create a text file. my defaulft folder im using is /var/www/test/ <?php //create short variable names $tireqty = $_...

 
11:37 PM
0
Q: Html get url requests into iframe

user3135369While I was working with html iframes I wanted to put my external domain into an iframe like this: <iframe src='http://kkk.com' /> </iframe> For example My website is http://yyy.com I want when someone type http//yyy.com/anything the src of iframe changes to http://kkk.com/anything. And MY...

0
Q: mysqli query returning true on null

user3124439I read that a successful sqli->query will result in an object while a failed one would result in a false. With that in mind, I wrote this code: //first test if account is already awaiting activation $query="SELECT * FROM activate WHERE email = '$email'"; //if it is awaitign activation.... if ( $...

0
Q: PHP search item in 2nd level in associative array and delete it

Ing. Michal HudakI have associative array: array( '0' => array( 'id' => 1, 'name' => 'one' ), '1' => array( 'id' => 4, 'name' => 'two' ), '2' => array( 'id' => 8, 'name' => 'three' ) ); where I want to remove item from array where id = 4. ...

0
Q: PHP code is shown in browser as plain-text and not processed

enraged camelI'm new to both PHP and developing on Mac OS X. I have the following code on the front-end (browser on my laptop): $('form').on('submit', function(e) { $.post( 'save.php', $(this).serialize(), function(response) { console.log( response ); }); e.preventDefault(); }); And t...

0
Q: Setting up cron to run identified as a different ip address

lbennetI would like to run a cron job specifying from which ip it should be ran off. It's pointing to 5 php files and I have 5 virtual hosts configured for 5 different ips. I would need to assign an ip for each of the 5 crons that execute the php.

 

« first day (309 days earlier)    last day (1 day later) »