Home >

php

Advertisement
  • How to get 10 random rows from MySQL database and put it into an output variable? [on hold]March 15

    The code below selects rows from the DB random rows.I want to select 10 random rows and then in an output variable like the code below. First i want to select ten random rows then output them in something like the code above. My code: <?php DEFINE ('

  • Using a separate class in Symfony to handle a list of entities with controller injectionMarch 14

    In my Symfony (v2.7.9) project I have a set of entities which share some view functionality i.e being displayed in a table with some of their values as columns. Following the separation of concerns principle, I've made a ListTable class which handles

  • Better way for securing direct access to php filesMarch 14

    I don't know if this method uses a lot of time to process, or if it is bad but I wanted to know if there is any better way of actually doing this? I have a few class files that I want to stop users viewing through the browser, and only allowing them

  • Is there any limit of product can store in woocommerce?

    Is there any limit of product can store in woocommerce?February 25

    I have 330000 products in excel sheet and i am importing this into wordpress woocommerce. I had already imported 138245 using custom php script, but if i will import more 50 record the product table is crashed and shows blank page. see: thanks.

  • Trying to allow user to upload a profile pic to a mysql databaseFebruary 24

    I'm attempting to make a simple web app. I'm at the stage of creating the user profile section of it, and I'm stuck at allowing the user to upload their own profile picture. please see below for the query I'm using. $username = $_SESSION['username'];

  • php variable to url in address barFebruary 24

    I have the code echo(' <div class="row"> <div class="col-sm-2" > <form method="POST" action="plan.php"> <p>Selectati data raportului:<br> <select name="SelectDR" onchange=&

  • Are Robots.txt and metadata tags enough to stop search engines to index dynamic pages that are dependent of $_GET variables?February 23

    I created a php page that is only accessible by means of token/pass received through $_GET Therefore if you go to the following url you'll get a generic or blank page http://fakepage11.com/secret_page.php However if you used the link with the token i

  • Memcached problems on my Mac OSFebruary 23

    I just installed memcached on my Mac OS. It installed perfectly and when I type in memcached in Terminal I get this: failed to listen on TCP port 11211 tcp listen: Address already in use And I have a script in my localhost that contains this: $memcac

  • Display related data Yii 1February 22

    I have this in my model: public function relations() { return array( 'role' => array(self::BELONGS_TO, 'MedRoles', 'role_id'), ); } Also I have this in my controller: public function actionIndex() { $criteria = new CDbCriteria; $criteria->join = &qu

  • Strange thing with Google nocaptchaFebruary 22

    I have a strange problem with Google Captcha. I've tried all kinds of php codes from different tutorials, but the result is exactly the same every time... The problem is this: it shows up correctly if you check the box, it works correctly if you then

  • Modx plugin resource returnFebruary 18

    I need to return to user whole resource in his own template via plugin, which handles on OnPageNotFound event. It can be diifferent pages, depends on link. I will parse it and get resource needed. How can i do it?

  • Redirect to Specific Artile when user login Joomla 3.4.1February 18

    I want to redirect a specific user in a specific article in Joomla 3.4.* I tried in controller like this templates/html/com_login/controller.php public function login() { // Check for request forgeries. JSession::checkToken('request') or jexit(JText:

  • Crawl from another site (php)February 18

    I usally download from a gaming site some replays, but their filter sucks, because there are two versions of the game and both are mixed. I want only all the information for one game(newer version). Is it possible to crawl this page and get only the

  • PHP upload file on server not workingFebruary 18

    I made a webpage based on HTML,JS,CSS,PHP and MYSQL. When i open the site local on my Mac, everything seems fine. Now i tried uploading it to a webserver with the newest php version. The site is working except the uploading. Its a shoe shop, and i as

  • Can PHP modify apache's headers?February 18

    So my headers are appearing as they should when I open index.html, but when I open index.php I get a completely different set of headers. Specifically I am looking for Content-Encoding: gzip using mod_deflate, but only index.html is sending these hea

  • Error Unexpected token "operator" of value "%" in twigFebruary 18

    Im trying to do a simple for loop in twig: {{% for category in ['Action','Drama','Comedy','Anime','Adults','Science fiction'] %}} <p class="lead"><a href="">{{category}}</a></p> {{% endfor %}} but twig is giving

  • Execute php with onclick in d3February 18

    I am working with a d3 scatterplot that displays papers as dots on the graph. It is connected to a database with multiple tables. What I want to do is when I click on one of the dots on the graph I want the papers that it cites to appear on the graph

  • Translate a PHP curl to a bash cURL callFebruary 17

    I have this PHP code that makes a curl call: $postData['api_user'] = 'username'; $postData['api_key'] = 'password!'; $ch = curl_init('https://api.example.com/send.json'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_RETURNTRA

  • Reporting w/ Bing Ads API & PHP Client Library "Bad Request' ErrorFebruary 17

    I'm trying to pull a keyword report from my account using the PHP client library. I'm getting a bad request error and the report doesn't download. Below is the value of $e with my credentials replaced with generic names. This is version 9 of the Bing

  • Symfony: Form that embeds one object of Collection for OneToMany relationFebruary 17

    I using Symfony 2.8 with Doctrine. And I have some trouble with form. I think I understand how to create a form that embeds a single object or a collection of forms. But I want to create a form that embeds just one object of collection. Because the e

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 13 q. 1.190 s.