« first day (215 days earlier)      last day (95 days later) » 

1:12 AM
-2
Q: Basic PHP Hit Counter

JJinVASo, I used to play with web development many years ago, and I'm a little rusty, but not THAT rusty! I just made a full fledge video game page the other day using PHP variables to load different games into different size iframes. With that said, why on Earth can I not get a simple PHP hit counte...

0
Q: Joomla 3 template - module width in wrapper

Mart LaubFirst of all, I'd like to apologize, if this problem already has an answer in stackoverflow.com, it's just that I couldn't think of a way how to google the solution. Anyway, here's my problem: I'm working on a Joomla! 3.0.2 website and I have encountered a problem with div width. I want to have ...

0
Q: PHP and HTML - Login credentials not being set. InnerHTML is null?

pzyrenI am having some issues logging in into my system. Whether or not, I enter the correct login, it just says please wait and nothing else happens. Can someone catch what I am doing wrong here? I'm sure it is something very simple. Could it be that the innerHTML' is null and not loading? <?php incl...

-1
Q: Php based Quiz software that supports Credits

M99I need to develop a Php based quiz software with the following requirements. I would like to begin by using an existing framework or software. Can you please suggest any open source Quiz products that are well documented and customizable? Users login with their Facebook. Able to post daily quiz...

0
Q: Two Column Array from Two Column MysQL Table

ShadeI am trying to write a script that will do two things: 1) Run through a two column table and then push the contents into a two column array 2) Run through that two column array (made in thing #1) and re-insert it back to a two column mysql table. Here's my attempt of thing #1: //grab desired...

 
1:43 AM
-1
Q: MySQL - 500 queries at the same time

CodeGuyI am concerned about data being stored in my MySQL database. Potentially, 500 people may be executing a query at the exact same time to insert data into my database (via php). Is MySQL protected and will it prevent any issues with queries being executed at once?

0
Q: Use common files across various domains

What have you triedI've got a site with dozens of sub directories. Each sub directory represents a different client: client1.mydomain.com client1.mydomain.com ... If you do not want to read all of the details, you may skip to the quote towards the bottom of the question I don't want to have to keep to c...

 
1:55 AM
0
Q: What is different about Magento 2?

Jevgeni BogatyrjovMany of Stackoverflow users, who follow the latest trends in e-commerce world have probably heard that the next major version of popular e-commerce platform Magento is in development stage. Some of you have probably tried the beta version of the platform ( github link ). Can I ask those of you ...

 
2:07 AM
0
Q: Deleting a record in mysql using php

Type540I can't figure this one out. I've look around and here and else where and they all seem to tackle this job in a very round about way. I've created a page for deleting members. The user types in the username, clicks select and that retrieves the specific record from the database. The user can then...

-2
Q: Interaction users on html DOM model?

Jek-fdrvi have one idea, to create some game on html5 canvas,js,php. My game must have PVP, so players must interaction together, but i have not idea how to do this. Easy example, i move drugable div and all who open that page see how it moving. I founded http://www.meteor.com/ and https://togetherjs.co...

0
Q: php laravel blade template not rendering

mysql_noobie_xxxxI am attempting to setup a basic page using Laravel and twitter bootstrap. I installed Laravel and got the generic "you're here" or w/e image so that seems shiny. For twitter bootstrap, I added in my /public folder the twitter bootstrap files under /resources/js, /resources/css, and /resources/i...

0
Q: Php wont run MySQL update query, But the query works in MySQL console

user2803295My php script seems to not want to update my table although the exact query im trying to run works when i use it directly in the MySQL console. Also I have to say that selection querys have worked for me, its only updates that dont work.. heres my code: ConnectToMySQL(); function ConnectToMySQ...

0
Q: Exception in Controller of Zend Framework

roast_soulI find a weird thing in Zend Framework 1.12. In action function, I new a object which doen't exist. Code as below: public function signupAction () { $tbuser = new mmmm();//mmmm does not exist, so there's exception here } But it doesn't turn to the ErrorController. I tried ...

0
Q: EXTJS4 how to get json response message from php

rizky ardigood morning All.. i have problem, when i want to show my error message in failure submit : this is my code : formUserAdd.getForm().submit({ success : function(form, action){ dsuserAll.load(); winUserAdd.hide(); }, failure:function(form, action){ ...

0
Q: Can not call a function while in a mysqli fetch loop

Katp00pThis code just does not work. $queryProduct = $mysqli->prepare("SELECT productID FROM products WHERE productCat=?"); $queryProduct->bind_param('i', $id); $queryProduct->execute(); $queryProduct->bind_result($productID); while ($queryProduct->fetch()) { smallBlockProduct($productID); } $queryPro...

0
Q: Replace a string with a word basing on nth occurence using php

user2567639I have a string with anchor tags i filtered the string and got all anchor tags and value. my array will be : Array ( [www.google.com] = Array ( [0]=> click here [1]=> search engine } [http://www.gmail.com] => Array ( [0] => text1 [1] => [2] =>...

 
2:43 AM
0
Q: Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in

user2803321<?php if(isset($_POST['make']) && isset($_POST['model']) && isset($_POST['price']) && isset($_POST['quantity'])) { $DBConnect = @mysqli_connect("mysql.ict.swin.edu.au", "s2055899","gritt2013", "s2055899_db") Or die ("<p>Unable to connect to the database server.</p>". "<p>Error code ". my...

 
3:01 AM
0
Q: How to properly store and lookup areacode grom a phone number

Jeremy DicaireHow do I store areacodes (npa-nxx) in a database for fast lookup? Here's the deal: I have a variable that contains a phone number and I need to look in a database for the city attached to that phone number. The problem is, different countries have different formats. Canada/USA: +19055551234 (+1 >

0
Q: CakePHP cakedc search find all products by category and categories children

CertifiedGeekI'm using the CakeDC search plugin. I have a simple shopping cart with products that all belong exclusively to subcategories. for example subcategories of food may be fruit, vegetables, meats, etc. so a pear only belongs to the fruit category. So I have a dropdown that has all categories, i...

0
Q: How to update multiple rows and also prevent sql injection?

user2774977<?php if ( isset( $_POST["submit"] ) ) { foreach( $_POST["id"] AS $id ) { $may_tc_s1 = mysql_real_escape_string( $_POST["may_tc_s1"][$id] ); $may_ac_s1 = mysql_real_escape_string( $_POST["may_ac_s1"][$id] ); $jun_tc_s1 = mysql_real_escape_string( $_POST["jun_tc_s1"][$...

0
Q: Create a blank record via PHP based on MySQL table

John StraffinI've got a home-grown LAMP app that uses the same HTML code for the "Modify record" and "New record" pages based on whether it is passed a blank record or a non-blank record. Currently, I'm creating the blank record by selecting a single record from the MySQL table and manually setting each field...

0
Q: Strip all BBCode from string, except for [quote]

0mniI want to be able to strip all BBCode from a string, except for the [quote] BBCode. I have the following patterns that could be possible for quotes: [quote="User"] [quote=User] [quote] Text [/quote] [/quote] [/quote] This is what I currently use to strip the BBCode that works: $pattern = '|...

0
Q: sql query to get termid in wordpress

SubhaCan any one please tell me the sql query to get termid of a specific post in wordpress. I know the wordpress in build function to get this. But I need the raw Sql Query.

0
Q: How to send correct HTTP response on custom Error document?

olliI have my site configured through .htaccess to do this: ErrorDocument 403 http://www.mydomain.com/error.php?e=403 ErrorDocument 401 http://www.mydomain.com/error.php?e=401 ErrorDocument 400 http://www.mydomain.com/error.php?e=400 ErrorDocument 500 http://www.mydomain.com/error.php?e=500 error....

0
Q: Can't get Symfony 2 toolbar to display on website

HMRI am trying to do this from a remote computer so the app_dev.php is: <?php use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Debug\Debug; $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; Debug::enable(); require_once __DIR__.'/../app/AppKernel.php'; $kernel = new A...

0
Q: PHP !isset returns true when not set

0n35Firstly, my code: $stmt = $pdo->prepare("SELECT id FROM users WHERE username = :user_email OR email = :user_email"); $user_email = $_POST["usernameemail"]; $stmt->execute(array( ...

0
Q: create a function that validates date using jquery ajax and php checkdate() function

Alex CorozaI am making a function in Jquery that validates the date given, by accessing checkdate.php using ajax. checkdate.php uses checkdate() and returns "success" if the date is valid. Here is my jquery function. function checkdate(sample) { $.get('checkdate.php?dateSample='+ sample, function(dat...

0
Q: Wanting a while loop to only display a list of stores from the database in a table

user2803396I am creating a report in php. I have a database that has order data for 20 plus stores. I am wanting to create a table to display the stores and then list data in the subsequent rows after the store number. I am attempting to do this with a while loop. The only problem is, there are multiple...

 
3:49 AM
0
Q: DateTime object throwing error when passing date

ndjustin20I am using the following code and it works fine. $boosterDate1 = $_POST['boosterDate1']; //$boosterDate1 = changeDateFormat($boosterDate1); date_default_timezone_set('America/Chicago'); $myDateTime = new DateTime; $myDateTime = $myDateTime->createFro...

0
Q: Increase view counter on page refresh

BurrowsMy webpage has a view counter that I need to increment every time the page is refreshed/viewed within a query which would save it in the database. How would I do this?

0
Q: Retain selected item from dropdown menu after submit

KayotiHello I have a dropdown menu which holds items from my database when the submit button is pressed the menu item is not retained instead it resets back to what it started initially. I read a couple of posts about the subject but my case is specific I am not sure where I should insert the selected...

0
Q: Better way to find the latest change in sql value

TomI have 2 tables, one of which lists items, the other of which keeps track of when items changed in price. price_table: price_id int item_id int price_amount float change_date date // this date is stored as Y-m-d, without a time and item_table: item_id int item_name char(40) item_desc...

0
Q: MySQL Search from Multiple User supplied where clause - Fix and Better Algorithm

Johny BravoI want to run search query where i have multiple where clause. and multiple depends upon the user argument. for example i mean, Search may depend on 1 column, 2 column, 3 column or 6 column in my case, and i don't want to run if-elseif-else statement with all column probability. So, i have just ...

0
Q: Call method from subfolder

user2454075I run into problem, when i can't call methods. structere is something like: /www /classes /class.php /pages /page.php /index.php so i want to call method from page.php file. autoloader is configured in index.php file. what is correct way to do so? i created object in index.php, a...

0
Q: Adding video link field to RSS

Jay BerdI am trying to add a video link to my RSS field. for example. Here is a link to a post I want to extract a video link from: http://topdailyfights.com/index.php/09/20/employee-goes-crazy-in-office/ The link I want is in "video-wrap" div class. <div class="video-wrap"><div class='jwplayer' id='...

 
4:37 AM
0
Q: Foreach loop in the middle of an array. Or something similar

user537137I need to loop through the rows as shown below but am obviously getting an error with this code. I have just added the foreach loop here to show where I need it to loop through. Hope that makes sense... $data = array( 'cols' => array( array('id' => '', 'label' => 'Date', 'type' =>...

0
Q: Upload XML file in Phalcon

eomeroffI am trying to upload XML file to Phalcon application. I was looking for in documentation and it does not help me I simply can not get any reaction from upload action below. Like it is not happening. Here is code from controller: <?php class XmlController extends ControllerBase { public f...

0
Q: PHPBB Statistics Error

s28400I am incorporating a statistics section on my webpage and am having some debugging issues. I have the code to get the statistics and it works perfect by itself on my test page, but as soon as I put it into my index.php page, it works, but it gives me the error: Fatal error: Cannot redeclare...

0
Q: Create multiple tables in one mysql query

AkoSi AsiongThe query works in mysql.. however If put it in a prepared statement. The query does not do anything. Also, if I remove the second query ( CREATE TABLE IF NOT EXISTS price ), the statement would work. $stmt = $this->con->prepare(" CREATE TABLE IF NOT EXISTS `contents`( c_id ...

 
4:49 AM
0
Q: PHP: mysqli_query and die()

GuillaumeThe code: I am testing the simple code below to insert data into my database: mysqli_query($con,"INSERT INTO Persons (Age) VALUES (35) WHERE FirstName='John'") or die("Error"); In my db I do not have a row where FirstName=John (it is part of the test). The problem: Because there is no row i...

0
Q: Wordpress Bigwig Theme Deep Customization

King KhanI have installed bigwig theme for my wordpress site ( http://test.adamconsulting.com ) . The theme is pretty good, but i want to customize the features that it provides, like it has a lot of dynamic features, creating sliders, carrousels, etc. I want customization in the core functionality of the...

0
Q: Retrieving a list using ajax and a php page

AjitI am trying to pass two variables from a page consisting of two drop down lists do some calculations and retrieve a third list into a div. How can I get this to work.? Here's my code. <HTML> <HEAD> <script src="jquery-1.10.2.js"></script> <script type="text/javascript"> ...

 
5:07 AM
0
Q: Purpose of CA Root Certificates Bundle?

AnthonyI was watching Ray Villalobos demonstrate how to work with the Twitter API 1.1 changes using PHP. During the video, he put this certificate in the server. My question is, what is the purpose of using this certificate?

1
Q: How to create FileUploader for Android

ChadI got a code here which uploads a file to a php server, I've set an upload filepath and upload filename within the code so it will automatically pick which file from my phone to upload, here it is: public class UploadToServer extends Activity { TextView messageText; Button uploadButton; int ser...

0
Q: Populate html <select> with array data from mysql in PHP

Slava BasatI can see the query returning results, but I can't seem to be able to put them into a html dropdown box. Also, the dropdown box has just as many entries as the query returns, but THEY ARE ALL WHITE SPACES. Can somebody help me out? <html> <?php //Connect to the database $mysqli = new my...

-1
Q: pagination in php script

user2803513<?phpan="2"><h2>Reply:</h2><br /> <form method="post" action="reply.php?id=' . $row['topic_id'] . '"> <textarea name="reply-content"></textarea><br /><br /> <input type="submit" value="Submit reply" /> </form></td></tr>'; ...

0
Q: Laravel 4 Eloquent Dynamic Where Clause

ShuvoI recently learned about dynamic where clauses (I think that's what is called) in Laravel 4 Eloquent which makes where clauses like User::where('first_name', 'Jon')->get() becomes nicer User::whereFirstName('Jon')->get(). How flexible is this?? Can i for example do the following multiple colum...

0
Q: Connecting to JustHose MySQL Database

Alex BeebeI'm farely new to using MySQL databases and I am having some issues when I try and connent to my JustHost MySQL database. I have created the database and I user. I changed my config.inc.php file to the specifications they listed but I still get an error when I try to access the database with a ph...

0
Q: PHP echo, outputting full html code (undesired) before object (desired)

user2472145When I echo $jsonstring, seemingly a whole blank html page is sent over (from php to javascript) with the object I requested. Super new all around here, so I don't get why. my php code: <?php //ini_set('display_errors', '1'); //ini_set('error_reporting', E_ALL); require "localdbcxn.php"; $e...

0
Q: Buddypress - List Members based on extended profile field value

Alan NiemiesI'm trying to retrieve a specific Members Loop page at BuddyPress with members who chose Yes on a specific Radio Button (which has Yes/No options). For this, I created an specific Template page at my theme. Unfortunately, my code (below) isn't working. Can anyone help me? <?php $attend_value =...

0
Q: Styling a php echo form with css

Ian RapleyIn my php below i have a forgot password thing and it echo's a form depending on certain conditions how would i style this with my css? because i do not want the forms showing up without any styling I have tried and tried to figure out what to do but there has been nothing. i even tried thinking...

0
Q: Select values from table and show it by while?

Mohammad SirwanI want to select values by 'while' but ther is problam, this is the code: <?php $following_select_article = mysql_query("SELECT * FROM follow WHERE user_follower_id='$user_id'"); while($following_select_article_row = mysql_fetch_array($following_select_article)){ $ar...

0
Q: Parse error: syntax error, unexpected T_VARIABLE in ... on line 1

Dasubijei just made a code i needed for my website, and i tested it and everything works fine, but on my LOCALHOST (Using XAMPP), but when i upload it to my hosting it says: Parse error: syntax error, unexpected T_VARIABLE in ... on line 1 I've been searching & being looking at the code for about 2 hour...

0
Q: Error:NO database is selected

user2803557*I tried it connection to database connection to database is successful but when i try to match user information with database it gives me a error NO database is selected i tried it connecting to database using different method but nothing worked * <?php //CREATING CONNECTION TO DATABASE $con= n...

0
Q: how to return an array of objects in zend framework 2?

Patrioticcowi am doing a query in zf2 and i get back a object(Zend\Db\ResultSet\HydratingResultSet) that i have to a foreach on, in order to get to the properties. I would like to get an array of objects by default. here is some code i have: factory 'address-mapper' => function ($serviceManager) { $...

 
6:01 AM
0
Q: custom post types not returning in wordpress phpunit test

NamalI have developed a Wordpress plugin with Custom Post Types. I want to test my plugin with PhpUnit. I used wordpress-tests for this purpose. All the files are configured and normal test can be tested. But the problem is with my custom post types. 'get_posts' is returning null. But in my plugin t...

0
Q: intallation Eclipse php plugin

Burusothman Ahiladasi tried to install eclipse plugin. Step: 1-Downloaded PDT plugin in eclipse Step: 2-I have wamp server. so saved my project into www folder. But click run as php web application localhost windows not appears.

 
6:26 AM
-1
Q: Where can i learn to develop web applications using php nd mysql?

user2762191i am new to programming php,ajax with EXAMPLES . Can anyone tell me a way or site to learn ? or else anyone can teach me ?

0
Q: Using PHP inside string as a string. (JQuery)

9903286Okay, hi. So in the code i have below i'm using an if statement to check if the user is an administrator, but the problem is that it doesn't check it, it doesn't even call it and in the console it says: "Uncaught SyntaxError: Unexpected token <". I'm guessing that it executes the PHP code instan...

0
Q: Setting Website meta description

DivyangI am trying to set the website description to be displayed on google search. I have seen some tutorials and all have implemented it using meta-description tag. But using the same concept my website's description is not being successfully displayed. On googling my website's name it is showing the...

0
Q: fast and best way to load a page to submit a form

user2568578i have a PHP form that submit when the page is load via javascript $('#submitauto').trigger('click'); what is the best and fast way to load the page (to submit the form) (cronjob not trigger a javascript, so i cant use it)

 
6:56 AM
-1
Q: Insert page not work in HTML

user2799766I have use below the code in my site but its not work could you please suggest some person. Index Page : index.html <!DOCTYPE html> <html class=" no-bgpositionxy" xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http...

0
Q: how to make preg_match accept - or ( )

An Nguyễn Lê Tháiwhen insert phone number users tend to type in various way like 083-XXXXXXX or (083)XXXXXXX or XXXXXXX.I mean the extension and the phone or sometime the phone. How to make preg_match accept the -XXX or (XXX) then return the real phone. For example (083) 1234567 will be 1234567

0
Q: How can I modify yii to accept negative record ids?

Phil HI'm trying to set up a yii frontend to an existing database. By dint of history, it has several tables with negative IDs - there's a nice set of consecutive IDs from 1, but then there are a large set with large positive and negative IDs. No, I don't know why. When using yii to retrieve one of th...

-3
Q: Breaking the captcha on this site using curl

user2803663I'm making an app to insert adds there using curl on this site http://juanx.dynns.com/insertar-anuncio.html but I can not pass the captcha. Someone can help me?

 
7:14 AM
0
Q: How to embed a MATLAB function which has two inputs and one output in a webpage?

Mahdi KhosraviI've developed a MATLAB code that I think it is useful to be used by researchers. How can I embed it in a website to be used free? It gets two integers and return a set of integers Thanks

 
7:26 AM
0
Q: PHP if variable definitely is either value or value then

AaronHattonI want to do a quick check to see if a user has access to view the page and so I have the function which simply returns the users access level when called and made that into a variable but would like to know how to write the if statement... This is what I have so far: if($uac_check == "Owner" O...

0
Q: Error with relationships between entities and setter function

cmaciasgI'm from yesterday fighting with this problem, and I don`t find any solution. I have two entities interrelated as follows: // src/FEB/UserBundle/Entity/User.php namespace FEB\UserBundle\Entity; use FOS\UserBundle\Entity\User as BaseUser; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * ...

0
Q: Update value in mysql datavase column with checkbox in php

AdrianI have the following code in php $countryiso = mysql_query("SELECT distinct name as name FROM location_country where code NOT IN('A1','A2','AP','EU') order by name"); echo '<table>'; echo '<th>Country</th><th> Add/Remove </th>'; while ($row = mysql_fetch_assoc($countryiso)) { echo '<tr>'; echo '<

0
Q: jquery if/else statement with .get not working

kprkrOn a new-user registration form, I have a real simple function just to check to see if a username exists in the database. Unfortunately, the else part of the statement isn't working. The PHP file works fine and returns either true or false, as expected. Here's the jQuery: $('#username').keyup(fu...

0
Q: SQL database wont upload to PHPMyAdmin

user2502658I'm trying to move a website to a new host. I have uploaded all the files required via ftp. Im now trying to upload the database in PHPMYAdmin, however it gives a message that the database is too large? I have tried unzipping it and re-zipping it, but it will still not upload? the database si...

0
Q: PHP Parse error: syntax error, unexpected T_DOUBLE_ARROW

user2803714The below mentioned code s working fine on 5.3.17 and I have php 5.3.27 and the issue is i have to make this code work on 5.3.27 LINK to full code: http://www.videobluemoon.com/secure/add.txt $customer_id = (int)$_REQUEST['customer_id']; if($customer_id => 0 ) { $query = $query.','...

-1
Q: How can i open a .exe file in windows using php

AswathiI saw php exec helps to run a .exe file . But i tried to open a notepad exec('C:\Windows\System32\notepad.exe'); it will simply executes/running but its not opening a notepad GUI . Can anyone please help ?

 
8:02 AM
0
Q: search for a record and update using php

daveJust wondering if someone could simply explain how to search a MySQL table for a specific record and then using the result to update that table. for example: a customers table consisting of cid, fname, lname, telephone and dob. I want to search using a search box in php so when one enters the te...

0
Q: Read a Webpage's Source Code, then read a text file and search on it

user2803736Okay, well i have to answer some questions about math on a webpage, in this webpage always appears a question so, in my form i have a Web Browser, a button that gets the Source Code of the web page that i am actually in the browser and a text box where the source code appears after clicking the b...

0
Q: Adding a large amount of html and php content as PHP variable

AaronHattonI am trying to make my life a lot easier and make all pages have the same footer and head content from one file and this is what I have so far: Page with content <?php include ("content.php"); echo $page_header; ?> <div id="content"> </div> <?php echo $page_footer; ?> content.php <?php...

0
Q: work flow of project

user2792990Still new to php and mysql... but had to accept this project as it could mean great things for the business's future. I am building an online referencing system where users can register and create an account etc, linked to Table A. then they will be able to import their info into Table B. I have...

0
Q: .htaccess rewrite to produce clean url

TheApptrackerCurrently I set a rewrite rule like so, to produce clean and simple url's. .htaccess RewriteRule ^/about$ about.php [L] But what i need to do is something a little different, the other way around. For example if a user clicks the following link <a href="index.php?a=about&b=user">about</a> ...

 
8:20 AM
0
Q: SQL only retrieve first item in the database

Adam Smith$search = mysql_query("SELECT subject FROM book WHERE useid = $userid") or die(mysql_error()); $sub = mysql_fetch_array($search, MYSQL_ASSOC); print_r($sub); There's a lot of subject in the book table with same user id, but it only retrieve first of it, why is that so?

 
8:32 AM
0
Q: Mysql, how to select only if exist

user2499170I need help with one query. I would like to select id, option and value from options table but only if options.id exists in products.*. Something like this: SELECT id, option, value FROM options WHERE EXISTS (SELECT * FROM products WHERE products.category="watches" AND products.*=options.id);...

0
Q: How would I go about changing this code to use prepare/execute?

Kansas City ShuffleThis is a simple query to MYSQL outputting the contents into a table. However, the current method I am using is not the ideal way as it's not safeguarding against sql injection. I'm stumped atm and any suggestions would be appreciated. Thanks. echo '<table border="1">'; echo '<tr> <th>Id</th> <th>

0
Q: Create wall for post made of blocks

user2803734i need a way to create a wall made of blocks. The idea was: i get the informations via php, then i echo them in a div. Stylesheet .block{ min-height:100px; min-width:190px; background-color:#999; float:left; margin-bottom:10px; margin-left:5px; margin-right:5px; } .holder{ width:800px; height:10...

0
Q: running jquery in the response of an ajax upload?

FareedHi guys I manged to make an Ajax upload form and got the response from my php handler but when i try to add JavaScript(Jquery) to the response the JavaScript don't work my handler.php: <?php if(isset($_REQUEST['action'])&& $_REQUEST['action']=="upload"){ if(!empty($_FILES)){ echo("<script>alert...

-1
Q: how to get attachment url and using wordpress & php file

TitoSoft We Basi have install wordpress in my website and i made php file called "processing.php that file will redirect user to change his cover on facebook auto >>> i have using switch case to get id and image url that image will be his cover for example : $GetPicId = $_GET["pid"]; // Picture ID from In...

1
Q: Javascript function to check a box based on value of select option

user2803755I currently have a javascript function, which changes a select option to 1 if a checkbox is checked. What I can't seem to figure out, is how to automatically check the box if the user fails to tick the checkbox and just chooses a value (other than 0) from the select dropdown. The script has ID'...

0
Q: building a php script / software tips

UzzI have good experience in PHP/ MySQL/ HTML/ CSS / JS - Jquery and currently I want to make a software to manage my father's pharmacy so I can start writing codes and that's it ! you have a software managing your pharmacy. but I need to get some tips / articles / tutorials if you can help becaus...

-1
Q: Pass php variable through ajax

user2043077So I have a jquery slider on my page and want it to update dynamically. I want to use a js timer function to call an ajax script that will query mysql to get the data and then return it as a php variable with ajax. ie <js timer> AJAX CALL PHP - $value = response </js> <jquery slider> value = $...

0
Q: Can I handover sessions from Laravel to my simple MVC?

Kabir MI just want to know if I am able to handover session variable from laravel to my custom code. What I meant is, I want to handle log-in through laravel and pass it to my profile section which is not in laravel. Most of the routes are handled by .htaccess. Okay, the thing is, just login with larave...

0
Q: JSON response is not ordering properly according to SQL query

user2656127I'm having a problem with my JSON array. On first load, the order is not as it should be (as defined in the SQL query). So the main problem is, on page load, i.e. when the SQL query is called with lastPoll=null - the results are not sorted by time1 DESC, yet they are sorted by the s.id ASC. When...

0
Q: Count the number of rows in database where multiple field is equal to different value

Adam Smithsubject | userid | flag math | abc | 0 math | abc | 0 english | xyz | 0 I wanna search the number of math subject where userid and flag = 0, how I write the SQL statement. I tried COUNT(subject) AS math FROM books WHERE userid = 'abc' AND flag = '0'; It doesn'...

0
Q: Displaying amount of users on a webpage

ReallyGoodPieI am trying to write a PHP script that will count the amount of users that have visited the page within the last 10 minutes. This is my script right now: function getOnlineUsers($database, $main_connection){ $database; $visitor_id = session_id(); $timestamp = time(); $timeOut ...

0
Q: SQL WHERE if field is serialized

user2779986I've got a problem which needs to be solved... I have table where one of the fields is serialized (field: s_field). It's just an array of id's. But now I need to get all data entries WHERE s_field = 5.. So I have entries where s_field is serialized(array(4, 5, 6)); and there are tons of these...

-1
Q: PHP package for GIT controle

llundinI am looking for a php package, preferably on packagist.org, which can I can use for the git hooks. I want to pull the latest state from my repository, check if there is a new tag added and checkout that tag. Wihtin the application, I also want the ability to roll back to an older tag (if it wo...

0
Q: Query not displaying the records

user2792990Hope you can help. I am running a query but no results are showing and I this is just when I try to link 2 of the result field with one another please help? here is my code <?php include 'core/init.php'; include 'includes/overall/header.php'; ?> <div class="article"> <?php $result = mysqli_que...

0
Q: TypeError: $(...).dialog is not a function

LoaiI am trying to integrate a basic CMS to my website, after three days solid working on it I am still having that ONE problem! I have tired everything I know, and did some research and found few answers but none actually solved the problem. I used Firebug to check for bugs and errors, and the erro...

0
Q: Always show number to nearest hundreth

Jack SniperI'm using the round($number,2) function in php to round a $number to the nearest hundredth. It works great, but if the hundredth decimal is equal to 0, it wont display the 0. I need the number to read: 1.70 not 1.7 Does anyone know a good method to achieve this? I'm doing it with about 20 numbe...

0
Q: Share variables between classes

Ste_95My project has a bunch of classes, and I need a way to share variables between them. For example, class A sets the menu link variable, and classes B, C and D must be able to access that value. Class B sets the project settings variable, and classes A, C and D must be able to access that variable....

0
Q: how to use php to count the same array?

user2128405I read a few of the threads but none of them seem to match what I need. What I'm trying to do it something like a voting system but does not include mysql at the moment. I made three radio buttons of music types pop, rock, metallic and a submit so whichever a person choose either one of them and...

0
Q: PHP MVC autoloading in the class that creates the controllers

AdRockI am trying to add an autoloader to the loader of my MVC to remove all the need for requires and includes. The autoloader works because I've used it before. What I need to know is how I can update this code to remove all the 'require's as they should not be needed. The bit that needs to be cha...

0
Q: PUT 2 mysql tables together

Sibel Sarıkayahow can i put this 2 tables togheter $result = mysql_query("SELECT * FROM berichten where fromm='$id' AND ontvanger = '$session->username' ORDER BY date ASC"); this is wat i tried but is not not working $result = mysql_query("SELECT * FROM berichten LEFT JOIN berichten_send on berichten....

0
Q: It is safe to save comments of users with out checking with : mysql_real_escape_string

Jitu SinghI just want to confirm it because mysql make some changes in comment like image HTML it add \" I know its making it secure but can you suggest me? I am first saving it to database and then display it in comments box. I am using : if (isset($_POST['comment-post'])) { $comment = $_POST['comme...

0
Q: Expose wordpress navi-menu to external laravel app

SLimCurrently the business having an existing wordpress application, while they're going to build another web application. the framework chosen by me for the development is laravel. How can i consume the defined navigation menubar from the existing wordpress menu? In case the application host seperat...

-1
Q: Validate that the user is entering a strong password with javascript

user2803924Need to validate that the user is entering a strong password. The password must consist of one of the special characters (* or ^ or !), at least three character must be in UpperCase and a numeric digit (0..9). I want to do this through javascript. Can anyone help?

-2
Q: PHP: Detect all classes used in a script, and load them

Donny PIs there a PHP library or extension that will inspect your code, find all the classes you use, and then go and automatically load those clases? When I write a new script, it's tedious to have to write a ton of require() statements. I know Facebook uses something very similar to "https://github...

0
Q: How to connect one websites database using another website

arunwebberI have two websites. Say site A and site B. Which is using PHP and MYSQL i Have a databse on site A I want to use that databse for site B how can i do that?.

0
Q: Preg Replace Numerals

UkaviI'm a newbie to preg_replace function. I have the following expression that I want to replace the numbers 0-9 with # in a string. It's returning the same string with no changes, where could I have gone wrong? I tried google but still cannot find the solution. Thanks. $phonenumber = "0720123456"...

0
Q: PHP set the attribute for an image with matrix values

arjinmcas the topic,I need to set the attribute for an image or create an image with the attribute what I get from a client as the matrix values. I found a function named imageconvolution,but it doesn't work out.Maybe I used it incorrectly. here is the code: <?php $image = imagecreatefromgif('http://ww...

0
Q: using the data returned from server in angular ngrepeat

Wolv3rineWhat I've been trying to do is get a data from the server using $http service of angular.js and then use the returned data in my template using ng-repeat directive. But the problem is that the data fetched are not being displayed at all, and the ng-repeat directive is generating like a number row...

0
Q: How can we calculate the Number of container required for shipping of Products based on percentage used by per item

Deepak OberoiI have following scenario Array ( [weightUnit] => lbs [containers] => Array ( [ABC] => Array ( [id] => 3 [title] => Gray Mailer [weight] => 200 [length] => 14 [height] => 9 [width] => 9 ) ...

0
Q: Loop to check dupilicate random strings

asdasd asdai have this function which creates random string: function genID($length) { $chars = "0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM@!"; //only allowed chars in the blowfish salt. $size = strlen($chars); $str = ""; for ($i = 0; $i < $length; $i++) $str .=...

0
Q: Sagepay redirects to Magento empty cart page

user2803936I have setup the ebizmarts plugin with my Magento store, everything works great. The user gets sent to Sagepay, the payment is processed, the user receives Sagepay email. But the redirect goes to the empty cart page instead of the success page. Any suggestions would be very much appreciated. Th...

-2
Q: no command 'php' found

Abel RajI am a web developer, I am new to linux and I am Using Linux mint. I want to include composer for my codeigniter project. I was about to install composer from my project directory in terminal. I used the code curl -sS https://getcomposer.org/installer | php But i get the error No command '...

0
Q: Wordpress Second Page Displaying the Same Posts as First (-1) Other pages fine

user2803938Links: http://manofmany.com/ & http://manofmany.com/page/2/ I'm seeing my 2nd page displaying the exact same posts as my first page (minus the very first/latest post). All other pages 3,4,5 etc are performing as normal/expected. I was changing around the coding to exclude a category, so I tr...

0
Q: Parallel domain logic to load resources like css,images,js

yaseen cruise $urls= ['http://www.1.trendland.com','http://www.trendland.com/fashion','http://www.trendland.com/music']; $newurl; $counter = 1; if (in_array("http://www.$counter.trendland.com", $urls)) { $counter++; $newurl = "http://www.$counter.trendland.com"; $counter++; }else{ $newurl = "http:...

0
Q: Laravel 4: Create a default route

Stefan SI'm trying to create a default route in my Laravel 4 REST API, that hits, when none of my other defined routes matches the request, to return a specific error to the caller. Is this possible? Unfortunately, I found nothing in the docs, so I played around and tried using a wildcard (*) as the las...

0
Q: PHP - !empty() check fails when checking PDO link status... why?

Julio Meca HansenI have the following method inside a class called Connection: public function output($query = null) { if (!empty($this->attributes["link"])) { print "OK!"; } else { print "NO!"; } } The value of $this->attributes["link"] comes from the following operation in the con...

0
Q: send variable with ajax call and get in php

user2290403I want to sent a variable on an ajax call when I click on a button. The button has an id and on click of the button the id should pass through the ajax call to a php file <button class="btn-view-products" id="mangoes">View Products</button> and my js is var gallery = $("#product-gallery"); v...

0
Q: Removing slashes from array

user2320607Firebase is kicking my a**. I'm trying to a column (tokens) from the users table using php I set the todo path $todoPath = 'users/'.$userId.''; get the data $response = $fb->get($todoPath); and get this $response: {"lastName":"Sengbe","location":{"name":"San Francisco, California"...

0
Q: Error: PHP Stack trace:, referer: http://www.website.com/sec/

user2803714[Sun Sep 22 06:11:28 2013] [error] [client 115.244.73.21] PHP Stack trace:, referer: [Sun Sep 22 06:11:28 2013] [error] [client 115.244.73.21] PHP 1. {main}() /home/abcdef/public_html/sec/LoginEngine.php:0, referer: [Sun Sep 22 06:11:28 2013] [error] [client 115.244.73.21] PHP 2. date() /...

0
Q: pdo cassandra returns empty result

user2803993I tried to create a program to get the contents of a table with cassandra-pdo but it returns an empty array, what is the problem? I think it does connect to cassandra since when I changed the port it gave me an error. <?php $dsn = "cassandra:host=localhost;port=9160"; $db = new PDO($dsn); $db->...

0
Q: PEAR Mail not sending but also not reporting error

BarbsI am trying to send an email via PHP using PEAR Mail but although the page reports that the mail has been sent, it never arrives (I'm sending it to myself for testing). I have been researching how to handle errors and if I turn strict reporting on, I get about a half dozen reports of these: Str...

0
Q: Two redirect reules conflict with each other .htaccess

TheApptrackerI had problems with a .htaccess file, that has been fixed, now i have another problem. I wish to clean the url using a .htaccess file. here is my current rule RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php\?a=page&b=([^&]+)[\s&] [NC] RewriteRule ^ /%1? [R=301,L] RewriteRule ^([^/.]+)/?$ ind...

0
Q: ZF2 dynamic routing

pavkatarI have problem with the routing in ZF2. I want to make dynamic routing for the software, that I'm making. For example: This is the URL: http://localhost:8080/application/index.json/ And this is my module.config (router part): 'router' => array( 'routes' => array( 'home' => ...

2
Q: two select statements inside foreach

alli awwadthis is the first time it happens for me, i am sure i am forgetting something very simple, so please be bare with me. i have something like this // connection here $conn = mysqli_connect(/*connection is fine*/); $tables = array('table1','table2'); foreach($tables as $table) { $result = mysq...

0
Q: PHP understanding memory limit error

NoamI'm getting this error Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194304 bytes) How come he tried to allocate 4194304 (which is smaller than the limit he specifies 134217728) and is exhausted?

 
10:44 AM
0
Q: how to add input value to a php from two different html pages

user2804017hai there are some input values in two different html pages which I cannot merge, but I want to add these two value to a PHP, in which I can only add any one of the value could help me on this.

0
Q: how to make multiple columns

Jack MaessenI use this code for making an order form. How can i get with this code 2 or 3 columns for the order form? It should look something like this: http://www.jackmaessen.nl/test/vintage.php <?php $items = array( 'Cola' => '1.50', 'Fanta' => '1.50', 'Spa' => '1.50', 'Beer' => '2.00', 'Mineral wat...

0
Q: php function on page load

bigbobrI have 2 functions that makes menu links active/inactive: function disableCtrl() { echo 'style="background: #999999;" onclick="return false;"'; } function enableCtrl() { echo ' '; } I'm using them like this: <li><a href="#" <?php if (@$_POST['submit']){disableCtrl();} if (@$_GET['gues...

0
Q: Updating Multiple row in php to mysql?

user2774977Below is my code to update multiple rows to mysql database from php Everything works fine but all of a sudden it show "NO DATABASE SELECTED". And i am unable to see the any data on the page. Whats wrong in my code anyway?? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ww...

0
Q: Scheduling a task in Windows Server 2003 to open a URL in Internet Explorer

NishaI need to schedule a task to run a web page(php) daily to send facebook notification to users. I have tried using bat file, specifying arguments while creating task and vbscript. .bat files run fine manually but don't run via scheduled tasks. None of these have worked. Problem is that, they work...

-1
Q: Pdf - Get current position of signature field

FootnikoHow can I get the current position (x, y, page) of PDF signature field using pdftk tool or PHP?

-1
Q: How to do a site search in my particular websitte

Jarachanthan RatnakumarI know how to put Google or other search engines for the website.I want to know how to put a search engine that can search the details of my website.

-2
Q: Simple PHP for loop error

user2804049Just started learning. Here's what I have: <?php $i = 0; $num = $i * 12; for ($i=0; $i<13; $i++) { echo($i." times 12 = ".$num."<br>"); } ?> The outcome should be: 1 times 12 = 12 2 times 12 = 24 3 times 12 = 36 etc The outcome I actually get is: 1 times 12 = 0 2 times 12 =...

0
Q: Associative Array & XML

user2769621I have an XML in this format: <row typeID="5" volume="15" orders="6"/> <row typeID="5" volume="2" orders="2"/> <row typeID="6" volume="9" orders="5"/> <row typeID="6" volume="8" orders="2"/> <row typeID="1" volume="2" orders="2"/> <row typeID="2" volume="162" orders="13"/> I am using this: fo...

0
Q: Parsing only text content from url

KarimkhanI am trying to parse text content from url given. Here is the code: <?php $url = 'http://stackoverflow.com/questions/12097352/how-can-i-parse-dynamic-content-from-a-web-page'; $content = file_get_contents($url); echo $content; // This parse everything on the page, includ...

0
Q: how to do complete validation in one function in php?

ashuthinksworking on php project want to do validation at once only at all fields of registration form. fields name address mobile all above fields are mandatory so can i write only one function of validation function validateForm() { if (document.myForm.name.value == "") { alert("Please e...

0
Q: Putting another website along with Zend website

ex3m1024I am working with a website built (not by me) on Zend framework. I have made a small website (for a Facebook app) built on simple html with custom php (no Facebook API used), which, if put in public/ folder (so that it can be reached via *www.main_site.com/my_small_site*), does not work (I get ...

0
Q: how to separate the grade of the student

user2754833kindly help me, i'm on the making of online student information and it have many students and i don't know how to separate the grades of the student according to their StudID (student ID). My code goes like this... enter code here function Content() { $code = <<< htmlcode <center>...

0
Q: Update value from 0 to 1 in mysql table with checkbox

AdrianMYSQL Table structure Name Type Collation Attributes Null Default code varchar(2) utf8_unicode_ci No name varchar(255) utf8_unicode_ci No checkbox tinyint(1) Yes NULL ...

 
11:27 AM
0
Q: MYSQL use if statement to part of command

mahdi pishguyin this below mysql command i want to use IF into part of select and use for join with i.post_type value. if i.post_type value is 3 JOIN categories c ON c.id = i.category must be not working. this command have problem and i cant fix it SELECT SQL_CALC_FOUND_ROWS i.* , IF i.post_type...

0
Q: PHP catch and handle 500 error and resume

sashI have a piece if PHP code that fetches date from a couple rows from MYSQL database. Each row has some inputs which the code uses to perform some action. Now this piece of code has some networking function and so might fail sometimes or generate 500 error. Now this is what i need to do: 1) If a...

 
11:39 AM
1
Q: Remove tags with Simple HTML DOM parser

10minutephp code: $result = array(); $html = file_get_html('http://site.com'.$_POST['link'].''); $content = $html->find('#details'); foreach($content as $value) { $result['example'] = $value->outertext; } HTML (for parser): <div id="details"> <li>test</li> <tr> ...

1
Q: How to quickly SELECT 3 random records from a 30k MySQL table with a where filter by a single query?

jacouhWell, this is a very old question never gotten real solution. We want 3 random rows from a table with 30k env. records. The table is not so big in point of view MySQL, but if it represents products of a store, it's representative. The random selection is useful when one presents 3 random products...

0
Q: PHP remove conditional comments which cause DOMXPath fail

wervaconditional comments such as: <!--[if lt IE 7 ]><!--> <html lang="hi" class="ie ie6"> <!--<![endif]--> causes $doc->loadHTML($content); $xpath = new DOMXPath($doc); does not work properly. any prepared code to remove them?

0
Q: Escape special characters for fputcsv();

user1274113Is there an easy way to escape special characters, double quotes and multiple spaces for fputcsv()? In short with a lot of regex i get data from a PDF and i build my array. Inside the array there are no html tags with the exception of <br> tag. Now the problem is that i have to escape chars like ...

0
Q: Get location of view passed into laravel view composer

Tom JenkinsonIs it possible to get the location of a view that is passed into a Laravel view composer? View::composer('*', function($view) { // I want to find out the location of the view file here // e.g. master.something.header // then add this to an array $loadedViews = View::share("loadedView...

0
Q: Top List with three parts

Balkan LifestyleI have this cod for my TOP LIST $pos=0; $upit = mysql_query("SELECT * FROM wp_entries ORDER BY vote DESC"); while ($sms = mysql_fetch_array($upit)) { $pos++; $data = unserialize($sms['data']); echo " ".$pos." ".$data[1]['value']." ".$data[2]['value']." ".$sms[vote]." "; } data[1] is NAME ...

0
Q: Check if image can be loaded

MM PPI have a page with lots of images on it. My images are loaded from an external server. Usually this server it's loading tooooooooo slow, so my page stay loading until the external server starts running again. I want to put a blank image loaded from mine when the external server is down. Is there...

0
Q: logging when there is more than one server

user2804112I currently use text files to track errors or watch process in the system. I thinking to scale with Gearman and to have workers on separated machines. What is the way to logging when you have multiple servers , assuming I'm want to keep logging into text files and to have overall view of the proc...

0
Q: 403 not working after changing DirectoryIndex

Kid DiamondI disabled directory browsing in my .htaccess file, and recently I have changed my default index page, which works. But now when I browse to: domain.com/images/ it's suppose to give me a 403 forbidden error, but it just goes to the index page '/en/index.php' itself. #Turn rewrite engine on Rewri...

0
Q: Need for country/region-state/city database

freezerI looked for the subject and found some questions in SO or other sites but I couldn't reach my goal. I need a database with countries region-state and city database as in myip.ms but their price is very high for me I can't afford it. I need the countries with country codes and regions to group ...

-1
Q: File exists warning on live server

Rajesh KumarWarning: mkdir() [function.mkdir]: File exists in /home/content/xx/xxxxxxxx/html/xxxx/xxxx/action.php on line xx This warning is on live server. But in localhost there is no warning. I am trying : if(!file_exists($path)){ mkdir($path); }

0
Q: Provide IIS/PHP privileges to Windows Service Control Manager (SCM)

cartbeforehorseSo I'm calling a PHP function to access the status of a Windows 7 service as follows: win32_query_service_status($service_name); When running under a locally-installed WAMP instance, the function returns an array of information, as expected. When running under IIS, I get an error-status 5 ret...

0
Q: is there a way to curl login this site?

GuestofHonori'm trying to curl login to this site: http://downitfaster.com/ but i can't even say i'm close of doing it. my codes: $data = $this->curl("http://downitfaster.com/api/login.php","","textLogin=".$user."&textPassword=".$pass."&btnLogin=submit"); $data = $this->lib->curl("http://downitfaster.com/...

0
Q: want to know about php image uploader requested features

Umair ShahHoping you all will be fine...i just want to know that i have one php image uploader i want that image get auto resize to 393 x 248 after uploading and also the image got rounded corners after uploading these both functionality should be done automaticaly during uploading image and the resulted i...

0
Q: magento . after install onepage-checkout

user2804145i become a error after install onepage-checkout. Warning: include(/srv/www/vhosts/texxx.com/httpdocs/app/design/frontend/base/default/template/checkqoc/checkout/onepage/shipping_method/additional.phtml): failed to open stream: No such file or directory in /srv/www/vhosts/texxx.com/httpdocs/app/...

0
Q: Stucked with array and explode - spaces

Jogn SmitI have an application called mystique item where users has to guess the item that's behind the watermark. Water mark is revealing on time to time and everything is working perfect, but i have a "small" problem with guessing words. I have added words in arrays, separated with commas, and i'm explo...

-1
Q: Nothing happens on clicking login

MaxzeroedgeI was trying to create a login page, but it doesn't seem to work. When I click Login/Signup, a popup shows. I enter details and click login. Nothing happens. I try to signup, still nothing happens. My homepage <HTML> <HEAD> <TITLE>Experiment on Social Network</TITLE> <script src = "jscript.js"><...

posted on September 22, 2013 by user2086252

I am trying to run simple SQL to get result(s) from MySQL. I am kinda new to MySQLi. <?php $mysqli = new mysqli("localhost", "user", "password", "database"); if($mysqli->connect_errno > 0){ die('Unable to connect to database [' . $mysqli->connect_error . ']'); } $statment = $mysqli->prepare("SELECT name FROM media WHERE id = ?"); if($statment ==

0
Q: make an xmlhttprequest wait tell i get a response from the handler?

FareedHi I made an Ajax upload form and it can handle multiple files. I use XMLHttpRequest(); to send the request but what I'm really trying to do is to make the form send one file at a time (send the first file then wait to upload.php response then send the next file); I have been trying this but di...

0
Q: What exactly should constructor contain?

user2579512I'm building a scraper and currently my parsing class has about 100 lines constructor that fires about 10 methods contained in the class and some other 3rd party component code. All these methods primarely parse the raw html and assign the final values to class atttributes. Is constructor the r...

0
Q: Multiple ajax requests, only one inserting into the DB?

Michael Joseph AubryI have user based created rows. When you click "add new row" some content is cloned and appended. Each cloned content has its own textarea and each row gets a row key. <input type="hidden" name="rowkey" value="0"> I use jQuery to rewrite the rowkey value to match .each() row created. The end...

0
Q: How to setup phpMyAdmin Apache virtualhost configuration in a Apache with Nginx as a reverse proxy setup?

LaserI'm having an unbelievable hard time setting up phpmyadmin manually on my Apache with Nginx reverse proxy server. I can't find a good and reliable tutorial anywhere which guides me through the setup step by step. Currently I try to start phpmyadmin from /etc/phpmyadmin with the help of a virtual...

0
Q: Defining polymorphic relationships in Laravel with models on custom namespaces

knifecake.comI have Eloquent models on custom namespaces. By that I mean that, for example, my Users model is in Admin\User. Each user has, either a Member or an Admin associated with it. These later models are on the same namespace as the user model: Admin\Member and Admin\Admin. I have defined the relation...

0
Q: Null return on grabbing a page with cURL

user2804170I'm a begginer with grabbing pages with cURL so bear with me. When I use cURL function to grab the page I get a null return. However, when I use var_dump($http_response_header, $result); I get NULL string(120809) " the html page ... " Here's the entire php script: <?php header("Content...

0
Q: How to use sortable data structure in redis

StackedHow to store and retrieve data-structure like this in redis in most efficient way. The record will be accessed by username value which will be unique and we need to sort data by date and counter values. Also, is redis the best choice for this scenario (performance takes precedence here over e...

0
Q: Login page again redirect to database initialization page in crawler-anywhere

user2804196I have installed crawl-anywhere from http://www.crawl-anywhere.com/installation-v400/. It's installed but localhost/crawler redirecting to only one page i.e dbinit.php for initialising database. After initializing database, it should redirect to login page(index.php). Does anyone know to solve t...

0
Q: Removing DocDocument warnigng while parsing page content

KarimkhanI am trying to parse the content of any url. Which should not content any html code. This works fine, but gives bunch of error while reading the content on url given. How to remove this warning? <?php $url= 'http://stackoverflow.com/questions/12097352/how-can-i-parse-dynamic-content-from-a-web-p...

0
Q: Laravel 4, complicated IF SQL selection

nullhope you can help. I'm working with Laravel 4, MySQL and of course PHP. Table: msg Fields: content, sender, reciever, sender_deleted, reciever_deleted. I'm trying to get the following converted to SQL: *Retrieve all where you are the sender, if sender_deleted == 0, and where you are the recei...

0
Q: Lithium select options from mysql data

ArunkoI have a mysql table "categories" with following columns: * id * name I retrieved the data using $categories = Categories.find('all'); Now, I want to create a <select> tag with options whose value is $category->id and title is $category->name using form helper. I have no idea how to do that...

 
1:03 PM
0
Q: How do I defer or async this WordPress javascript snippet to load lastly for faster page load times?

Jason WeberI have various javascripts that are necessary plugins in one of my WordPress domains, and I know where in the php file it's called from. I'm taking every measure I can take to speed up page loading times, and every speed tester on the web says to defer javascripts if possible. I have read about...

-1
Q: JSON pagination with PHP

Matthias MüllerI get JSON files which include this part of array: array(3) { ["ProductsSummary"]=> array(4) { ["Records"]=> int(90) ["TotalRecords"]=> int(2724) ["TotalPages"]=> int(31) ["CurrentPage"]=> int(1) } I can change the "CurrentPage" by myself. I need a paginat...

-1
Q: The number of $_SESSION creation in PHP

X10nDIs there a limit to a number of $_SESSION that can be created in PHP, will it create a memory fall, use of resources. I am looking to create about 10 sessions rather than sending it through $_GET.

0
Q: Headers already sent

Harsh BahuaWarning: Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/dist/search.php:126) in /Applications/XAMPP/xamppfiles/htdocs/dist/search.php on line 155 codes around 155 { $_SESSION['ERRMSG_ARR'] = array('No result found');; ...

0
Q: Notice: Undefined variable: mysqli - Can't import my database informations

user2447291I'm trying to create a php jquery chat. To recive new messages, i tried the jquery intervall. It works but if I try to connect to a mySQL DB, I allways get this error. It looks like the script can't get into the db-connect.php to declare $mysqli for my functions_chat.php: Notice: Undefined vari...

0
Q: How to run code inside String

Ludwik11I have string: '$a["m"]*$a["m"]' And I want to do, that $a["m"] turn to its value (for example 5) and my program do the operation (so it will be 5*5 so 25).

0
Q: How to automate function name in symfony routing?

dianujHere is the simple route defined in the custom bundle my_admin_route: pattern: /admin/{name} defaults: { _controller: NamespaceCustomBundle:CustomControl:login } Above routing code will call the CustomControlController's method loginAction() my question is how can i automate the func...

0
Q: I've this form data to be sent to insert into database.

SamI can insert all fields in database except email field. I get the following error "Undefined index: em in C:\wamp\www\ins_db.php on line 11" data type of email is below: address varchar(255) not null Form code: <form action = "ins_db.php" method = "post"> <div class="reg"><br> <br>All fields ...

0
Q: How to refactor this if else statement to function

user1292810I have code as following: $arr1 = array(); $arr2 = array(); // [...] some code $field_name = 'foo'; if (isset($arr1[$field_name])) { $arr1[$field_name]++; } else { $arr1[$field_name] = 1; } $another_field_name = 'bar'; if (isset($arr2[$another_field_name])) { $arr2[$another_field_...

0
Q: How to fast up databases queries, when thousands of entries

user2779986For learning php and codeigniter, i've started to create test website... something like blog. ut that's not the point. I'm using codeigniter pagination to show all my blog's posts. but... it's starting to slow down when my database table (posts) has over 14k entries.... And I don't need answer li...

-3
Q: Any good books for creating secure websites in php,mysql,html,ajax,apache?

munishI wanted to know if any good books are there for creating secure websites in php and that may explain source code errors and vulnerabilities,optimization etc. Currently i am going through Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition A Step-by-Step Guide to Creating Dynamic Websites by ...

-2
Q: which the polymorphism in design pattern is the best for memcache to performance?

avalkab i want to make a advanced memcache but there are some problems. e.g performance, multiple proccess (like 4xRam similar cloud tech.), i wonder about this. anyone idea or example on this work?

-3
Q: My PHP script is not writing results to MySQL, throws no error

demtHere is my code, it throws no errors, it gives me the posts that match the if statements, prints when I do a var_dump, so I know there is data, but the table in my database remains empty: <?php date_default_timezone_set('Europe/Amsterdam'); include_once( '../src/facebook.php'); $fb = new Fac...

0
Q: jquery.ajax() POST receives empty response but get is working on Nginx/PHP-FPM but works on Apache

user2804219i have use simple jquery ajax method calling in nginx when i use tye:"GET" it is working fine but it is not working when i use type:"POST" My Jquery Ajax Function $.ajax({ type: "POST", url: "/sendmessage.php", data: {'userId':'11','text':'hai'}, dataType: "json", success:func...

0
Q: Java equivalent of php pack('H*', str)

MariuszI need to perform the following operations in Java: $hexString = '90aa';#sample value $bkey = pack('H*',$hexString); $someString='qwe';#sample value $checksum = md5($someString+$bkey); echo $checksum; I can't convert hexString to bkey in Java to get the same result as php script. Except bkey ...

-1
Q: Saving a form with?

AviAtionI'm trying to save a form, but not all fields are saved? $theme = new Theme(); $form = new CForm('application.views.site.form',$theme); if ($form->submitted('Theme')) { $theme->slug = 'test'; $theme->attributes = $form['Theme']; if ($theme->val...

0
Q: How do I tell mock to call the original method under certain circumstances?

ashy_32bitI have a class that would want to mock later in a test: class Original { function calculate($a) { ... } } in test: $mock = $this->getMock('Original',['calculate']); $mock->expcets($this->any()) ->will($this->returnValueMap([ [1,'ABC'], [2,'BCD'] // somehow tell $mock...

0
Q: MySQL doesn't update with not empty variables

Łukasz Wróblewskican you tell me, why this code isnt working? $tytul=$_POST['tytul']; $id=$_GET['id']; $cena=$_POST['cena']; $skrot=$_POST['krotka']; $opis=$_POST['dluga']; $stan_magazynowy=$_POST['stan_magazynowy']; $galeria=$_POST['galeria']; $liczba=$_POST['liczba']; $data ...

0
Q: How get value from URL

Vaja AxobadzeI want to get value from URL to choose data from database by ID I want value for id for example if I open www.expmple.com/index.php?id=12 get value witch it id=12 in datebase if I open www.expmple.com/index.php?id=7 get value witch id is 2 in datebase and so on I have same code ` $results...

0
Q: preg_replace to remove IE comment

wervaThis is my string: aaa <!--[if (gt IE 9)|!(IE)]><!--> <html lang=\"en\"> <!--<![endif]--> bbb and this it what I want: aaa <html lang=\"en\"> bbb and this is what I get: aaa bbb what is wrong here? <?php $content="aaa <!--[if (gt IE 9)|!(IE)]><!--> <html lang=\"en\"> <!--<![endif]-->...

0
Q: Basic Hidden field in yii

marchemikeI'm trying to place data in hidden text in yii, but I don't know how. I need a similar code to a regular php syntax: <input type="hidden" name="field_name" value="a"/> It's supposed to be a field with static value of a. I just need it to go with my $_POST variables for error checking. Is it ...

0
Q: i want to design a php form in which four field there ie name, roll, subject and picture

user2803744i want to make a form in which four field there ie name, roll, subject and picture. name and roll must be string and numbers if not then give red box input field and save picture in a folder and also thier is two button, one is submit and other is showlist. when i click on submit button, the data...

0
Q: PHP PDO load image into MS SQL Server 2012

teach meI'm trying to upload image into SQL Server using PDO with the same code as I do it into MySQL with no success. I thought it will be simple as in MySQL but Microsoft makes sure I'll suffer. the error I'm receiving is: SQLSTATE[IMSSP]: An error occurred translating string for input param 3 to UCS...

0
Q: What to use for a lightweight json API, for Angularjs

NeophyteI have a small site I've created in angular js, which currently uses static json files, which I now want to migrate to a mysql database, to make maintaining the data easier. I now need to create a fast, lightweight API service which angular can call. The tables are relatively small, 1000 records...

0
Q: Loop a foreach json loop in another foreach json loop

user2320607I'm at a 24 hour hackathon trying to solve this so, excuse if it's a little rushed. 1st for each loop works fine, I'm getting a list of categories from this url https://dev.xola.com/api/categories I grab the list with this $fullurl = "https://dev.xola.com/api/categories"; $string .= file_ge...

0
Q: Getting dates from a database table that fall within the current week

Frank KluytWhat I'm trying to do is get some activities from an activity calendar that fall within the current week to create a widget that shows activities for the current week. Now how could I do such a thing with PHP/MySQL? Each database row has a date field. This is the structure of the db table I'm wo...

0
Q: PDOExceotion in Task Scheduler

user2766321I have made a php script which writes .txt with some info (so my website doesn't have to run a mysql query every time someone refreshes the page) and on the top of the file I wrote "include 'db.php'" db.php: Line 5: $db = new PDO($connectionString, $user, $pass); Line 6: $db->setAttribute(PDO::...

0
Q: Selection of the second newest file

AjtakGood day. I need advice on how to choose PHP over the second file according to the latest data creation and dump it? Nowhere on the Internet, I found it. It's somehow? And how?

0
Q: Xupload yii extension maxNumberOfFiles

NEWBIEHello guys I am trying to tweak the xupload ext's functionality what I am trying to do is to render the user all of their uploaded images so even if they refresh the page after they upload an image it will still be rendered on the #modal-gallery table..I know how to use CActiveRecord The question...

0
Q: How to get access to Google Spreadsheet data without any dialogue pages?

momijigariI'm currently making a web app that has to read data from a Google SpreadSheet api. I'm using the latest Spreadsheet API, and OAuth2.0 to authenticate. But... When I try to get access-token for the first time browser, of course, sends me to thegoogle page where I have to manually click on the "...

1
Q: Which way is the better to resize Image?

NecromancerWhich way is the better to resize Image? Right now I am Using thumbnail class, Its working fine but it is reducing the quality of image way too much. I want profile image in form of thumbs of size = 32 x 32. The code I am using right now is: $cimg = $_FILES["image_src"]["name"]; move_upload...

0
Q: Use third party class into codeigniter

Warre BuysseI'm trying to use the "SimpleImage.php" library to easily upload files. I've put the SimpleImage.php file into libraries and tried to load it in the following way: $this->load->library('simpleimage'); This gives me a server-error like so: http://d.pr/i/kT7W When i try to include the simpleima...

0
Q: PHP if(){} does not echoes vars got from html

user2361662All I need is: 1. After pressing 'submit' button to get vars to function and use return value. 2. To understand why I can not echo functions return value; PHP FUNCTION: function check_if_numbers($x, $y) { $permission =0; if((gettype($x)==gettype($y))&&(gettype($x)=="integer...

-4
Q: Web layout and church website

Egberinde BolawaI am working on a website, and I have knowledge in php, javascript, and as well html, but as a student I want to develop my self by taking on some problems, but my question is: how can I design a layout like this website http://mountararatchurch.com/ And if you notice the upcoming events section...

0
Q: MySql Error. Help Me

user2804320Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1' at line 1. Why do i have this problem? Can anyone help me? This's the code: <?php $name=$_POST['name']; $pass=$_POST['pass']; $mail=$_POST['mail']; #m...

0
Q: populate location on Google maps using Jquery

mynameisbutti have a latitude and longitude of particular user in db .. i am getting the values by using jquery .. here is what i am doing var auto_refresh = setInterval( function () { $.get('http://localhost/Location/locate', function(data){ $('.latitude').html(dat...

0
Q: How would I get the value from a dynamic $_POST variable name?

user1899891Basically, I have a website that dynamically creates submit buttons. Ex: then and so on.... How would I find out which button was pressed (test1, test2, test3, etc)? I know you can create multiple forms instead with a hidden value but I would rather just have 1 giant form with multiple submit...

0
Q: Any Bootstrap 3 Frameworks for WordPress?

Rohit SmithAre there any WordPress theme frameworks based on the Twitter's Bootstrap 3? There are a few Bootstrap 2.1 based WordPress frameworks. But, I am looking for something that uses BS 3. Thank You.

0
Q: mySQL table heavy usage

tony9099I will be using mySQL with PHP as a serverside / Database model for my mobile application on both iOS and Android. There will be loads of syncing with the client side, at a rate we assume could reach 100,000 requests to the server per second. where each one is trying to write or read from the se...

0
Q: Implementing Interface and Autoloading Classes

Dor ZuberiI have a issue, i have the following interface (http://pastebin.com/c11xbdxh) and i have the following class which implements the interface above (http://pastebin.com/m1zGNfSm). I am using the following autoload function in order to load the classes dynamically: function autoloadClass($classNam...

0
Q: Wordpress or Zend Framework for a personal website?

marknt15I wanted to create a personal website(portfolios, blog, gallery) and I'm thinking if I'll create it using wordpress or use a PHP framework (zend framework). I wanted to learn both wordpress and ZF. What do you think should I choose? Am I going to enjoy using wordpress or ZF? I listed the pros an...

0
Q: Converting Json String into PHP array then using php array

GeezaIm new to json & php and I'm having some issues with json into php string My json string looks like this {"status":"OK","cards": [{"id":100001,"name":"batman","image":11111,"size":75,"region_id":1,"locked":false,"status":"active","created_at":"2013-08-15T11:37:07Z"}, {"id":100002,"name":"superm...

0
Q: How to hide a field on a form with jQuery

CTully12So I am working on hiding a input field, which I later plan to have dynamically loaded with the other form fields. I have created a small module to assist in this process. /** * Implements hook_form_alter(). */ function editorhide_form_alter(&$form,$form_id){ //form id = artist_node_form //tit...

1
Q: Does HipHop for PHP support intl (Unicode) extension?

Desmond HumeI'm considering moving my code on HipHop for PHP, but can't find an answer for the question whether or not HipHop supports intl extension, which is required for my code to process Unicode text. Also, where can I find a list of HipHop's limitations in general?

1
Q: Making Ideone API work on Codeigniter (ajax, javascript,soapclient)

user2800050This is my first time to use Codeigniter. So sorry if my question is noob. I got codes from this site: Working with IDE One API (Full project code is here) and now, I am trying to use it in codeigniter. I was able to make it work up to the javascript part below (since it was able to check if 'so...

 
2:40 PM
0
Q: Should I use AJAX? Dynamic option boxes

rosscooperdesignI want two boxes to be part of a form. The first will contain a list of manufacturers and the second a list of models. I want the second box to dynamically change its options based on the manufacturer selected in the first box. For example if "Ford" is selected the model box only shows models...

0
Q: how to post values from multiple dynamicdropdrown list in php

user2804362Is it possible to post values from Multiple dynamicdropdown list in the same page.I use Ajax code to get values from the first dropdownlist, and this is used to create next dropdownlist in the same page ,But the problem i can't get the values from the dynamicallycreated dropdownlists.Anyone kn...

1
Q: Rendering HTML within classes

SamHere's the scenario; Within the admin section of a website I have quite a few CRUD tables, which needs success/info/error messages to be displayed when an action has been performed such as a record being deleted. I'm sure everyone is familiar with this. This usually involves the messages being w...

0
Q: stuck with session variables

Tom36I am using PHP and MySQL. I am trying to create a database to store 'complaints'. I currently have the form to complete and this is then saved to a database and I can retrieve the data from the database which is then populated back into the form fields as read-only. This is all fine. What I am...

0
Q: Disable Random Name Generator

Federal09I have this code for copy file: <?php /* * Remote File Copy PHP Script 1.0 * * Copyright 2012, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ $upload_dir = getcwd()."/files"; $url = !empty($_REQUEST["url"]) && preg_...

0
Q: Facebook Login Error: Given URL is not permitted by the application configuration

user2721465I've run into a problem when trying to have my app log into Facebook using: if (!$user) { $loginUrl = $facebook->getLoginUrl(array( 'scope' => $scope, 'redirect_uri' => $app_url, )); print('<script>top.location.href=\'' . $loginUrl . '\'</script>'); } ...

0
Q: Output not displaying all rows

user2792990Having an issue with the output of records from a query run to display records.... It only shows the first row as the code specifies and then the next results all in.. paragraphs? I don't know if it has something to do <?php include 'core/init.php'; include 'includes/overall/header.php'; ?> <div...

0
Q: PHP foreach with session

SultenhestI'm trying to show all pictures from a users facebook login on my site. If do this ($_SESSION['Photos']['data']['0']['source']) in php it puts out the latest tagged image link. If it you replace the 0 with a 1, it's the second latest tagged. How do i make an foreach array where it adds '1' to th...

0
Q: Redirect Wordpress homepage to newest Article

user2804436I am trying to redirect my wordpress homepage to the newest article automatically. At the moment I use a redirect suggested by Spencer Cameron function redirect_homepage() { if( ! is_home() && ! is_front_page() ) return; wp_redirect( 'http://homepage.com/article1', 301 ); ...

0
Q: CodeIgniter Rest Server with Backbone, DELETE and PUT requests return 404

Ido567I'm using backbone and CodeIgniter Rest Server, The post and get requests from backbone works fine But the put and delete requester gets 404 error with the response of {"status":false,"error":"Unknown method."} My code class Interview extends REST_Controller { function __construct(){ pare...

0
Q: Chrome Origin null is not allowed by Access-Control-Allow-Origin

CanvasI have ready many of the other posts ppl have asked here about the origin not allowed blablabla, Now I have tried to add --Access-Control-Allow-Origin and enable apps and even disabled security but every time I try my button on the php page it just keeps stating Origin null is not allowed by Ac...

0
Q: Linking 2 tables to display readable statistics

SwalyAlright lets get at it. I have 2 tables, one is for storing the options that can be selected and another is for storing how many people selected the option. So table 1: id, option_name, description Table 2: id, chosen_by_who basically if "John" chooses "Cat" (which has id: 3 in table 1) my sc...

1
Q: How do you setup a user system for a website using Heroku Postgres?

deepI want to create a user login sytem for my website, only problem is, I'm clueless as to how to do it, extensive googleing revealed Heroku Postgres, which allows you to create and manage databases. I have the following code: $dbconn = pg_connect("host=ec2-107-21-120-102.compute-1.amazonaws.com p...

0
Q: Added if else argument and lost variable from database

Steven<?php $con=mysqli_connect("localhost","root","","clarks"); // Check connection if (mysqli_connect_errno($con)) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $place = $_GET['place']; $place2 = $_GET['place2']; $return = $_GET['return']; $people = $_GET['people']; $picku...

0
Q: Making query with multiple join's

user2779986I'm now learning php and codeigniter and now I want to combine query to be fast and effective. I have made all, but haven't joined the last table... I have 4 tables: posts, users, post_categories, categories; And what I want to get: All posts User info using usr_id Get all categories id f...

0
Q: Magento: Using different footers for different page layouts

user2689138I've tried various tutorials but I can't get this to work. Basically, I want to have a different footer on my homepage. I've setup two page layouts and have applied them to the cms pages fine. So in the homepage layout I refer to... <?php echo $this->getChildHtml('footer_home') ?> And on al...

0
Q: Way of recalculating keys after using array_unique in PHP

UltraI remove dupliactes from array (list #1) with array_uniqe but how to recalculate kyes of it's output (list #2) to [0-x] (list #3): list #1: array (size=24) 0 => string '2013-09-18' (length=10) 1 => string '2013-09-18' (length=10) 2 => string '2013-09-18' (length=1...

0
Q: Get top N elements, but if N+1 is equal to N, return the N+1 as well

user1292810I have associative array as follows: array( [random_key_1] => 30, [random_key_2] => 27, [random_key_3] => 25, [random_key_4] => 25, [random_key_5] => 25, [random_key_6] => 22, ); The array is already sorted and I don't know key names. I would like to get top 3 elements....

0
Q: Pagination of JSON output API

Matthias MüllerFrom an API, via the URL I get a JSON output which I decode into an array that contains: array(3) { ["ProductsSummary"]=> array(4) { ["Records"]=> int(90) ["TotalRecords"]=> int(2724) ["TotalPages"]=> int(31) ["CurrentPage"]=> int(1) } So CurrentPage can b...

0
Q: ajax, how to change two divs using one ajax request?

Angga Movichow to change 2 divs using one ajax request ? ajax-update.php <?php include("config.inc.php"); include("user.inc.php"); $id = $_GET['id']; $item = New item($id); $result = $item->iteminfo; echo $result->name."<br />"; unset($item); ?> html: <tr> <td> (one) </td> <td><input type="text" val...

0
Q: Facebook PHP API Notify Friends

Jms BndI am trying to allow members on my site to have a message posted on their wall saying "User has just joined www.example.com" I have read the facebook information page but I am still confused as to which option to use Publish, Feed or Share Dialog? Hope someone can clarify. Thanks

0
Q: jquery progress bar with mysql

user2043077I have 3 jquery progress bars set up to represent values from a mysql database. When the page loads it runs a php script and gets the most recent values and then puts them into the jquery progress bar value. I would now like to dynamically update these without having to refresh the entire page. ...

0
Q: how could i accelerate ajax speed

user2624687here is an ajax call $(document).ready(function(e) { var ab=$("#a"); function a(){ $.ajax({type:"GET",url:"t.php"}).done(function(r){ ab.append(r); }); } }); here is the t.php file <?php echo "asdfdsafsdfsdfasdfsdfsdafasdf<br>"; ?> althought the code is so simple...

-2
Q: How to display Instagram Profile Picture with their API

Billy RammalI've been trying and researching this for a while now, to no avail. All I want is a simple method (without using someone else's messy API) to request a user's profile picture. I have the authentication and everything setup, I just don't understand how to call other information. The documentatio...

-3
Q: Please how can i hide user pages

PaxPlease how can i hide user pages . I'm quite new. I not want display as http://www.domainname.com/folder/tarifhotel.php?id=43&tn=hotel&v=0 but display as http://www.domainname.com/folder/ Thank U

0
Q: Load template and replace placeholder with specific information BUT with PHP code inside the template?

hookieV2I dind't found any solution for my problem. Well, I wanna start a bigger project and that's why I need to program a CMS. In this case I wrote a template with HTML and CSS. That's not very dynamic. For a better structure I wrote only {Placeholders} and no specific information in this template. Wel...

0
Q: Undefined values In Phpmyadmin SQL database

Kevin DesaiI am using the Jquery plugin colorbox to display a Create User form. On clicking submit button, it displays a message account created! (On entering legal values) But the values of fname and lname (First name and last name) in the database are undefined. While the username and password values are...

0
Q: Returns Mysql SQL results in JSON format

Koi FishI am trying to implement Typeahead.js to my site. The typeahead.js will take from a remote page that would return JSON, something like: http://example.org/search?q=%QUERY For my site, this is what I've wrote for the PHP: $q=mysql_real_escape_string($_GET['q']); $getship= @mysql_query('SELECT ...

0
Q: Passing values from a div containing list from another page

AjitHi I am trying to pass values using 'post' from three drop down lists to the database using php script where I insert values into the database with values of the three lists previously I retrieved a list from another page into a div time.php using jquery ajax call code for which looks like thi...

0
Q: Custom WP form which changes user role on submit

TomBasically I have a page which displays to a user only when they're logged in, it has a custom contact form on it. When the form is submitted, their user role should automatically change to "Author". I literally have no idea where to start with this, if anyone has any ideas or can help me out a ...

1
Q: PHP phar CLI application, how (not to) modify the existing project skeleton?

gremoProject skeleton where console.php is the main entry point (php app/console mycommand) and config.yml stores the app configuration. Logs is app/logs folder: +app | + logs | | | + console.php | | | + config.yml | +src | +vendor | +.gitignore In console.php I'm loading the configuration fil...

4
Q: meaning of the letter "~" in regex

An Nguyễn Lê Tháiwhat is the meaning of the "~" in regex .For example in this code preg_match("~^(\(\d+\)|\d+\-)?\d{10,20}$~",$value) this code check for wether the phone number contains extension or not. I have tried to remove to the "~" in this code and got an error like this: Warning: preg_match() [func...

0
Q: How to minimize url php and htaccess

Faytraneozteri want to minimize url from http://stackoverflow.com/user.php?username=blabla into http://stackoverflow.com/user/blabla i read article this name is clean url and without htaccess can make it perfect anyone can help me.. thanks for help

0
Q: How can I properly combine this simple javascript into this tiny php snippet?

Jason WeberI have a snippet of code in a php (WordPress) page: function vp_contact_popup_add_to_header() { // Register the style like this for a plugin: wp_register_style( 'videopopup', plugins_url( '/code/css/videopopup.css', __FILE__ ), array(), '20120208', 'all' ); // Register the script like this f...

0
Q: PHP get hash after question mark

user2796274How i can get a hash or any text from URL after the question mark. For example "http://mediafire.com/?lmle92c5l50uuy5" I want to get the hash "lmle92c5l50uuy5"

0
Q: Group by and Order by mysql than show the latest post

Sibel Sarıkayaafter searching i can find a answer. this is my problem This is what i tried to do but not showing the newest posts in results $result = mysql_query("SELECT * FROM berichten where ontvanger = '$session->username' GROUP BY fromm ORDER BY date DESC"); while($row = mysql_fetch_array($result)) {...

0
Q: PHP mysql returns syntax error

user2802646This is the error returned: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',3000)' at line 1 Here is php file: <?php $doc_root=getcwd(); include "$doc_root/includes/conn...

0
Q: Where to put copy image code in my code?

craigi am using this code: copy('imgurl', 'images/covers/file.jpeg'); To copy an image url to a file on my website. This work when i have just the above code in a php page by itself but i cant get it to work when i put it into my actual code. So here is what i am using: try { $db = new PDO($dsn...

0
Q: CahePHP adding async to script tag

sємsємIn Google's PageSpeed reports that there are some Blocking Javascript required to be async. From this article I knew that I have to place async attribute to my scripts tag: <script async src="http://third-party.com/resource.js"></script> In cakePHP, I don't able to achieve this exactly, I just...

0
Q: Separate PHP log by date

invisalI have the following configuration in my php.ini log_errors = On error_log = /logs/php_errors.log However, I want to know whether it is possible to have different log file per date. For example: error20130920.log error20130921.log error20130922.log I have a few workaround in mind, but I w...

0
Q: Insert Multiple Selection from Dropdown into one Row

JamesI am trying to take multiple selections from a drop down, and insert them into a single column/row in a table. So that it would look like this (ColumnB): ColumnA | ColumnB | ColumnC --------------------------- Stuff | A, B, C | Stuff This is the dropdown: echo "<select NAME='SysName_1' SIZ...

0
Q: how to speed up ajax or mysql_connect

user2624687here is an ajax call $(document).ready(function(e) { var ab=$("#a"); function a(){ $.ajax({type:"GET",url:"t.php"}).done(function(r){ ab.append(r); a(); }); }a(); }); here is the t.php file <?php $z=mysql_connect("localhost","root","") or die("fuck"); $z2=mysql_sel...

0
Q: Regex select everything between two characters without including them

DonI've been trying to look around for how to select everything between two characters in a string. Example string: @ Some text here @ To select this I did: /@(.*)@/ But it includes the @ signs I tried to use different methods I found online with no success.

-4
Q: Get and Play Video Stream

Moein SI want to write a php code that each 3 second, read 3 second of a video stream (e.g. from youtube) and then play it and repeats this until end of video. That is play video from my host. I wonder how I can do that. please give me some advice or at least some keywords to search about this. Thank you,

0
Q: Visual Basic and AES Initialization Vektor

user2804533I have a problem with the AES encryption in Visual basic. This PHP-code does what I want, but the visual basic code I tried to write always fails with an message about an wrong initialization vector. <?php function decrypt($data) { $value = ""; $value = base64_decode($data); $ivlength = 8; $iv =...

0
Q: extremely large xml file to mysql

shubhi1910I have a 17gb xml file. I want to store it in MySQL. I tried it using xmlparser in php but it says maximum execution time of 30 seconds exceeded and inserts only a few rows. I even tried in python using element tree but it is taking lot of memory gives memory error in a laptop of 2 GB ram. Please...

0
Q: session variable not being stored from dropdown menu in php

Daryl BartkunskyI have looked up many different ways of storing session variables and cant seem to find why my session variable is not being stored from my dropdown menu. here is my code for campaign_select.php which then goes to store_select.php upon the push of the submit button. <?php session_start (...

0
Q: LIMIT in mysql subquery

Morten HaghI have a problem with a MySQL statement. I have this: SELECT ad.*, (SELECT img.image FROM '.$this->config->db_prefix.'_images AS img WHERE img.aid = ad.aid LIMIT 1) AS img FROM '.$this->config->db_prefix.'_adverts ad WHERE fid = :fid ORDER BY cr_date DESC Which works fine, but I need to get a...

0
Q: PHP code turns file not result to HTML via jQuery

CanvasI am some simple jQuery code $.get( 'PHP/reverse.php', { input: text }, function( data ) { $('#feedback').text( data ); }); And here is the PHP code <?php if(isset($_GET['input'])) { $string = $_GET['input']; echo strrev($string); } ?> Now when I click my button on...

-1
Q: Button in side a Form

Kalle Svensson<form action='login.php' method='post'> <center> Username : <input type='text' name='username'> Password : <input type='password' name='pass'> <input type='submit' value='Login'></center> </form> <a href="reg.php"STYLE="text-decoration: none"><input type='submit' value='Registration'></a> ...

0
Q: PHP: How to update/extend an multidimensional Array recursive and on-the-fly?

Mr. BombasticI've a multidimensional array and would like to update/add some values, recursive. I'd like to avoid building a new array, if possible. But I've two main problems: How to update the values "on-the-fly"? It should be possible with the &-operator. How to get values to extend the array if the func...

0
Q: Phpmyadmin - table alteration

CsaltI am working with PHP and MySQL in phpmyadmin. I have created a table with some fields and then inserted data on this table. Later on I decide to alter the table. I have change the field TIME from datetime to timestamp and set it as default value current_timestamp. After that I couldn't insert d...

1
Q: Get value from xml using xpath

alli awwadI have word document converted to xml file, this is a part of this file: <w:tc> <w:tcPr> <w:tcW w:w="2130" w:type="dxa"/> </w:tcPr> <w:p w:rsidR="00255D05" w:rsidRPr="00FF409F" w:rsidRDefault="00255D05" w:rsidP="00D041E7"> <w:pPr> <w:rPr> <...

0
Q: PHP AES Encrypt

Flolecan someone please help me writing the "opposite" code of this PHP code. The exactly thing I want to do is to encrypt data, so these function can decrypt it. <?php function decrypt($data) { $value = ""; $value = base64_decode($data); $ivlength = 8; $iv = substr($value,0, $ivlength); $value = sub...

0
Q: Laravel validation does not work, always fails

SteveI am trying to make back-end validation for my form however it does not work. It always shows that validation failed even when I submitted the values. Code $validation = Validator::make(Input::all(), array( array('email' => 'required'), array('password' => 'required') )); if ($validation-

-1
Q: Validating unix time after 60 days in php

user2784854I am making like user cannot change the record after 60 days from the date of value inserted. So, when the user enter date is unix time stamp. I want to know, is it ok to use the unix time format or there is some problem in it. Below the code I am using in php is it ok ?? Inserting date which...

-2
Q: PHP: How to dynamically add a class to <body> tag?

netizen0911How do I go about appending a class (using PHP or Javascript) to the BODY tag dynamically based on the TITLE tag or file name of which page is loaded? Thanks in advanced!

-1
Q: Why mail goes to spam(PHP mail function)

PontingI am using very simple mail php script. <?php $to = "recipient@example.com"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; if (mail($to, $subject, $body)) { echo("<p>Email successfully sent!</p>"); } else { echo("<p>Email delivery failed…</p>"); } ?> But here problem is that I...

0
Q: Call to a member function main() on a non-object

SLimthe following is the index.blade.php of laravel app. <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-GB" xmlns="http://www.w3.org/1999/xhtml"> <?php global $wp_rewrite; define('WP_USE_TH...

0
Q: scope of variables en php

user2797662I am building an image gallery using php. The code I am using is like: function ImageBlock(){ $dir='img-gallery'; $images=scandir($dir); $classN=1; foreach($images as $image){ if($image!='.' && $image !='..'){ echo '<img class="image'.$classN.'" src="img-gallery/...

0
Q: Addthis difficulties on wordpress site

TechPatrolOk, I have a couple of questions regarding my wordpress (self-hosted) site... 1) The googleplus button does not appear for Addthis Smart Layers. The following code is in my header, and you'll notice on my page only 4 buttons are shown - the Google one is missing. It shows up at the top right o...

-2
Q: How can I take a variable from a script and echo in php?

Andree OchoaSo I wanna take a variable from a script and echo the result in php, I know I can do document.write(url[i]) but I needed to use the variable on other stuff so i needed in php, code is as follows: //Stat script***** var url=new Array() url[0]='www.mcpato.com' url[1]='www.turul.com' url[2]='www.m...

1
Q: Yii Booster popover over text rather than button

gooseYii booster documentation shows how to make a popover over a button. I want to create one over an anchor element rather than a button. Essentially I want to combine the popover with Yii's tooltip. Does anyone know how to do this?

0
Q: Transform this function completely to jQuery

user2765449I need this function as jQuery. There is a part jQuery but I am finding a tough time to write the code! function showUser(str) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xm...

0
Q: PHP Unset sql query

charliei have a php page called automate.php where i include multiple php files - for example: customer_reminders_1.php customer_reminders_2.php customer_reminders_3.php each one has the same queries in but searching from different fields in a table. i have a feeling, that if there are valid rows fr...

0
Q: Silex ActiveRecord models loading

rodwebI'm trying to use PHP ActiveRecord with Silex, but something strange is happening with models autoloading: // index.php <?php require_once __DIR__.'/../vendor/autoload.php'; $app = new Silex\Application(); ActiveRecord\Config::initialize(function ($cfg) { $cfg->set_model_directory(__DIR__.'/...

0
Q: Adding items to a cart - OO PHP via ajax

TheVirusI'm making a shopping cart in PHP and I've ran into a roadblock when trying to add items to the cart. <a href="#" id="addToCart" data-cart="<?php echo $_GET['id']; ?>" class="btn btn-success">Add to Cart</a> jQuery recognizes that line by #addToCart which triggers the ajax event to add the va...

0
Q: Parsing Complex XML Document

user2804604I have a RRS XML File that contains the following info: <rss version="2.0"> <channel> <title>Lottery Jackpots</title> <link> http://feeds.lottoelite.com/rss.php?lang=en&account=CDubYaa&site=1&type=7&lid=2 </link> <description>Lottery Jackpots provided by LottoElite.com<

0
Q: PHP Long polling chat system slow with only ten instances

lawlsI just wrote a long polling chat system using PHP and AJAX. With only ten instances of my chat running it became very slow to send messages. Using jQuery and AJAX I make a request to the server, and when it returns I instantly make a new request. The request returns when it finds a new message or...

0
Q: Sending emails from header

Sam FisherI have a commercial system that will send emails to customers "from" the agent who added them. When new agent is added, agent@domain.com is automatically created. So I want my email to be from CompanyName - Agent mail. This is how I tried to handle this: $headers = "From:".$companyname." ".$Age...

0
Q: Accessing MySql Database from PHP file on local host

AMRI am attempting to do a simple connect and SELECT on a LAMP server. I have made this php code work when connecting to a remote sql database but I cant get it to work with a local database. <?php //I also tried replacing the IP with localhost $db = mysql_connect('192.168.1.69','UserIc...

0
Q: Browserstack.com webtunnel not working

AmareKnightI'm using Browserstack.com local test and it seems not working for me. I installed lampp on my Ubuntu 12.04 and configured httpd-vhosts.conf and /etc/hosts like below: httpd-vhosts.conf: <VirtualHost *:80> DocumentRoot "/home/ME/FOLDER" ServerName dev </VirtualHost> /etc/hosts: 127...

0
Q: Avatars not appearing in WordPress Theme

user1636968I've edited the avatar settings under 'Discussion' in my Dashboard from Mystery Man to MonsterID, and I noticed it made no difference. The 'Mystery Man' image is still there even though I changed it. I found out that what is keeping it there is some code in my functions.php file: <div class="ava"

0
Q: How to load Georgia font to Dompdf

renathyI do not understand how to change font in Dompdf. I have the following stylesheet: font-family: Georgia,Serif, "Times New Roman"; I need Georgia font on the PDF. I have found Gerogia fonts in Dompdf website and put them into /dompdf/lib/fonts folder (there are Georgia.afm, Georgia_Bold.afm, Geo...

0
Q: PHP loading pre-saved form

Drizzt Do UrdenI have a php page with a form in it. The main idea here is to have a list of picture that you can select with a checkbox. Client will select the picture he want and submit the form. I want the information of this form to be save in a file.(a .txt file would do it. I don't want a single table in...

0
Q: Jooma 3.1 Templating - Tutorials/Documentation?

Att1cAI am to develop a Joomla 3.1 Template. The template should consist of a static header and footer, as well as multiple pages, all of which need their own styling. Further, the client would like to be able to add 'events' to a specific listings page. Customers should be able to book said events via...

0
Q: Get all value of an array and set to a variable

user1735856I have an array: $groups = BP_Groups_Member::get_group_ids( $user_id ); echo "<pre>"; var_dump($groups); echo "</pre>"; with gives the following result: array(2) { ["groups"]=> array(2) { [0]=> string(1) "6" [1]=> string(1) "5" } ["total"]=> int(2) } How can I get the str...

0
Q: Error in displaying an image in php mysql

user2758453Hey I am facing a problem in displaying images in php. The images are being stored in a table 'images' in mysql. There is another table 'restaurant' which needs to fetch those images and display respective images according to the restid. However, it is facing a problem in fetching the images and ...

0
Q: Ajax Jquery variable with php

user2043077Is there any way I can use json and jquery to retrieve a variable and use it? Ie what I want to do is use jquery to call a php script, query mysql and then return this variable to use on my original page. ie $( "#result" ).load( "query.php"); and then be able to echo this result on my callin...

0
Q: Change text in dynamically created textbox

Ela BuwaI have a bunch of textboxes that are created dynamically one per click. They all have the same name "discount[]", same id "discount" and have the same class "tinput". Is there anyway that I can use to change the text in all of these textboxes with javascript or jquery? I have another bunch of t...

0
Q: How do I make Facebook like-detection work on my website?

PhilI have built a simple webpage in PHP. I want to tell if users like my page (I placed a like button on it). It is not a Facebook app. I have seen this, but don't know how to use it with PHP. I don't know JavaScript at all. I tried pasting the code listed at the link into my page, but it didn'...

0
Q: PHP Error in SQL syntax MYSQLi

Brent FrenchMy SQL Query looks completely fine but I keep getting the same error message. What i want to do is a simple search it will look inside the data table which holds xml for a match. The error Fatal error: Problem preparing query (SELECT * FROM propertie_ids WHERE data LIKE '%test%' ) You have ...

0
Q: php ssh2 output stream per line

Santu RoyI am very new in ssh2 with php i need your help. I need to echo php ssh2 output stream line by line if($ssh = ssh2_connect('127.0.0.1', 22)) { if(ssh2_auth_password($ssh, 'root', 'password')) { $stream = ssh2_exec($ssh, 'ifconfig'); stream_set_blocking($stream, true);...

0
Q: Retrieve Value with insert PDO

Pedro TeixeiraI'm working on a page where the user can add rows with fields of a form, dynamic, depending on the model this page http://www.linhadecomando.com/scripts/input-dinamico/ I'm having problem RECOVER FROM values ​​of the second row inserted as the first I can get quietly. Check my code: <?php // ex...

0
Q: What am I doing wrong with preg_replace?

estXcrewI have fought with this for multiple days now. Im trying to get my preg_replaces working. I'm getting the data to use the preg-replace on from a database and binding them to variables. $post_preview is one of them. <?php $body_sub = substr($post_preview, 0) . "<br><br><a href='post.php?id=$...

0
Q: Wordpress Custom Avatar URL is relative to Gravatar URL, not WordPress install URL

Oliver BennsUsing the code from the WordPress Codex: <?php add_filter( 'avatar_defaults', 'new_default_avatar' ); function new_default_avatar ( $avatar_defaults ) { //Set the URL where the image file for your avatar is located $new_avatar_url = get_bloginfo( 'template_directory' ) . '/asset...

0
Q: net beans xdebug waiting for connection error?

arslani have done almost every thing to resolve this issue. . .but message waiting for connection is still there. . . . . is there any way to debug this issue. i am using xampp server. OS windows [XDebug] zend_extension = "C:\Users\arslan\Desktop\xampp-win32-1.8.1-VC9\xampp\php\ext\php_xdebug-2.2.3-5....

posted on September 22, 2013 by Sam

The below code works fine. $pwd = $_POST['password']; $encr= sha1($pwd); if(isset($_POST)) { $query = "INSERT INTO seeker(sid,fname,lname,contact,email,dob,gender,address,religion,experience,qualification,created,password) VALUES ('$_POST[id]','$_POST[fname]','$_POST[lname]','$_POST[contact]','$_POST[em]','$_POST[dob]','$_POST[gender]','$_POST[address]','$_POST[reli

0
Q: Update multiple rows in PDO - 1 Column change

user2579395Im trying Update multiple rows in PDO. My table scripts contains columns id, style and link, as follows: id style link 1 Normalize http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css 2 Bootstap http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/boo...

0
Q: set charset when saving files with php

slevinI created a simple code for uploading pictures to a folder, with PHP. On the server side I have <?php header('Content-Type: text/plain; charset=utf-8'); //check if file is actually an image etc. //if is an image, send it to "upload" folder move_uploaded_file($_FILES["file"]["tmp_n...

0
Q: Mysql query creating duplicates and if i use group by values are truncating

user2715615Here is my query which is causing duplicates, there are some tables which are having multiple values with same id like awards,genre,soundmix,gallery_to_images. For removing this duplicates i used group by only one row is coming and my data is truncated eg: from 2 images one image is coming. What ...

0
Q: I want to downgrade my php version to 5.2 (or around)

user2327456In my archives I have an old version of Drupal (Drupal 6.14, 2009-09-16) I want to be able to reconstitute the website on my local machine (computer) My problem: I want to downgrade my php version to 5.2.. (or around) cause my Drupal files does not work with php 5.4... Now I have installed on my...

0
Q: Getting the selected value from a drop down box placed in a div

AjitI am trying to pass the value selected from a drop down box placed inside a div to a php script which then inserts it into the database. I was told that to access input element from a div use . ("#divname").text(); I fiddled around and found out that this is just the string of all optio...

0
Q: why I can't show arabic language on HTML

medo ampirI have a website and this is the meta in the head tag <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> but all arabic text shows like in the picture.. but when I change the browser unicode to arabic it shows correctly, but I have to to it every refresh so it is not a so...

0
Q: XAMPP PHP file works but no result?

CanvasI have installed XAMPP to run PHP files on my computer, here is my PHP file I am attempting to execute <?php if(isset($_GET['input'])) { $string = $_GET['input']; echo strrev($string); } ?> Here is my basic HTML file <html land="en"> <head> <meta carset="utf-8"> <link rel="st...

0
Q: array is not inserting into the database

PHP_USER1<form action="4.php" method="POST"> <select name="select2[]" multiple> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="opel">Opel</option> <option value="audi">Audi</option> </select> <select name="select[]" multiple> <option value="volvo1">Volvo1<...

0
Q: String modification in php

KimomaruI would like to know how to change a string pattern into something else. I'm setting up a small forum and would like to embed youtube video whenever someone enters the link into the textarea part of the forum. Youtube video links look like this; https://www.youtube.com/watch?v=examplevideo B...

0
Q: Adding record to table PHP/MySQL

Ds.109So this should be a very simple add to table PHP/MySQL - however for some reason I can't get to work. I have tried playing with the quotes placement, connections, etc. However I think I need some help. Thanks <?php //Variables from Form $Fs = "$_POST[Fs]"; $Ls = "$_POST[Ls]"; $T = "$...

0
Q: How to associate an inbound call sid with custom ID?

BabikerHow to associate an inbound call sid with custom ID? Currently Twilio posts or gets its parameters to the configured voice URL, but one can't send custom parameters to twilio to callback with it's parameters. Example scanario: Caller calls in to authenticated to be connected to a different number...

0
Q: Using CSV file outputted with headers

RCNeilI have a PHP function that outputs a CSV file by sending headers. Can I take this file and use it if I have my PHP function set up this way? For example, I want to attach it to an email once the entire file is generated, but is this possible? Below is the function - $fp = fopen('php://output'...

0
Q: Social engine error : exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (externals)' in Standard.php:242

RocstarI use social engine 4.5 and I can not install modules. When I do an installation I have this error message in the log file : 2013-09-22T01:28:02+00:00 CRIT (2): exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (externals)' in /var/www/vhosts/mysite/htt...

0
Q: Do not run the script javascript

10minuteThere is a PHP-handler, which replaces the HTML element when parsing: foreach($html->find('.hidewrap') as $value) { $value->outertext = '<div class="spoiler-wrapper"> <div class="spoiler folded"><span>'.$value->children(0)->plaintext.'</span></div> <div class="spoiler-text">'...

0
Q: PayPal SetExpressCheckout missing redirecturl

user2229979When I call SetExpressCheckout I get this response PayPal Response Untill today, in this response was a REDIRECTURL for redirecting to PayPal site. Please explain where is that redirecturl.

0
Q: JavaScript SyntaxError in php print

ProDrazI'm getting this error in java console: "SyntaxError: unterminated regular expression literal" I really don't understand it. Below is my code, if someone could point out what am I missing I would be forever gratefull. PHP Code: print ' <script type="text/javascript"> function fakeUpload() { ...

0
Q: YII. Redirect from https to http

sanatikI'm trying to use one of API's, so they send the response like https://domain.com/controller/action But that page returns 500 error. I've tried use this class HttpFilter extends CFilter { protected function preFilter( $filterChain ) { if ( Yii::app()->getRequest()->isSecureConnectio...

0
Q: Similar values in php array

user2352548i have an array which store some values. I'm trying to detect the similar values and add them to new array. example: $arrayA INCLUDES ( 1,4,5,6,4,2,1) ---- $newarray(4,1) Any help?

0
Q: Mysql - insert or update and get old value

user1496486I have table SomeTable with 3 columns A, B, C and a unique on A and B From client side I am passing some values to insert or update C if A,B already exist. I want to know if the server has done update or insert for each value and if it is an update I want the old value of C.... I am currently d...

0
Q: Phalcon and url not found

vuz3I downloaded invo-master, and the main page is loaded but links doesn't work and i don't know why.. I added this line to httpd.conf <VirtualHost *:80> ServerName phalcon DocumentRoot /var/www/html/invo-master/public <Directory /var/www/html/inv-master/public> ...

0
Q: PHP GD and Special Characters

mauriblintI created an script to generate images from text. I'm using a TTF Font, "Bebas Neue" and i have a problem with special characters. For example: In html this text is fine ♥ In the image this text is not fine, the heart view as a rectangule or another wrong symbol ♥ The same problem ocurred w...

0
Q: Get multiple values from table

user2804770I have a table customers | id | firstname | | 1 | paul | | 2 | steve | | 3 | chris | second table called list_customer | id | id_customer | id_list | | 1 | 1 | 1 | | 2 | 1 | 2 | | 3 | 2 | 1 | Each customer can be in x ...

0
Q: Broken links error in footer html

Savanmy website is : Career Tracker my problem is I got 2 broken link in my website i cant solve this my website is build in word press broken link in footer : sitemap I used broken link checker website : http://www.brokenlinkcheck.com/ Please tell me where is problem in my sitemap link ?

0
Q: jquery load vs ajax for form post submission

ToddIf all I want to do is submit a form to a PHP processor with POST data and get the result, is there any reason to use the ajax method over the jQuery load method? Using Ajax requires a bunch of code versus something very simple on one line in jQuery like this: $("#myDIV").load("myProcessor.php"...

0
Q: Different view route in CakePHP

Lambda DuskI can somehow change the generated and accepted routes for simple urls, in the routes.php: Router::connect('/login', array('controller' => 'users', 'action' => 'login')); Router::connect('/logout', array('controller' => 'users', 'action' => 'logout')); Router::connect('/register', array('control...

0
Q: How can I create <select> optgroups in html using data from mysql?

Slava BasatSO I have about 60 fields of data queried from a database. They look like this in page source: <option>Genesis</option> <option>Exodus</option> <option>Leviticus</option> For example I wanna have it so that 1-20 are a certain optgroup and then 2-60 is another. Could I do it using m...

0
Q: Format number to not have decimals

Kevin HarrisonLets say the variable $number holds a decimal like 16.66677666777 How would I make it echo $number and just say 16 rather than 16.66677666777?

0
Q: Make a variable behave like a function

Giulio MuscarelloI'm making a PHP script which works with polynomials and monomials (an example of monomial is 42xk^2c^3d). The Monomial class is defined as follows: class Monomial { public $coefficient; // i.e. 42 public $letters; // an array of Letter objects public $literal; // i.e. xk^2c^...

0
Q: Creating a function to retrieve information from SQL

Lior ElenbyI've searched the site for an answer but couldn't find any answer for my specific problem that worked. I have two files, the first one is my index.php of-course, the second is my functions.php file, which obviously contains the functions, I made this function: function sql_get($lang, $tabler, $r...

0
Q: how to get an multidimensional menu out of my database?

aperoI want to need to make a menu where i don't know how deep the menu will be. this is how my database table looks like: table menu fields id, parent_id, name i already tryed this to get a nice array back, but it dont work: public function get() { $nodeList = array(); $tree = array();...

0
Q: Google Chrome thinks my site is phishing

PhilI built a simple PHP website. Google says it's a phishing site. What things could I have in my PHP code that makes Google Chrome think my website is a phishing site, and how do I fix this problem? I collect the user's IP address to prevent multiple votes on a voting system I have. Could this ...

0
Q: URL::asset() with php artisan command gives me localhost links

grenaI try to send some emails with a CLI command with php artisan of Laravel, something easy like : php artisan invitation:send recipient@mail.com This command is calling a UserController method which contains : Mail::send('emails.beta.invitation', $data, function($message) use ($address) { ...

0
Q: how to change my web site's elements style dynamicly

naazaninin index.php file i first check if $_SESSION['user'] is set it would not show the login form and if not, the login form should be shown. hear is my login form sty <style> #login_form{visibility:hidden;} </style> and my php script is: <?php if(isset($_SESSION['user'])) dont show the login form...

0
Q: PHP: Match corresponding file names

JacquesThis one may be a bit of a doozy. I have 2 sets of files in separate folders: SET 1: celeb1.png celeb2.png celeb3.png celeb4.png celeb5.png etc The user selects an image (radio) and I then set this as a get variable on the url: Now, I want to match another file. In another folder, I have...

0
Q: CoralDraw(.cdr) file decoding online

kirti avaiyaI am going to develop website like pixlr.cm or vistaprint.com , I have problem in devlopng while working with coral draw files, I want to make and option to import coral draw files and allow editing on that files, but problem arise when i am going to use that filesbecause coral draw files are not...

0
Q: PHP Result on ftp_up success

BeaterSry for asking so much [ 3rd in 2 days ] this time I want to make it so when ftp_put uploads a file it wont show the result each time it uploads , like "Success Success" but I want it to say only when it finishes to upload all the files. My current code: foreach (glob("black/*") as $filename) ...

1
Q: strange PDO behaviour

RichardAfter some houers I have to post this question even if the answer maybe obvious to someone else. The problem is that I want to test for the tokens, but even when I hardcode this, I still get INVALID. And I know it has to be right, because I tested it in PHPADMIN directly. What's odd is that it a...

0
Q: Conversion Personal Account to a Facebook Page: which token use to upload photo on that page?

Daniele Merolathis is my situation: I converted my personal account in a Facebook page (https://www.facebook.com/nextdoorhelp). Now when I logged in FB as the same account I have only a page adminstration panel for that page (that I call pageX). I created an app for my website http://nextdoorhelp.it/ndh to al...

0
Q: php correctly convert between encodings

WaldermortI've just spent the last 3 hours tracking down a display problem on one of my pages. The text was a garbled mess. The problem turned out to be the use of utf8_encode on an existing utf8 string. As noted in the docs it can only convert ISO-8859-1. Why does it have such a misleading name? /rant. W...

0
Q: Wordpress: Sideways8 Simple Taxonomy Images plugin usage

user2755267i need help for displaying term images in posts. to print terms of genere from custom post type movie i am using below code <span class="mgenre"><?php echo get_the_term_list( $post->ID, 'movie-genre', '', ', ', '' ); ?></span> <span class="mcom"></span> movie-genere is Taxonomy term.all genere...

0
Q: SMTP server php error

Badreddine BaimI'm trying to test sending emails from my website, I'm working on Localhost I used the function MAIL by this way $to = 'el.badr@live.fr' ; $subject = ' Sharing QG ' ; $message = ' Testing '; $headers = 'From : badreddinebaim@gmail.com'; echo '<form method="POST"> <input typ...

0
Q: Changing webhost to localhost causes errors - prestashop 1.5

FaceOfJockI have a website developed using prestashop and hosted online,and i want to trasfer it and deploy it in localhost , i put the files in htdocs/xxxx folder , i deleted smarty cache , i changed URL of store and my store still not work , after enabling debug mode , i got this error: Strict Standards...

0
Q: Won't echo a rounded number

Kevin HarrisonFor some reason my code only works when lastpage is equal to 3. If its equal to 2 it will give an image like this http://gyazo.com/7a590068ec0e4a6ba4da586c60f36658 if it is = 3 it will give the correct way like this http://gyazo.com/7188af3281d0964e085b86d8449e80c6 This is the code! <?php $res...

0
Q: "could not find driver" error when using PDO with MSSQL server

Jay BhattThis question has been asked many times and I've gone through all of them and none of the solutions have worked for me. Basically, I am getting "could not find driver" exception when connecting to MSSQL server using PDO. Below is my spec: Windows 8 - 64 Bit version MSSQL server 2008 R2 - 64 b...

0
Q: Calling a Jquery function from a php file

user2800614Hello everyone I am having problems trying to activate a Jquery function from a PHP. The following is my own testing version as there is a lot of code involved in my normal PHP file, I decided to take it into a smaller file for testing purposes. The following is the index.php file ... <!...

0
Q: Nginx + php-fpm on Amazon Linux = exited on signal 11

indapublicAmazon Linux lastest PHP 5.4.19 (cli) (built: Sep 3 2013 23:19:23) nginx version: nginx/1.2.9 installed PHP-FPM: PHP 5.4.19 (fpm-fcgi) (built: Sep 3 2013 23:22:01) phpinfo() is working pma.nginx.conf: server { listen 80; server_name pma.my.server; root /usr/share/phpmyadmin; index index...

0
Q: Parsing json_decode output

imukcedupIm a little stuck on parsing json output. I am working blind with json and have tried some tutorials but cant seem to find what im looking for. I am trying to use a service providers API which is doing the functions correctly. I am then getting the correct feedback from the provider in json form...

0
Q: Creating exe file of php-mysql applications using cmd and xammp

user2629583I would like to know how to create an exe file of a web application which is built using Php,Html,Javascript,Mysql.I have heard about a procedure that uses command prompt and xampp but i don't know the detail of it.So if anyone can answer my query I would be really thankful.One more thing I don't...

0
Q: Search SQL table for names?

rn10950I am writing a search engine for my site. In the users table there is first and last. I would like to find either a first or last name that matches the string in $search. I would like to output links with the results. I am not asking for you to write any code just put me in the right direction. I...

-3
Q: upload video from my website to my vk.com account bypassing user authorization

Zeeshan Anjumi want to upload video to my vk.com account. Every video that uploaded to my website from any user of my site uploaded to vk.com. i know how to use api but with vk.com api the problem is that it redirect to user authrization which i didn't want. i have tried to google it. but useless. so plz giv...

-1
Q: Order by and group by mysql not working

Sibel Sarıkayaoke this is wat i want Database id | fromm | ontvanger | date | msg | gelezen 1 | kees | marc | time_stamp | 0 1 | hans | marc | time_stamp | 1 3 | kees | marc | time_stamp | 0 5 | selma | marc | time_stamp | 1 6 | kees | marc | time_stamp | 0 7 | kees ...

0
Q: Using PHP to change site and content using URL info

Juicy RootsI'm new to PHP. I've tried to piece this together through a few different solutions I've found on stackoverflow, but I would love it if someone would help me put the whole thing together (especially using best practices, etc.). Or, just give me some advice. Assume I have one domain name, 2 sub-d...

0
Q: Execute php script with cron job

RonburgundyI have a file on my web serve called update.php. In this update.php I have two functions which run when the page is called / loaded. This page and these functions exist solely for the periodic execution by a cron job. So far I have been calling update.php with a cron job, which then executes t...

0
Q: php mkdir sets wrong owner

user68621I am using the mkdir() to make a new directory, which works. But when I try to upload files(images) to the dir, it gives me the following error: Warning: imagegif() [function.imagegif]: SAFE MODE Restriction in effect. The script whose uid is 878043 is not allowed to access (dir)/gallerie...

0
Q: input 2 numbers from web and pass them to shell script

user2803837I have a need to get two numbers one between 1 and 24 the other between 1 and 59 to then be passed jnto a shell script ie ./script.sh $1 $2 Now how do I go about doing this either in html or php thanks in advance

0
Q: jQuery Autofill textbox with information from another autofill

Corey StadnykI am having an issue with jQuery autocomplete. Basically I have a search bar, and when you type in what you're looking for the jQuery code I have calls a php script which does a MySQL query and returns everything I need and fills in the text boxes accordingly. What I then want to do is take the v...

0
Q: Bug with HTML5 in IE

Noah CagleIE isn't able to read HTML5 very well, but I don't think this should happen. Anyway, that was in IE, and I don't know how to make that not happen. I want to fix this with HTML code, not have everyone switch to Google Chrome. Here is a link to the website if you want to see for your self. http:/...

0
Q: PHP show page which doesn't exist

carambaI'am trying to set up a simple CMS and actually everything works. Except of this one point where I've got no idea how to solve it. There is the page index.html and a .htaccess with the content AddType application/x-httpd-php .html .htm Now this works good, I don't know if it is a good soluti...

0
Q: mysql_result() is not working

Lior Elenbyi have a table named "index", with 2 rows in it: title and text the code is: <?php $con = mysql_connect("localhost", "elenbyin_vadim", "passr422"); if (!$con) { die('Could not connect: ' . mysql_error()); } $db_selected = mysql_select_db("elenbyin_vadim", $con); $sql = "SELECT * from i...

0
Q: run php function, display the response, and start another php function

user2804916Run php script, display the response, and start another php script and then display it I have two functions in php I would like to display the response of the first function in order to make loading less long Exemple Pseudo-code Function hello1() { echo 'hello1'; [...] } Show response ...

0
Q: Element inside div not submitting

AjitWhy this code doesn't work? I have <script> //script to retrieve a list from a page and place it inside a div. </script> //This is the list on the otherpage. <select name='timing' id='timing'> Some Options </select> The div in which it is placed <html> <body>...

0
Q: AES Communication between PHP and VB.net

FloleI can't get the communication between these two scripts working. If I try to encrypt an string with th vb decrypt function and to decrypt it with the php function, it only outputs nonsense(TTtr@Iݞ1³Zyx3t:[Ãað²-ؘbŒ¸ˆîn¹zðnØ&Ž) Here is the PHP Code: <?php function fnEncrypt($sValue, $sSecretKey...

 
7:41 PM
0
Q: Get number with javascript

Zac PowellI have a Javascript Bookmarlet, in which I want to grab a price that might be displayed on the current page. So for example on shopping sites it could grab the price of an item the user is currently looking at. I figured one way would be to grab all the text on the page, perhaps with something l...

0
Q: Laravel yield public folder

SLimIs it possible to yield the blade template of files under public folder? While i got a file lively generate there and need to be called while the application running. So far don't see any example online.

-1
Q: xampp not working on windows 7, it gives me a 404 error

user2426691localhost/xampp returns Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

0
Q: SoundCloud Api - unable to get all the favorites of a certain user

Ahmad El BatanouniI'm trying to get all the favorites of a certain user. I used /users/{id}/favorites, but the returned list always has the last 50 favorited tracks, and I couldn't find a "next_href" or anything to get the rest. Is there anyway to get the whole list? or it's just me who made something wrong and i...

0
Q: MySQL insert number of repeated word to column

user57750I have a table with repeated words and an empty field named by "num". +----+--------------+-----+ | id | words | num | +----+--------------+-----+ | 1 | red | | +----+--------------+-----+ | 2 | blue | | +----+--------------+-----+ | 3 | red | | +-...

0
Q: Parse Freebase RDF data-dump with EasyRDF

Django JohnsonI found a library that can parse RDF in PHP, it is called EasyRDF: http://www.easyrdf.org/ How can I use it to iterate through each of the entities in the Freebase RDF?y And then print the type that the entity is?

0
Q: most accepted methods to validate an entity in silex framework

MuatikI want to validate an entity but do not know the best place to do this. I put validation code in the setter method. What if I choose Symfony\Component\Validator for validation, how can I access the validator service? As far as I know, this means there is a dependency to the service. $app['valid...

0
Q: PHP - ID generator//not working on linux

user2757860I have made an "ID generator" for a website known as xat now this fully works on any up to date windows machine. But I do not understand why when I run it on a linux Debian server I get: (I am new to linux machines. I did some research but till don't understand it :L my code is very long. Its <

0
Q: mPDF to create avery 8160 mailing labels

user2226714I am using mPDF, as it is built into the program. Is there a code for php, html, and css to create Avery 8160 mailing labels. I have a database table with client addresses that will populate in the labels. I have tried using [Print Avery using CSS and HTML][1] with foreach statement using class ....

0
Q: is it good to use ajax for communication between client and server

hangmanmangnahI have done a website by using html, css and jquery. I have databases and handle with them by using php and mysql. I choose Ajax to communicate with php by using XMLHttpRequest. My question is that if my website has a high traffic such as 1000 people at a time, can my website crash? Thank you...

0
Q: Anyone who can solve my MySQL insert table error?

Maarten SchermerCREATE TABLE IF NOT EXISTS 'wp_gom_my_project' ( 'my_project_id' int NOT NULL auto_increment, 'my_project_name' text NOT NULL , 'user_id' int NOT NULL , 'my_project_description' text NOT NULL , 'my_project_deadline' datetime NOT NULL , PRIMARY KEY (`my_project_id`) ) ENGINE=MyISAM DEFAULT CHARS...

0
Q: log in mechanism not working as I want (PHP issue)

user2598619I have built a registration/log in mechanism based on a tutorial I saw but things are not quite working as I hoped for. When I log in I am re-directed back to the login.php no matter what. I should add that I am trying to adapt a powerful tutorial to a much less powerful system and that I am NOT ...

-4
Q: Make value increase over time. PHP

Larry RatleyI had a question when making a stock system for my site. What it will do is basically allow users to buy stocks, and they will go up gradually overtime. I don't want them to decrease value either, only go up. Like every hour by .3-.5 Can anyone help me create that type of system? $investment =...

2
Q: How to make an optgroup after certain amount of lines in html <select>

Slava BasatFor example I want lines 1-20 to have one optgroup and then lines 20-35 to have another and so on. Currently I have <select> <?php $i=1; while($option = $query->fetch_object()){ if($i%5==1) echo "<optgroup label='5 lines'>"; echo "<option value='$i'>".$option->Name."<

0
Q: Codeigniter active record query cached - look for old table name instead of new one

DexaI have project with 3 application's sharing one codeigniter installation. It was working excellent until I changed name of mysql table, and changed query to reflect new changes to the database. Now it looks like my insert query is cached, and trying to insert value into old table (which doesn't e...

0
Q: safari redirects to logged in page after logout

asish rauto<?php include "config.php"; session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>

posted on September 22, 2013 by Daniel Morgan

This is my code, what I'm basically trying to achieve is to show all posts made by a user on the screen which is fine, so the first select statement is working and allows me to display it on screen... But the second select statement when I try to use it to get the user who made the post's name it gives me the error in the title. I know why it's doing it, I was just

-4
Q: Web programming software with real time rendering

user2805021I'm starting web programming and I would love to get one, not to hard to handle, if possible I'd also like that it has auto completion... Thanks in advance

 
8:29 PM
0
Q: How to prevent POST through socket in PHP?

user2805013Is there a way to prevent POST to URL through sockets in PHP? I knew all about http://en.wikipedia.org/wiki/CSRF but I don't want to put a hidden input with a unique hash on any form, I just want to prevent globally POST to any URL of my script from a remote host or any other client. I have a way...

0
Q: Joomla 2.5: Adding a custom image parameter to an article

JeffWI want to be able to add an image next to the title of an article (and be able to select the image for each article - not just a one and done setting). I modified the /administrator/components/com_content/models/forms/article.xml file by adding these fields at the top of the section: <field ...

-1
Q: Confirm message before deleted

user2804915I would like to have a confirm before deleting the file.My code without a confirm, which works like this <form action="delete.php" method="get"> <table> <?php foreach ($files as $file) { ?> <tr> <td><?php echo $fajl['file_name'];?></td> <td><a href="delete...

0
Q: Parse error: syntax error, unexpected '$page' (T_VARIABLE) in /home/parammt2/public_html/face/pagelist.php on line 1

user2805026It shows me everytime that error: Parse error: syntax error, unexpected '$page' (T_VARIABLE) in /home/parammt2/public_html/face/pagelist.php on line 1 here is the script http://pastebin.com/ZBSrz50q

0
Q: LAMP Server will not allow connections to either local or remote MySQL Server

AMRI posted another question that is similar to this but I believe this to be a separate issue. Accessing MySql Database from PHP file on local host While trying to execute the following line $db = mysql_connect('ipaddress','username','password!!') or die("Connection error"); On my local raspbe...

0
Q: Find alphabetically first value using PHP

Jeroen De DauwI am writing a sort function (using usort), and part of the operation I want to do there is determining which value comes first alphabetically. (This is only part of the operation, hence I'm not using natsort.) This means I have two strings for which I need to determine which is alphabetically fi...

0
Q: PHP PDO Keep Getting Error: Charset=UTF8 : An invalid keyword charset was specified in the dsn string

user2803295I keep getting this error : PHP PDO : Charset=UTF8 : An invalid keyword charset was specified in the dsn string. My code is like this function ConnectToSQLAndGetDBConnSTRVar() { try { $dbname = "irina"; $serverName = ".\SQLEXPRESS"; $username = "sa"; $pw = "523523a"; ...

0
Q: T_CONSTANT_ENCAPSED_STRING & sublime

PhilippeTrying sublime3 (unregistered demo) today and really liking the workflow much better then dreamweaver but keep getting T_CONSTANT_ENCAPSED_STRING errors on my production LAMP server, but not my local MAMP testing server (using Filezilla for SFTP to lamp server) I deleted everything in both of th...

0
Q: Upload multiple Images to a specific Wordpress-Post

user2805054i use this snippet in my single.php to upload images to the gallery of an existing post. this works fine for single images, but i'm looking for a way to upload multiple images instead of image after image after image.... this is the code i'm using <?php $post_id = $post->ID; if ( isset( $_POST[...

0
Q: Copy image code not working with ajax

craiglets say on a test page i have just the following: copy('http://media.fastcar.co.uk/wp-content/uploads/2012/12/Stanced-Mazda-MX5-Miata-10.jpg', 'images/covers/file5.jpeg'); If i load this page the image is copied and saved correctly. However, the input for the url is on a page where other dat...

0
Q: JavaScript set cookie via iFrame via CORS via PHP Allow Header

MKN Web SolutionsSo I thought this would be possible, but apparently not, so far at least: I've got domainX trying to send a secure cookie to domainY.com/page.php. So, on domainX, I init a iframe to domainY.com/page.php with the following headers: <?php $url = parse_url($_SERVER["HTTP_REFERER"]); $link...

0
Q: Get Class Name from Object inside Object

Mel KaI have 3 classes.. class 1 : <?php include "two.php"; include "three.php"; class One{ public function __construct(){ $two = new Two($this); $three = new Three($two); } } $api = new One; ?> class 2 : <?php class Two { public function __construct($obj){ //bl...

 

« first day (215 days earlier)      last day (95 days later) »