暴走的毛衣 · PHP 8 error: ...· 3 周前 · |
心软的夕阳 · PHP: shuffle - Manual· 3 周前 · |
考研的馒头 · zh-cn:编辑 ...· 1 周前 · |
阳光的甜瓜 · 怎么样在Centos上安装Linux+Ngi ...· 1 周前 · |
善良的牙膏 · 阿里巴巴最新组织架构大轮岗,融合仍然是主题 ...· 1 月前 · |
聪明伶俐的跑步鞋 · 速度与激情10详情介绍-速度与激情10在线观 ...· 3 月前 · |
活泼的红金鱼 · 地质灾害航空遥感技术应用现状及展望· 4 月前 · |
没有腹肌的香菇 · GPU加速04:将CUDA应用于金融领域,使 ...· 8 月前 · |
风流倜傥的大熊猫 · 代表建议京九高铁在六安设站 ...· 8 月前 · |
I need help for reg_ex in php... "jolly char" in string replace. This is what I have now: $String = str_replace('<audio type="soundcloud">[soundcloud url="https://api.soundcloud.com/tracks/', '<audio type="soundcloud">', $String); $String = str_replace(' params="color=ff6600&auto_play=false&sh...
How can I check for buddypress from a theme ? I've found this page for BP Plugin development but this action gets never loaded if I hook from theme. why it not works ? P.S. I need call some BP's functions from theme. like shows "BP's Activity Stream" on specific places.
I have made a query as follows: $user = JFactory::getUser(); $uid = $user->id; $db = JFactory::getDbo(); $query = $db->getQuery(true); $query = "SELECT a.id, a.menu_item_id, a.req_form FROM `team_form_lists` AS a LEFT JOIN #__comprofiler AS f ON f.cb_teamid = a.team_number WHERE f.user_id = ...
Using the isset is an additional function call, but nevertheless is the recommended practice. In the following particular example, what would be faster? I sense that the first would be faster. Otherwise, could somebody shed some light as to why the second would be faster -if so? if (@$_REQUE...
I am trying to make an automated function to make "Cards" on my website and for some reason It says I am not defining an array on line 18 even though it is defined on 3. Here is the error: Notice: Undefined variable: cardArray in E:\XAMPP\htdocs\Websites\website\pages\featured.php on line 18 ...
I've one interesting requirement. Within my search results in Drupal 7, I want the search results to be shown in categories. For e.g. If I search John Doe on Drupal 7 site, my search results page should show following results. Search Results for John Doe Arts Department 3 results found. The...
I would like to resize an image proportionally to 500px X 500px I found the below code from the net however the article didn't have an example of how to use the script, can someone just get me started on how to display the resized image? $filename = 'test.png'; list($width, $height, $type, $attr...
I am migrating from my old site to my new site. So half the content is on the old site and half is on the new site. The problem is I need both to be served on the same domain without anyone knowing which site it is served from. How do I do this? Here is what I am doing so far: http://mydomain....
I was working with php Booleans in a class when I noticed everytime I tried to make one I got an error here is a smaller version of my code class my_class public $hide_image == true; thats the part of my code thats failing, without that boolean it works fine, but nothing on the page w...
I've downloaded the Wamp 32bit ( http://www.wampserver.com/en/#wampserver-32-bits-php5-3 ) I've downloaded the XCache-3.1.0-php-5.3.27-nts-Win32-VC9-x86.zip file, but return this error: 'c:/wamp/bin/php/php5.3.4/ext/php_xcache.dll' - %1 is not a valid Win32 application.\r\n in Unknown on lin...
I've got two tables called 'members' and 'password_reset'. I've got a form where users are able to reset their password. When they fill in the form, a link with a token has been send to the user email. The tokens are stored in the 'password_reset' table and all the usersinfo in the table 'members...
I just received a source from my customer (it's written by PHP Generally), I try to read it and glance at database. I realize that it's very mess, some webpage's content is also saved in database. So, I want to find files are using by browser and I mean that php files, I want to edit them. Can I ...
I am using the following tool https://github.com/jmrware/LinkifyURL to detect urls in a text unit. Unfortunately, it only recognizes one url in the whole text. For example, if the text ought to be: (ignore the "-" in the urls, I had to do this to make my point) http-//www.guiageo-americas.co...
I have a shopping cart with a foreach() to update the quantities. <form method="post" > <?php while ($data2 = mysql_fetch_array( $data)) { ?> <td> <input name="quantity" type="text" class="form-field" size="3" value="<? echo $data2['quantity'];?>" /> <input type="hidden" nam...
I don't know anything about Morse codes.Could someone please tell me about Morse codes ? Please tell me about encoding & decoding these codes.I have tried the same question with Wikipedia,but the answer i received was not enough to make me understand what are these Morse codes.
Please help! I have been staring at this for too long. I have a property of an object that is an array of objects. I want to pass in an object to a method of the parent object and search through that array property for a match, and if one is found return the index. Otherwise, I need it to return ...
Hello I realise that a few have asked this question before me, but I can't seem to correct my php error having looked at their answers and corrections. This is the error I get when the page is refreshed on the internet - mysqli_query() expects parameter 1 to be mysqli, null given… Hope someone c...
I'm creating a php/sql login/registration user-profile based website. When you log-in to the website it does to the profile which displays your information in the appropriate places from the database. Problem: Currently the page is only a template unless you log-in, and then you can only view yo...
I am a DBA, not a web developer. I am trying to build a complex website with Joomla. The user page needs to be interactive without refresh. I am not sure I am using the right words, but here goes. Assume a user is logged in and a session is started - and we have that data along with the users...
I have done mvc web applications with asp.Now I am trying to do the same in php.For authorization process there are athorization attributes to be set above the Action in asp.Is there a similar technique for php? thank you
The website: Website You can see the problem i'm having on the website above, i have no idea why this happens. I've got PDO, PhP, httpd, php-mysql and so on and it still doesn't work. I've tried reinstalling the whole thing. I've followed countless tutorials on how to fix the usual "printing ou...
I'm currently programming in Symfony2 (following this tutorial: tutorial.symblog.co.uk, and when I execute a: php app/console doctrine:schema:create I get: [PDOException] SQLSTATE[HY000] [2002] Not a directory Here is my parameters.yml file: parameters: database_driver: pdo_mysql d...
How to modify the following array using array map. So far I couldn't achieve the wanted results so here is my question: Convert this: Array [Open+Sans:300,300italic,regular,italic,600,600italic,700,700italic,800,800italic] => Open Sans [Roboto:100,100italic,300,300italic,regular,itali...
I am using a PHP function to format any 2D PHP array to HTML table, In that table I need to add a delete button in each row, So when the user clicks the delete button jQuery should take particular fields ( 3 fields ) and submit in a php file and it should give the response without reloading the p...
Good day! I have set custom Permalinks for my Wordpress blogsite as www.domain.com/slug/%post_id%/%post_name%/. This structure only works for posts not published to under a minisite (custom post type.) I'd really like to use the Permalink structure so I may submit posts to Google News. This is...
I want to insert into a table where the table name is a variable. I can insert to the table just fine but when I try and make it a variable I get problems. I probably just don't know the syntax very well. Below is without the variable $query = $pdo->prepare('INSERT INTO test (item) VALUES (?)')...
if(strpos($search, "new york") !== FALSE){ //do something else if(strpos($search, "Los Angeles") !== FALSE){ //do something }...//keep going I have use strpos to filter user's input text. If user have enter the match city, it will do something However there are going to have a lots o...
I am trying to do the following: Rewrite the URL structure of my WordPress installation so that a language field is in there. E.g. http://www.mydomain.com/lang/ I want to then take the input from /lang/ and use it to display the appropriate content. E.g. if lang is 'en' I will take custom field...
We have a script that should function like so: Script inserts n rows into database inserting the same unique number into the batch column. Script puts a job on the AWS queue with the batch number. AWS worker does some processing and fires off another script on our server. Script on our server i...
I need to be able to have my main page (index.php) check every 10 seconds for a change in the mysql database table 'refresh'. If the 'refresh' value is 1 it needs to refresh the page in its entirety. If the value is zero it does nothing. I would use meta-refresh but I cannot have the page always ...
Using the following form to POST to the same page upon clicking submit: <form action="" method="post"><a class="buttonnohover"> Enter URL: </a><input type="text" name="term2" class="buttonnohover"/> <input type="submit" class="button" name="submit" value="Add URL" /> </form> Top of the code th...
First off, I have extensively researched this, and have been unable to successfully apply any of the answers I've found, at least in the way that I want. I think I'm close, but I may be way off... A similar question was asked here: Submit form in div with ajax, return php in div without refresh ...
I'm not sure if I'm doing anything incorrectly. But here is my code for connecting to php and it seemingly works. Then I try to connect to Wordpress, and it says "Error establishing a database connection". I've been working on this problem for WAY too long. I appreciate any ideas anyone has. ind...
I am trying to create a social network-like app. I want to try to set up a request system to create "friends". I dont know where to start in terms of the php code or the android code itself. Anyone willing to help me out?
I have directory structure on my production server as: public_html/www # www.digicreek.com public_html/educonnect # educonnect.digicreek.com public_html/.htaccess Locally my htaccess looks like this: RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %...
I have a reporting warehouse website and I would like to add a function to export a reports to an Excel file. I have been looking at the PHPExcel class to get his done but I am not sure how can I only export part of a page? I think there is a function in the PHPExcel class that will export the...
I am on a personal project of creating a web-based ide, or lets say, just a text-editor, and the app would allow users to register and start their own javascript project. The backend language that would write the files is php. Questions. How do I safely write user-input files into server, hav...
create a rule/ruleset that: Is triggered when a node is unpublished Then redirect the user to a substitute page. i tried importing this component ..... but it says import failed { "rules_node_is_unpublished" : { "LABEL" : "Node is unpublished", "PLUGIN" : "and", "REQUIRES" : [ "rules" ], "USE...
This may sound tricky at first, but take a look at this site Mess around with the browser window size for a little bit (I'm on Chrome and have not tried it with other browsers) and you will notice that my website takes up the entire page when the browser window is taking up only half of the mon...
The below inserts one variable just fine. But how do you do two? $query = $pdo->prepare("INSERT INTO `{$test}` (user_id) VALUES (?)"); $query->bindValue(1, $idv); I've tried $query = $pdo->prepare("INSERT INTO `{$test}` (user_id,another_id) VALUES (?,?)"); $query->bindValue(1, $idv); $query->...
How can I insert pagination in my search engine search.php page? If there is 1 result, I do not want the Previous button and the Next button. If there are 2 pages and I am on the first page, I only want the Next button. If there are 2 pages and I am on the second page, I only want the Previous...
I am developing a freight management software.For that the goods are transported using a document called Goods consignment note.My customer has already printed consignment note.I have to get data and then print the datas in the fields in already having consignment note. I have been using fpdf for...
I am developing the PHP based web application. I need to display the land which is sold and unsold. I need to generate a visualization of the data something like this : Any idea how it can be done. Are there any visualization libraries, API's that I can make use of ? Thanks
I want to write a simple script that can connect to wireless networks. I have some of the networks passwords, but not all. Is there a way to: scan the local network for wireless networks connect to them if they have a password specified connect to the unsecured networks scan through available f...
I'm using navigation drawer in android. I have got the data from a URL through JSON. When I run the app when it loads the fragment there's an error saying "Unfortunately the App has not responded " I'm getting the JSON Data from a PHP file and it is taken from the INTERNET for now it is in...
I am working on adding a mail list to a website which is php enabled. I know how to create a form, pass the variables to a php file, and then use that php file to store the variables in the root directory for the website. However, this just seems to insecure. I tried saving all of the files to a ...
Record in Database looks like this: D\'Huison-Longueville When I echo this record in textfield it appears like this : Here is my code: <input type="text" name="city" value="<?php echo stripslashes($query['city']); ?>" />
So it's pretty clear to me that I just have a partial understanding of the tools at work here. In my mind I'm trying to do something pretty simple. I have a project that includes a php-based site, and my assumption is that I should be able to design my project in such a way that I can issue a sin...
Suppose I having the current computer date which I have code below: //Current date declaration var d = new Date(); var month = d.getMonth()+1; var day = d.getDate(); var year = d.getFullYear(); var currentDate = ((''+day).length<2 ? '0' : '') + day + '/' + ((''+month).length<...
I have a php program which does some processing. I would like to stop the program during execution and save the current execution state and continue from some point later on. What is the best way to achieve this?
I have dynamic menu and submenu which is coming from database. All is going good. when I click on menu submenu opens, but when i click on these submenu, submenu hides. I want to show these submenu there when even when clicked on them
tips as ["45","46","47","48","49","50","51","52","53","54","55","56"] and in another table am having the tips as id 45 tip wash your eyes, id 46 tip dont rub your eyes how to split the array and according to that i have to get particular tip and to be printed any suggestions please. how to search...
here is a php script for quickHull Algorithm. It's Work fine. I'm trying to convert QuickHull Algorithm from php to C#. Here is my class public struct point_distance public Point point; public float distance; public point_distance(Point p1, float p2) point = p1; ...
I am trying to create a table for marks and rank team in decreasing order. i tried this. $q = $db_con-> prepare(" SELECT @s:=@s+1 serial_number, t_name,name,marks FROM team,user,(SELECT @s:=0) AS s WHERE user.u_id=team.u_id ORDER BY marks DESC"); Above query displays result in DESC order of ma...
I am working on cart function in codeigniter. I have worked under module named 'bookings' where I have placed cart view file in modules/bookings/views/shop/cart.php When Something triggers, I have called update_cart function of bookings controller. All logic are ok, updating cart is also OK but,...
<div class="bottom"> <font class="ftxt"> <a href="javascript: void(0);" onclick="sin();" class="stxtcolor"> Sign in</a> or</font> <a href="myaccount.php" class="regbg" />Register Now</a> When user click ...
I am working with an app where I am unable to post the File to the server. Therefor I have chose to send it as a string to the server, and remake it to a file using PHP. Below is the code I am using to convert the image to a string. var file = document.getElementById("fileForUpload").files[0]; i...
I am encrypting a string in Ruby using the following: cipher = OpenSSL::Cipher::AES256.new(:CBC) cipher.encrypt cipher.key = 'I4LCrXyYDEYVFWB3F1jH5EFKZt6jhosx' cipher.iv = 'xKAmbEaWJvC1iO30' encrypted = cipher.update(string) + cipher.final encoded = Base64.urlsafe_encode64(ecrypted) Trying to ...
I have entity (car) this entity have galleries (photos, videos)- can i add method - getGallery() in entity ? or this is not good way ? If not where i should connect car with gallery. In idea i get object car to template and can $car->getName() $car->getGallery() or $car->getGallery('photos') or ...
I'm trying to get the first embed url from the post. I know wordpress auto-embeds them but can't find a method to just get the embeds. $urls = array(); $p = get_post(); preg_match('@https?://(www.)?(youtube|vimeo)\.com/(watch\?v=)?([a-zA-Z0-9]+...
i have a registration page in code iginter with take email username and password and send a activation link to email and by that one can able to go through form fill steps like personal, business and other steps . so this same type of registration i should do with linked in is that can be possibl...
I'm using PHP Zend as my project framework. How I can remove public from this URL? I want this kind of URL http://staging.revivalx.com/zeesbio/login Instead of this http://staging.revivalx.com/zeesbio/public/login http://staging.revivalx.com/zeesbio/public/login Thanks a lot in advance.
I am working on AWS S3 ( Amazon S3 PHP class @version 0.5.1-dev ) , i can get all bucket list by this function $s3->listBuckets() Like this how can i get all files from folder ? Thanks
The problem: I have a series of 'accept' buttons, on click it opens a lightbox (a modal- using bootstrap), of course this is done without refreshing the page. On the lightbox I need to show information regarding what is being accepted (therefore I need to pass a PHP variable to the lightbox). S...
I have a php script which downloads all of the url content within the given url. like : function downloader ($given_url){ //download all the url's content in the $given_url. //if this $given_url contains 10 url inside it download all of their content. ...
I'm trying to extract the flashvars from an on a webpage using PHP. However, using a DOMDocument I cannot seem to even find the element. Can anyone help?
i want to fetch shopping product from amazon,ebay, http://www.watches.de/ and more around 50 sites.my project is in php.i also uses the concept or curlphp but it not work online on my server .help me to find a better solution for this or suggest any alternate.
I have arrays of check-box and I want to send value of check box to SQL query using PHP and display data from database on same page, when user clicks on check box. Redirect checkbox value to SQL query and display result dynamically. Please supply example code?
What I'm trying to do is simple: I want to connect to my server that I've written, and connect to it in PHP. (The server is written in Java, not in PHP.) $client = stream_socket_client("tcp://myip:4812", $errno, $errorMessage); if($client === false) throw new UnexpectedValueExceptio...
Hi i am also facing the same issue on my site, In IE 8 the Google chart not displaying at all..while rendering the chart IE 8 rises the following error, permission denied format+en,default+en,ui+en,corechart+en.i.js at line 83 still i cant find why this is happening .please give me a solution f...
I recently came across this piece of weird functionality: index.php: require_once("include/header.php"); include/header.php: require_once("./config.inc.php"); require_once("./func.inc.php"); fooo! include/config.inc.php and include/func.inc.php are empty. When I tr...
i need some help here. i dont know how to combine my search engine and the pagination code.. can anyone help me? thanks a lot guys.. Here is my search.php code if(isset($_GET['tag'])) $suffix = ""; $tag = mysql_escape_string(htmlentities(trim($_GET['tag']))); $errors = array(); if(empty($tag)...
I have a website that I wan't to scrape every hour but that website is not even remotely organized, but i have found out that Everything i want is always located in a title="what-I-Want" So how do I get every instance of title="" on the page and dump it into an array?
Below is the code I have. The flow needs to be: -On button click, value is passed to JS -JS sets as variable -The variable needs to be sent to PHP without refreshing the page (AJAX?) -The variable needs to be output in php Can anyone show me how to do this? <a href="#modal-accept" data-to...
I m a web designer and developer at fusion web technology in coimbatore. I have 6 month experience in this field. But they give three thousand salary only. It's not enough for my allowance. How they give to parents as a salary. So i call to chennai for Web development job. They told only 5 thousand salary. Chennai is a metro area. Defenetly not enough salary. At las …
I am still pretty new at PHP and I am trying to incorporate html into my page, I keeping getting the following error and I cannot seem to figure it out. "Parse error: syntax error, unexpected T_STRING in D:\Hosting\11304243\html\cnghldb\cnghlplayerinfo.php on line 29" Line 29 is the second line ...
I'm currently attempting to port an c# application to php and I'm have some problems when it comes to storing and retrieving the cookie data. C# allows me to retrieve and store all assigned and previously set cookies using the following lines of code below. From the research that I've done thus f...
Hi I have url like below given How could I change url using url rewriting with help of .htaccess http://www.test.xyz.com/ab/web/pds/dispall/web/web-design http://www.web.test.xyz.com/ab/web/pds/dispall/web-design
I know PHP's GD library can apply grayscale filter to an image, for example: $img = imagecreatefrompng('test.png'); $img = imagefilter($img, IMG_FILTER_GRAYSCALE); imagepng($img, 'test_updated.png'); Is there any method that can apply half of the grayscale effects (which is similar to CSS3's f...
This is my login.php page this is the code. i can successfully log in only at the time of register, but when i log in again after signing out i couldn't login again. i got the error that that the username is not correct. i don't know where the error is occurring. all the user info is stored in th...
I am new to zend and I am trying to delete data from grid using post method but when I click on yes button it is working as get method. The url shows this [http://project.com/client/delete/id/10?id=10&del=Yes]. Here is my controller code. public function deleteAction() if($this->getReque...
I am working on Updating Codeigntier Cart with Jquery using Ajaz call to update. Here is my jquery function $(function() { $('#booking_form_pick_up_method').on('change', function(ev) { var pickup_value = $(this).val(); var postData_updatecart = { 'pickup_value'...
Please check following code snippet. When I enter future date through datepicker in jqgrid add form, then instead of showing validation message as 'Invalid Date Of Birth' other validation message is shown like-'custom function should return array!', please assist me.. function checkFamilyDOB(dob...
I am just new in developing php using mysql as its database, i just want to ask how can i insert multiple data in which the input name or class name of my input are the same here is the look on my code: DateX Description ...
I have a php page that fetches data from MySql database based on URL parameter sent from another page, and exports it as a pdf document. The problem i have is that the data is fetched properly (i have tested the query in dreamwever), it works fine, but when the data is displayed in a PDF table, i...
Hello there pardon me for my stupidity because I am new. I want to integrate Omnipay paypal in laravel 4. I have gone through but I couldn't be able to understand how can I do it. I didn't find any documentation. I have gone through this, this and this. I have installed it using composer. Now ...
There are a lot of pages on stack overflow that shows how to build a search engine using like query in sql.But this method becomes very slow when the database grows beyond 1 million.I am sure that search engines like google wont be using this method.Are there any tools to do this. Recently i came...
RewriteCond %{HTTP_HOST} ^seedscrew.org.crew$ [OR] RewriteCond %{HTTP_HOST} ^www.seedscrew.org.crew$ RewriteRule ^crew/([A-Za-z0-9-]+)/ "http\://www.seedscrew.org\crew/index.php\?mode=login&act=home" [R=301,L] I have written in in .htacess file. I want to redirect from hostpath/index.php?mode=...
I have gone through this Link here at stackoverflow. but I cant seem to get the div loaded here is my code <div id="leftmenu" style="font-size:20px;top:12%;bottom:0;right:0;left:2%;"> <a href="#" id="details"> Form </a> <div id="content" st...
I have written a query on database the result is given in this form Apples-100 Grapes-200 Oranges-50 Bananas-30 now i need to store the data in an array like this [['Apples',100],['Grapes',200],['Oranges',50],['Bananas',30]] how can I acheive this i tried this while($row = mysql_fetch_ass...
In my web application for the TbGridview I need the records to be center aligned in the admin view page and also the layout should be stretched for the entire page .I tried making changes in the layout but its not working .Any body kindly help me how to proceed with this .
Is there a possible to get an array as like #1 from #2. I tried many recursive loop to get this array but it make me so tough in this. Please guide me. array([6] => array( [0] => array( [6]=> Light Motor vehicle [9] => Cars [10] => BMW ...
i am tring post tweet using twitteroauth library. This is my code require("application/libraries/twitteroauth.php"); $twitteroauth = new TwitterOAuth(TW_KEY, TW_SECRET); $request_token = $twitteroauth->getRequestToken(); print_r($request_token); $tweet = new TwitterOAuth(TW_...
I am using LINKEDIN message post api. In this if user allows then message post on LINKEDIN user's profile. But i want if user allows to share message on his profile then request should go on site admin(My Website) too and if he(site admin) allows to share message on user's profile then it should...
I was trying to move my WordPress site to a new Domain. However When I imported my content I got the below error Message: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2123623 bytes) in /home2/username/public_html/wp-includes/plugin.php on line 122 Could a...
Hello i have a dynamic form that can change field names upon user selection. i would like for the form result to be inserted into one mysql row.. i create an array as follows: include_once 'dbconnect.php'; if (isset($_POST['item_name'])) { $table = $_POST['ItemTypeSelect']; ...
I am using DHTMLX Scheduler for booking an appointments. To avoid a double booking I have shown a block on a time slot which has already been selected by some other user but yet to be done with appointment process. I have set TimeInterval to check the status of appointment which is currently in ...
I m facing some character encoding issues like this: D\\\'Huison-Longueville Référence Original Text was : D'Huison-Longueville Référence Here is my PHP Mailer script: $mail = new PHPMailer(); $mail->CharSet = 'UTF-8'; $mail->IsMail();...
how to get comments ,share and likes count of the post from linkedin using php using below code i posted post in linkedin wall include 'simplelinkedin.class.php'; $ln = new SimpleLinkedIn('ket', 'secret'); $ln->addScope('rw_nus'); if($ln->authorize()){ echo "<pre>"; print_r ($ln-
Read the file in folder with .DMS extension and convert to pdf format in php $path = "folder/1004.dms"; $content = file_get_contents($path); header('Content-type: application/pdf'); header('Content-Disposition: attachment; filename="test filename.pdf"'); echo $content; This code will gene...
I am sending a request on my server and trying to get the response. The response is either 0 or 1 from my PHP as such: $check = mysql_query(); if (!$check == "") { echo 1; } else { echo 0; Now on the client side I am trying to get the response from a jquery function: function...
I need a query to my database This is my database data CREATE TABLE IF NOT EXISTS `order_main` ( `om_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', `om_raren` varchar(20) NOT NULL COMMENT 'serial number', `om_total` int(11) NOT NULL COMMENT 'money', `om_freight` int(11) NOT NULL COMMENT 'fre...
Hi i'm trying to make a video uploading site, where people can upload, and they can, but they can upload withoout choosing a file? This is my code :) mysql_connect("IP","Username","password"); mysql_select_db("DB"); if(isset($_POST['submit']) && !empty($_FILES['file'])) $nann = $...
The function below fetches only the first occurrence. In this case it returns: "John Smith [email protected]", how do I get the other names with their corresponding Emails. I appreciate your help. function get_string_between($string, $start, $end) $string = " ".$string; $ini = s...
I am using youtube api data for retrieving youtube data using the below url link http://gdata.youtube.com/feeds/api/videos?q=hello&key=apikey&v=2&alt=json when i search for some specific keywords like 'songs hd' it is taking too much time to retrieve data, instead it takes less time to retrie...
How can i insert 256 IP based on /24 block. if IP block is 192.168.1.0/24 & network is 192.168.1.0 so i want to create a loop to insert 192.168.1.0 to 192.168.1.255 in mysql table . there will be a button when i press that it will insert 256 row 0 to 255.. Please help me to do it in php mysql ...
I am new to joomla. i create a component according to this docs from docs.joomla .this component install sucessfully on joomla 3. I go to this component by add this section in end of my url of my site. index.php?option=com_testup but I receive a 404 error. this is my file structure com_testu...
Here, the chapter_id can be two or more than two. I need to query in a way that every chapter give the output of equal no. of questions. i.e. If the total question is 50, and from 5 chapters, then each chapter should give 10 questions. SELECT id, chapter_id, question, answer FROM `questions` WH...
id | name | title | tag ------------------------ 1 | matt | demo | a 1 | matt | demo | b 1 | matt | test | c 1 | matt | test | d 1 | john | demo | a 1 | john | demo | b 1 | john | test | c 1 | john | test | d given the table above is the result of JOIN-ing 3 table from ...
I was new to yii-php-framework , i am making handshake function from mobile to php server , it is giving error as requested url was not found and showing my folder where code is diployed. can anyone help me pls..
I am just a fresher and being curious about the communication between two application. I know it can be done using API and by sending the get or post parameter to submit data from one application to another. but the question is, lets say there are two functions and 3 scenario.. all is in php. th...
<?php require_once('././php_mailer/class.phpmailer.php'); $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch $mail->IsSMTP(); // telling the class to use SMTP try { $mail->Host = 'tls://mail.sipradi.com.np'; /...
I have a predefined array $ar . $num = count($ar) - 2; print $ar[$num]; I always get an error when I'm trying to do an opertaion like this. I have also tried print $ar[count($ar) - 2]; It gives me the same error yet again. I'm just frustrated.Tried so many ways.None of them work. How do i u...
I am trying to query a mysql database and display data in a table.I now want to take the table and make a button that allows you to export it to an excel file.now you were able to export to excel,but its showing an error Notice: Undefined variable: data Below is my code: $mysql_hostname ...
In yii based application Im working on a search query. query is performed on two tables customers and customerContacts // Customer can have one-to - many contacts in different countries Im using cdbcriteria as $criteria = new CDbCriteria; $criteria->alias = 't' ; $criteria->with= array("...
Hi friends i need to print a variable outside a foreach loop, but i don't know i can do it. There's someone how can help me?This is my code.Check it out if(is_array($arrayValues2) && array_key_exists(0, $arrayValues2) && is_array($arrayValues2[0])){ foreach($arrayValues2[0] as $aValue2) ec...
I've created a User database abstraction class in PHP which extends a base class I made called DBO (database object). The DBO object's job is just to hold $db as my codeigniter's $db reference. So ideally, in my User object, I could do $this->db->insert() and access my codeigniter's database obj...
I am running app on facebook. One user (from usa) complain me that its illegal to know ip address in his country. My app based on php and i just save ip address to determine double account or some cheating in my app. But now i am worried if its illegal. I use simple php code to get user ip. And...
With my latest project, I'm required to provide users a file manager for their private space on my server. Ive got the file manager to work as far as reading the SQL database for file info regarding location and ownership. My database has several tables for file management. • Files : id, usr, f...
I have created a custom plugin in wordpress. With this plugin from admin we can upload product image,give a short description and give product details. Now with this plugin I want to show product image and short description and a more link in front page. Now when anyone click more link it will re...
I'm use "Paypal-digital-goods library" with PHP. i integrated for my website http://www.accessasia.tv/buy/buytmp/month_323761616E.html when i test with account sandbox then it work good, but have problem with it when i pick on is live site with account paypal and show error "Calling PayPal with a...
Is there any function that reverts a require/require_once/include/include_once? For instance in script A I need to require a script B wich has common functions witch other script C and I don't know if previously C was required or not. So I would like to "clean" script C from memory before loadin...
I'm looking for the function that gets (or echoes) the "Ipsum lorem ..." text, but I'm not able to find it. Anyone know what it is?
What are the disadvantages of implementing many to many relationships for all models? I think it would be easy to manage if something that requires it happened in the future.
This question is not directly related to PHP. The situation is, I have a scheduled PHP CLI task that runs every after 2 Mins (report generator). Sometimes, Windows encounters the error that CLI stopped working. When it is stopped, it does not execute the new task until we press "close" button on ...
I know how to get mp3 file duration, if file is on my server. But What if I have URL? Ex: http://higgs.rghost.ru/download/action/49191165/mp3 What is the best way to do this on PHP? Thank you!
i deployed a symfony application on centos server but i am getting a error [Symfony\Component\Intl\Exception\RuntimeException] Could not load the resource bundle "/vendor/symfony/icu/Symfony/Component/Icu/Resourc...
I have a login page done in php and in that i am storing the username in cookie. But i cannot access this cookie variable in my home page which is also done in php, on thing i am doing all this in my localhost wamp server someone please help me to dothis login.php <lin...
I have a function that saves images public function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) { if( $image_type == IMAGETYPE_JPEG ) { imagejpeg($this->image, $filename, $compression); } elseif( $image_type == IMAGETYPE_GIF ) { imagegif($this->...
Why does it always insert something in the Mysql table, if i fill in nothing on the html website. My code: if($message =! ""){ $result = mysql_query("INSERT INTO Blog (Inhalt) VALUES ('$message')");}
I've set setInterval to update my scheduler. I'm getting data from server in JSON format. But Scheduler is not getting update if I used json data, But if I put static values it works fine. Following is my code. // It doesn't work setInterval(function() { $.post('ajax_comet.php',{sectionIds:...
I do have a problem with one of my php application. First of all my test environment is running on IIS with PHP installed. There I have the following code: // define autoloader for all php classes $ps = PATH_SEPARATOR; // add default path seperator to a variable set_include_path(get_includ...
I am running a dedicated server that fetches data from an API server. My machine runs on a Windows Server 2008 OS. I use PHP curl function to fetch the data via http requests ( and using proxy ). The function I've created for that: function get_http($url) $proxy_file = file_get_contents("pr...
I tried to link my form to a php file but there was an error and data was not submitted. I dont understand how to fix it. help me fix it Form code: <form target="_blank" action="details.php" method="post"> <table> <td>First Name:</td>...
Let's say I want to send Unicode glyph U+CABC 쪼 via a web service to be saved in a database. For example, wget is being used to connect to a web service: shell_exec("wget 'http://doit.com/testing.php?glyph=.f(0xCABC)."'") Where f is the PHP function (or functions) to convert/encode/escape the ...
(I found this but still dont understand) {HTML form PHP post to self to validate or submit to new page} I am sorry if this question is explained better in another place but I have been stuck for hours, have searched, and have just given up. I am going by the W3c website tutorial on how to valida...
This is a simple loop to print out 1000 lines. On my Windows 7 machine using Chrome and Zend Server, it shows only 400 lines and then stops without any error. If I change the time delay in usleep() to 200ms, it shows 600 lines and then stops. If I set the set_time_limit () to 20secs, it show...
I really want to use Omnipay as it seems like they make it very very easy to process payments. However, I need to be able to do ACH debits and credit. Meaning, I need to be able to take from one bank account, and deposit into another. Of the big list that Omnipay integrates with, which of these o...
I'm working on web-site with flash games. And I need to generate some screenshots for each game. We have tried do that using Windows-extension COM: $Browser = new COM('InternetExplorer.Application'); $Browserhandle = $Browser->HWND; $Browser->Visible = true; $Browser->Fullscreen = true; $Bro...
PHP Mysql CodeIgnitor Converting characters to symbols in very bizarre circumstances Application Built on CodeIgniter. Has been running for over a year. No problems. Client fills in a form about a customer. A simple trim($_POST['notes']) captures textarea form field text and saves to MySQL no e...
I've recently upgraded to a dedicated server; previously I was on a shared server, so I have no experience with the php.ini file. I've opened it and looked through it, searched Google and SO but nothing is clear to me. Can someone clear up, for me, the way to add/edit lines in an ini file and wh...
I have upgraded magento from 1.4 to 1.7.2, everything is working well,but when admin try to print invoice on backend , it gives a blank page, nothing in error logs I tried to change construct function to abstract public function __construct($filePath); in lib/zend/pdf/FileParserDataSource.p...
Why wont this work! I have been pulling my hair out for days trying to get this to work $query2 = "SELECT * FROM temporders WHERE order_id=$id"; $result2 = mysql_query($query2); $row = mysql_fetch_assoc($result2); $osupplierid = $row['order_supplierid']; $odescription = $row['order_descript...
I searched some topics but I did not find what I want. I want to use PHP mailer for send a mail who is register my website. I am adding my codes. I hope you can understand me and solve my problem. Thank you guys. public function register($username, $password, $email, $school, $gender){ global $b...
I have attached a pdf to a post under a custom post type - I've created a link for users to download but all that displays is Missing Attachment. I've checked the admin panel and I've definitely attached it to a post - I can't seem to get it to link to it. My Code is: $paged = ( get_query_var( ...
I'm programming my own CakePHP authentication, is started out using an old script i used on another project. This error keeps occuring: Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /data/sites/web/ismartbe/subsites/cms.ismart.be/app/Controller/UsersController.ph...
I have an array like this : Array ( [0] => 2 [1] => 1 [2] => 3 [3] => 5 [4] => 1 [5] => 2 [6] => 1 [7] => 4 [8] => 2 what i want to do is to find the last occurence of each item in this array in php so this exemple will output : Element|Position 2 | 8 1 | 6 3 | 2 ...
I want to develop a word puzzle game. I want to fill a matrix with letters. Some of these letters build words. the words are chososed randomly. So if we have a 4*4 matrix and we have like words "append", "event", "over","pow","efg","xx" we must have an algorithm that display results below: e|x...
I need help creating a split button in WordPress TinyMCE (function() { tinymce.create('tinymce.plugins.Wptuts', { init : function(ed, url) { ed.addButton('dropcap', { title : 'DropCap', cmd : 'dropcap', image : url + '/dropc...
i am calling a controller with method setActiveId and store 1 array in session and display after storing by using var_dump($this->session->all_userdata()) it shows perfactly but in same controller when i print the session in other method say checkinkingPermission then the array in session is empt...
Iam trying to pass variable along with Chtml button in Yii using the following code echo CHtml::button('Update', array('submit' => array('serviceRequest/Update',array('id'=>$requestId)))); But it is showing 404 error due to the url problem. On clicking some dummy characters is getting added t...
how to split the data of the form ["1","2","3"] and store in array as [1,2,3] in php. because i need this data inorder to get or fetch data from a mysql table which is having data as id 1 data red, id 2 data blue. so that i need the data to be coverted to 1 2 3 so that i can give it in query to ...
I've the following code: $query = "UPDATE `'._DB_PREFIX_.'specific_price` sp SET sp.`from`=NOW(), sp.`to`=DATE_ADD(NOW(), INTERVAL 19 HOUR) INNER JOIN `'._DB_PREFIX_.'product` p ON (sp.id_product = p.id_product) WHERE p.`id_manufacturer` = '.(int)$id_manufacturer"; //Run the Query $resul...
Should I be able to use PHP Curl to upload a file to Sharepoint. I have this logic that I am using at the moment to "try" and upload to "My Shared Document" for now. $the_file = file_get_contents('index.html'); $user = '&&&&&&&'; $pass = '&&&&&&&'; $ch = curl_init(); curl_setopt($ch, CURLOPT...
I have a form created with a submit button. What i`m trying to accomplish is that when the button is clicked and the form starts to submit I want the button to be temporarily disabled and after the form has finished submitting to be enabled again. Any clue on how to do this?
Hello everyone and merry christmas :) I've been working on a little ajax script since yesterday, and now i've encountered a problem. I've got a submit form with a select input form, and i wish to load a php page through ajax when this form is being submitted. Now in my php page, i have a switch...
I am very new to oop php and need to create a class that will create a rectangle with a dynamically defined username embedded in it. Basically, a user_id is passed into the class which then gets the username. I then need to return the new image. At present I am not too bothered about the constru...
I am perplexed in getting the GET Variables for the url of this specific page. The URL is :- http://thisthat.com/category/?field_issue_month_value%5Bvalue%5D%5Byear%5D=2013&field_issue_month_value%5Bvalue%5D%5Bmonth%5D=10 I am trying to output both of these GET variables. I tried following w...
I am creating a simple blog but I don't manage to make the delete button work. I think I am missing out on the button? I am well aware of SQL INJECTION and PREPARED STATEMENTS. I will be dealing with them later. There are no errors with connection. My delete query is in a function deleteArticle...
So I'm new to these hooks and filters in wordpress and what I'm trying to achieve is when a form processes it writes to the database in md5 and shows in the backend not in md5, but in its original state. I have form which writes to the database and also creates a custom post type containing the ...
I'm working with the Google Drive SDK in php To allow my application to interact with my client Google Drive Account, I need at one point to store the credentials. These credentials has a Json structure that I guess can be stored as a String or something like this. My problem is that I don't re...
I am using the following code to get the list of friends for the given secret key , how to get the list of friends for logged in userid (irrespective of appid, and secret id). $facebook = new Facebook(array( 'appId' => 'appId', 'secret' => 'secretKey', 'cookie' =>...
My login/register system works good on the local host, which means user can register providing some credentials and then can login with them. But when I try it on the server although the "registration form" says "You have been registered successfully!" which is exactly the same as localhost but ...
I want to show thumbnail of image in search results page. I can get image name in search results page, So using this how can i get thumbnail url. If there is any alter way please share with me. Thanks
Could someone please explain what is going on here? echo (18.99 * 100); // output: 1899 echo (int)(18.99 * 100); // output: 1898 The only thing I can possibly think of is that the 1899 is actually 1898.999999999999 or something and PHP is converting it as part of echo somehow? If this is the ...
i have an array of a DOM object, how can acces to the ["textContent"] attribute ?. object(DOMDocument)#3 (34) { ["doctype"]=> string(22) "(object value omitted)" ["implementation"]=> string(22) "(object value omitted)" ["documentElement"]=> string(22) "(object value omitted)" ["actual...
I am getting the error PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 33292313 bytes) when i am running my pagination function and i don't know what is happening and/or why i'm getting the error. From what i've seen on the other questions here, most peopl...
Given a model layer as in the accepted answer on How should a model be structured in MVC? How do I structure the View? Currently I am simply rendering a Twig template in the Controller, but this seem to be the wrong approach according to the answer. namespace Controller; class Home ext...
I have a php calendar that works fine for THIS month but I'd like to create another 2 scripts that show the next 2 months. I want to use the same format as the one I already have but I'm not completely sure on what I need to change to get it to display the dates of months 2 & 3. Here is my code ...
I'm current displaying my recent posts in Wordpress with the below script, but I can't get the ascii symbol to be apart from the hyperlink. If I hover on a recent post then I see that the ascii symbol is also part of the hyperlink. $args = array( 'numberposts' => '2' ); $rece...
It is very frustrating for me I am stuck in this query. I have a attribute table where there is code column exists. There is a mapper table which maps entity with attribute. Now when I run direct sql of this in database it returns me back data but using PDO it shows exception which I have given...
I need to convert 2013-12-15 14:42:07 to something like 4 mins ago. My current code outputs Warning: Missing argument 1 for ago(), called in C:\wamp\www\exp\index.php on line 30 and defined in C:\wamp\www\exp\index.php on line 8 and ( ! ) Notice: Undefined variable: time in C:\wamp\www\exp\index...
I'm a bit confused why this path doesn't work: include("../../WEBSITE/GAME/champion.php"); The file that it is running in is a cron file that executes every 24hrs it is located in ROOT/WEBSITE2/CRON_FOLDER/cronfile.php I wanted to go back to the http root and then work forward from there bu...
It is work if I use the JSON.parse() to parse the PHP array return if applying 1.3.2/jquery.min.js but not 1.10.2/jquery.min.js, do anyone have similar experience and solution? PHP array return $returnArray['vercode'] = FALSE; echo json_encode($returnArray); AJAX call $.ajax({ cache: ...
I am developing a site and I am quite new to the subject. I had an idea of making a session variable that contains forms and functions errors or successful alerts. Instead of redirecting to the same page. Also, overcoming the problem of displaying success alerts in case of redirect to some php en...
I have run into problems accessing APIs like Twitter and LinkedIn. I think that the problem with this is due to my server's date and time settings. I found this solution: - Open IIS 7 - Select your website - Open .NET GLOBALIZATION - From Culture tab, select required Culture and UI Culture. - Do...
I have the following php script that builds the tables I need for my site. include_once 'rcfunctions.php'; createTable('rcmembers', 'user VARCHAR(16), pass VARCHAR(16), INDEX(user(6))'); createTable('rcmessages', 'id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, ...
i want create a dynamic range to scan value from an excel sheet.The code that i use is: $tipo2 = $col1= $objPHPExcel->getActiveSheet()->rangeToArray('C'.$i:'E'.$i) but rangeToArray('C'.$i:'E'.$i) give me back an error. Do you know i can use variable for a dinamyc range area?
My database schema; LIKE PAGE ARTICLE id id id userid name text The question; How do I make a relationship between PAGE table and ARTICLE table with LIKE table? Normally; Like.php; * @ORM\ManyToMany(targetEntity="Page", inversedBy="likes") protected $...
I want to retrieve direct messages from twitter using TwitterAPIExchange.php. The settings in my application are: write/read and direct messages. What I am missing? Merry Christmas CODE: $getfield = '?count=5'; $requestMethod = 'GET'; $twitter = new TwitterAPIExchange($settings); $string = js...
i have problem, when i try to include photogallery from facebook. I use this solution http://kevinp93.com/facebook-images-on-website-v2/ It works fine for these facebook pages: facebook.com/pages/RM-facility-s-r-o/177721112253368?ref=hl facebook.com/pages/Sokol-Klecany/112373465475972?ref=hl ...
I've got a PHP webapplication that's connected with another application using SOAP. In order to maintain the connection when updated my application, the interface needs to be one version backwards compatible. Does anyone has an idea how to fix this, eg: Creating a different input for each versi...
Welcome I would like to do an online store that you could choose a product and add your picture could be edited (for example, trimming, zoom, ...) and when this file created you can order and I would get the order. Do you know a store or some plugin? I have an example here -> http://www.custom...
Here I am getting url from tweets, converting that url to long url. And then getting count value for numbers of tweets containing that url. $reg_exUrl = "/(?<![\>https?:\/\/|href=\"'])(?<http>(https?:[\/][\/]|www\.)([a-z]|[A-Z]|[0-9]|[\/.]|[~])*)/"; // The Text you want to filter for urls $text...
so.. I'm facing a problem with dynamic form/ $_POST... I need to echo the image i selected via radio button in the if(isset($_POST['Submit_bc3']))... But it's not working, I don't get it.. How can i make this problem go away? Code: $image_url...
I am trying to submit a form using curl, the problem is the form has a radio button and when I try to post the correct value of the radio button I get the error "An option has not been selected", this of course refers to the radio button. I'm not sure why this is happening but is there anywhere ...
i want to know a function can change charactere into html entities with php language. 1605;ُ ثَلاثَةِ أيّامٍ
Admissions Name : Mobile Number : Phone Number : Email *: Name of Organisation : Birth Date of Child : 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 January February March Ap...
I want to use 2 parts of the url in the action name with zend framework routing. $router->addRoute( 'user', new Zend_Controller_Router_Route('user/:actionpart1/:actionpart2/:userid/*', array('controller' => 'user', 'action' => '????')) Now when i go to the URI /user/Foo/Bar/12 I want...
I'm making a system that stores Yii Forms in a database. I'm having troubles getting one thing to work. I have several Forms on the same page which are all called DynamicFormModel. To achieve validation on each field I had to use the 'id' and 'inputID' HtmlOptions on my fields and error message...
I have a situation where my php page generates multiple forms based on the data received through an rpc call. My requirement is to handle jQuery modal confirmation for these dynamically generated form elements but I'm at a loss since jQuery is unable to handle this in my case. I have tried JSFi...
I have the following json data Merchant_stripe_response Object [_response:protected] => stdClass Object [object] => customer [created] => 1387883058 [id] => cus_3BFTkHufSbD1I9 [livemode] => [description] => Order #22 ...
Let's say I have three tables (this is just an example): users user_id username roles role_id user_roles user_id role_id primary (boolean) And the corresponding laravel models: class User extends Eloquent { public function roles() { retu...
From last 3 days i am reading about magento [eCommerce website development tool].Any body know about how it is work.Means when we deploy it on server,how the php pages are rendered into html format.Any dll or php interpreter or compiler who renders the php pages into html format before it sent as...
PHP scripts on ide looks reular before uplode to server.But When Its uploaded to server its structure Corrupts.Im using FileZilla for Uploading. Examle Before Upload echo 'This is'; echo 'Regular'; echo 'Code'; After Upload echo 'This is';echo 'Corrupted';echo 'Code'; ?>...
I am migrating an existing REST API to Laravel 4.1, and the API currently uses offset as querystring parameter to specify what the offset of the records needs to be. I would like to use the default Eloquent's paginate(), but these searches for the page querystring parameter. And of course it use...
at present am using some static data into slider in wow slider jquery mobile. But i need to fetch the data from db and place it in silder. Can someone suggest me to do that thanks. the code am having at present is <div id="wowslider-container1"> <div class="ws_images">
I'm using Mongo DB and Slim PHP in my app. In mongo I have this array of objects "dashboards" : [ "_id" : ObjectId("52b96365481b9c02091d8698"), "title" : "Default title", "subtitle" : "Default subtitle", "metric_views" : [ ] ...
I created a small jquery example with jquery UI autocomplete $(function() { //autocomplete $(".selector").autocomplete({ source: "getdata.php", minLength: 1 getdata.php: if (isset($_GET['term'])){ $return_arr = array(); try { $connect...
I am running 1 website on my server. That website has search facility. When I search for category named "apple" at that time its showing 10 results and I am getting search result page fine and fast. [RECORDS ARE PAGINATED 10 records per page] Now, When I search for "orange" named category at th...
I'm trying to create an archive of a folder in Windows, but the archive is not created. $zip = new ZipArchive; if ($zip->open('archive.zip', ZipArchive::CREATE) !== true) die ("Could not open archive"); $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('H:/Binary...
Happy Holidays folks. I have come a long way with the help I have received here. Thank You. I have created an HTML form to enter data for my movie collection and it works fine as long as there are no apostrophes in the title or any actor's name. If there is I get an Error X. I can enter it d...
I have a Selenium Server as a standalone node running on a Windows Virtual Machine in VMWare Fusion on a Mac. My tests are triggered from within a Centos Vagrant box on the same machine. My tests are implemented in PHP using the php-webdriver API from Facebook. From time to time, IE seems not ...
well, i'm new to MySQL Database and i got a problem, i need to get the last two set of records from a table ( the records are automatically added to this table every week) i need to use to find the growth that an entity did during the last week. can any one help plz. here is what i wrote, i t...
To get my requirement i used below code... <div class="home_single_item_headline"> <?php query_posts('post_type=post&category_name=Browser&post_status=publish&posts_per_page=6&paged='. get_query_var('paged')); ?> <a href="<?php bloginfo('url'); ?>/category/<?php $category = get_the_category();...
I have a node.js app that's deployed on heroku. I use bootstrap in general and want to embed a blog into website. Wordpress offers help for php only that I can't use in junction with node on heroku. The solution is either to write another app in php (that I haven't dealt with), deploy it again an...
I'm using Chrome. After installing Appserv 2.5.9, browser can't find the webpage. I looked into C:\AppServ\www there is a file name "index.php" in there. I've ever used ASP.NET before. So I opened IIS Manager and stopped its service. I also checked "services.msc" and saw that Apache has been st...
<?php session_start(); ob_start(); include("config.php"); $user=$_POST['fname']; $pass=$_POST['password']; $result=mysql_query("SELECT * FROM user_detail WHERE password='$pass' AND email='$user'") or die("Couldn't query the user-database."); $row=mysql_fetch_array($result); if(!$result) ...
I am using vBulletin and the login uses this to cross-refer to the database. md5(md5($pass).$salt) How do i make a php script such that every password input will automatically be hashed and salted as well so that it is able to authenticate with the vBulletin database ?
I have getreviewid(id) which displays the review details shown below //get a review by id function Getreviewid(id){ $.ajax({ url: 'http://creative.coventry.ac.uk/~4078078/moviereviews/v1.0/index.php/review/reviewid/'+id, dataType: 'json', success: function(data) { ...
I am trying already this many days but somehow I cannot find the write answer neither in the formus nor bymyself. I have thousands of data in a table in SQL. I have an article from joomla, where I have some divs and inside one of them I used {jumi} to add a php file. Inside the php file I have c...
I'm trying to encrypt a string using the PHP GnuPG library on my Linux server hosted on Rackspace, however I keep getting an error message no matter what I try. Please see below: Fatal error: Uncaught exception 'Exception' with message 'no key for encryption set' in /var/www/vhosts/royal/faceboo...
I'm struggling with this from hours... what i have is a domain with (virtual) subdir based on languages so domain.com/en for example. The point is that it is indexed in goggle and this structure is changers since few days so old links point to domain.com/postname I'm trying to do a redirect so...
Can anyone tell me why I am getting an Undefined Index error on my code here. I have used this setup using the if(isset) condition in other parts of my project after researching my original Undefined Index errors and ISSET fixed my problems. But it is not working here for some reason and I cannot...
I want help for cakephp unit-testing and mocking objects in below scenario: 1.] I have one vendor file for which i want to make mock - (mock object for that file/class) and stub one of it's method. i.e. my vendor file is Vendor/Twitter and i want to make mock object of it in Test/Controller/User...
Please get the string and let me know that how can I convert it into php array. $data = 'medicine[0][barcode]=44444444&medicine[0][name]=57&medicine[0][medicine_name]=sge&medicine[0][quantity]=5&medicine[0][cost]=135.00&medicine[0][subtotal]=675&medicine[0][tax]=0.00&medicine[0][discount]=0.00
I am using following code to add comment on youtube video. please can anyone tell me what is the problem. each time it says "Invalid token 401" error. I have checked access token is ok and other thing also i have checked out. and array values are : Array [0] => Content-Type: application/at...
I want to write something like (laravel uses): View::make('FooBarView')->with('foo', $foo) ->with('bar', $bar); My knowledge and imagination made me to use new self instances. But I don't think that this is the best idea around and I could not handle it. Google couldn'...
I am replacing div content with the iframe when we click on it using jquery, How to display the alert when the video in the iframe is playing,pausing,buffreing. Can any one tell me how to fix this issue..
My client website page is hacked and the hacker put the link of malware on the video please help me that how can i remove the malware script from my php code www.bigbankpookie.com/gift/ this is the site when you close the the website the pagesplash for the gift.the gift page is hacked pleas...
I have a problem, i searched for the solution all over the internet, but i couldn't find it out :S The problem is: I'm creating file inputs on button click, but i can't handle these javascript made inputs because they aren't in my $_FILES array after i click on submit.. My code is: HTML: <fo...
I'm developing a intern app which send some emails in a view methods. Now I'm rebuilding this app TDD-style but I'm stuck at some point. I searched the web for how to test emails with PHPUnit and the solution was, use mock objects. I read some articles and tutorials about it and built a test with...
I have an SSH tunnel on my MySQL server that points to a another MySQL server. I am upgrading my database drivers in Codeigniter. This means that everything worked properly using the PHP MySQL divers. After updating my files and changing my connection config array From: $config['host...
I'm using PharData to create a tar package. It works fine but it includes a folder i don't want. How can I exclude a folder in the archive? $dir = "/foobar/dir"; $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dir) $phar = new PharData('/mytar.tar'); $phar->
we have written code in cakephp to enter contacts in Google contacts through api, Contacts have added in Google through Google xml request , but how can we get total number of contacts added or updated in Google contacts after code successfully executed
I have an issue with a search function, it works correctly but is taking between 14-18 second to load and that is causing me great pain. This is the search function I am using: $sql="select *, ( 3959 * acos( cos( radians( $lat ) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians( $lng )...
I have recently been working with tv_grab_uk_rt which generates a TV guide xml file. I have written a script to convert the XML into an object which I can the loop through and insert into a database. Whilst I have the script working, I came across an issue I was looking to get clarification for. ...
I have an array that I want to loop through. Using: echo count($places); I get a value of 2. Similar print_r the array gives 2 items. However, when i run a for loop it seems to go through 4 iterations. This can be seen by adding echo $i to the loop, which produces an output of 0,1,2,3. This...
I've function which send a request to server every 5 second. I have send two array variables in ajax request. to get result. How ever I'm not able to access second array in response. check my code. <script type="text/javascript"> sectionIds=<?php echo json_encode($blocksection);?>; currProcessing=
I had probleme with sfWidgetFormInputFile symfony 1.4 when I uplaod my picto.png she change extension for my file picto.txt he work find in my local but in server prod I had this probleme. class ImageForm extends BaseImageForm public function configure() $this->widgetSchem...
I'm trying to echo a string and the string contains "\n" and "\r" in it, but when it executes it still shows the "\n" and "\r". Here is what I'm doing. $url = 'http://whoiz.herokuapp.com/lookup.json?url=madithouse.com'; $response = file_get_contents($url); echo $response; It echos every thing...
lightbox <div class="modalBody"> <form method="post" action="login.php"> <table> <td>User Name*</td> <input name="fname" type="text" class="input" value="" /></td> </tr> <tr> <td>Password</td> <input name="password" type="password" class="input" /> </td> </tr> <...
Having trouble with line 27, Don't quite know why as I am very new to PHP/MySQL. Was wondering if anybody can advise me why I am getting the error; "Fatal error: Call to a member function execute() on a non-object in C:\xampp\htdocs\testscripts\usercreate.php on line 27" in the following ...
This is my HTML form contains the password texboxes. <title></title> </head> <h2>Change Your Password</h2> <form name="passwd" action="passwd.php" method="POST"> E-Mil:<input type="text" name="email" ><br> Old Password:<input type="...
From the script below, can anyone tell me what I've done wrong to get the warning message on output of the script? The upload script is - Code: // Access the $_FILES global variable for this specific file being uploaded // and create local PHP variables from the $_FILES array of informat...
I'm using sugarcrm 6.5.14 community edition, I know how to add a custom field to the module's basic & advanced search from the module builder. I've entered lot of key information at Leads "description" field. I'm unable to find a suitable solution to add it to the global search field that loca...
Well im trying to recreate a routing system currently I have this namespace libs; class Routing public static $routes_get = array(); public static $routes_post = array(); public static function get($uri, $controller, $method, $filters = null) $real = explode('/...
Below is my code for extending the view and action using default plugin. my plugin name customregistration start.php file initialise necessary things. i want to handled the plugin code which effect without doing changes in core part of the elgg. Any help is appericiated.. thanks in advanced.... <...
I am trying to test the demo bundle which come with symfony AcmeDemoBundle. I can reach config.php but when i click welcome page then i see the html source code not the html rendered output I am using symfony dev server not apache
Requirement: I've an existing site in ZF1, running on HTTPS. Following is setting in virtual host for that: DocumentRoot /srv/sitename/public SSLEngine on SSLCertificateFile /etc/apache2/server.crt SSLCertificateKeyFile /etc/apache2/server.pem Now problem is, we want to add few pages (a ...
Hi I am a newbie to mysqli and SP Ive the below code in which i have to run 2 SP nested as below in the code I get the error "(2014) Commands out of sync; you can't run this command now" Anyone who can help me on this would be highly appreciated Thanks $mysqli = new mysqli("localhost", "root...
I have been trying to send push notification on my server but I get this error Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Connection timed out) in /home/mialkan/public_html/pushPro.php on line 15 Failed to connect: 110...
hi i have this error in my wordpress webpage: wordpress Fatal error: Call-time pass-by-reference has been removed in /home/xxx/public_html/wp-content/themes/xxx/functions.php on line 202 200 class pont_Walker extends Walker_Nav_Menu{ 201 function end_el(&$output, $category, $depth, $args){ 202 ...
I am having difficulties in adding rich snippets foor products within the template that shows up the products, get errors all of the time i try to add a snippet. maybe someone can help me
i'm new to php PDO, i've made a query to select users in db and display them in a html table but i get no result, and there is no error message. print_r($connexion) returns "PDO Object ( )" here is the code. thanks for your help! connexion to db //connexion.php function connexion(){ try { ...
I have search category using ' Like ' in database . my doubt is ,if you search movies ,then movies will come..after with movies 27,28,29 has to be come that is the target .. how can we write login for that this is the database table..plesse help me
I am not able to get it that why the statement gets true both the times.? $hello="foo"; if($hello<=6){ echo "yes\n"; if ($hello>=0) { echo "ohh yess!"; it outputs ohh yess! I do know this is illegal comparison between integer and string,but why af...
I have the following code which gives me "Curl Error :error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number" error. $url='https://mysite/login'; $clientcert = "C:\\client.crt"; $keyfile = "C:\\server.key"; $challenge = "passphrase"; $CAFile = "C...
This is my requirement. I have a fixed file. "http://file.com/image.png". Upon opening this image everytime, there should be some random image instead. If not, how do I just change the contents of the file had it been ".txt" Thanks
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, '<' not found in /home/travelho/public_html/testapi/test.php on line 24 Warning: simplexml_load_string() [function.simplexml-load-string]: <?xml version="1.0" encoding=&
I have a requirement where <div class="button" id="room_open" value="<?php echo $Records['room_id'];?>" onclick="tappedOnRoom(<?php echo $Records['room_id'].","."'".$Records['room_status']."'".","."'".$Records['block_num']."'";?>)"><?php echo $Records['block_num']."-".$Records['room_id'];?></div>...
I'm going to develop client-server game using PhoneGap. Using HTML, CSS, JS in client side and PHP, MySQL on server side. This is turn-based game multiplayer game. So the question is how can I better initiate (or emulate initiation) from server to clients, to let them now about opponent turns a...
I'm getting data from android and send them to php where's creating pdf and sending back to android. All i got is empty pdf file in root of sd card. Can anyone help me? public class MainActivity extends Activity { Button go; EditText name; EditText pass; Spinner date; String...
i need to display images from mysql in my gallery. i have a responsive template. i have around 40 images in my mysql i want to fetch images and display it in gallery view of 4 column per row and it should go to the next set here is my code for the html gallery <ul class="row box2"> <li ...
I have been googling for a bit and can't really find what I'm looking for. I was wondering if any of you could link me to some websites/tutorials that show you how to make a website that has dynamic updates either if it's a blog or just has an updates page where the admin user can update the sta...
I am using laravel 4 and i want to use Elfinder filemanager but it does not work. I have tested Elfinder on my localhost first. Elfinder works seperately, but not in laravel: This are the includes in my master page. Could there be a problem there? {{HTML::style('filemanager1/css/elfinder.min.cs...
I have a php file generating a diagram as an image - this is working fine This php file has to communicate with javascript (via ajax) to load this image in the html Initially I got it working by placing this in the javascript: document.getElementById("img3").src="ajax.php?area=" +encodeURICompo...
I'm trying to get numbers from a form to become a new column in a mySQL database. Here is my form: <form action="henkehaxx.php" method="post"> Anvnamn: <input type="text" name="anvnamn"><br> Drinkid: <input type="number" name="drinkid"><br> Betyg: <input type="number" name="betyg">
I am trying to put an if statement to get the search box working, but for some reason no data at all comes up: Can you help me to correct the if statement to get it working fine. if (isset($_POST['submit'])) { //capture search term and remove spaces at its both ends if the is any $search...
Why is working? while ($result = mysql_fetch_assoc($query)){...code... } Why is not working? $result = mysql_fetch_assoc($query); while ($result){...code... } Thanks.
I am using this code to split a text into an array: $wordArray = preg_split('#\PL+#u', $text, -1, PREG_SPLIT_NO_EMPTY); Altough this divides google.com into google and com, and what's into what and s. I have to admint preg_split is chinese to me, can you help with this? Example: $text = "Wha...
I am trying to install vanilla magento 1.8.1.0 on a fresh new server, but after installation, on every admin page I go, I have to refresh the page twice to load it correctly. When I just click on a link, only the header loads (without menubar) and the body is empty. If I refresh the page, it loo...
I am currently rebuilding an outdated module for a CMS. The specific CMS is not relevant here but I am working with a minimum of PHP version 5.3.7. While a database is available I want to NOT use the database for the building of this plugin system. Because this module has a bunch of security fl...
I have Mail templates with Variables that I want to display in the email. I add the E-Mail to the Mailer with: $mail->Body = file_get_contents(INCLUDE_PATH."lib/mails/password_revover.php"); but I cant output date('Y'); in the email, how I can solve this?
I'm working on a way to fetch 7 threads from threads table with one attachment (if more then one attachments posted in a thread). I'm using this query; QUERY : $query = $db->query(" SELECT a.thumbnail, t.tid, t.subject FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."pos...
I want to select some id's based on url string but with my code it displays only the first. If i write manual the id's it works great. I have a url like this http://www.mydomain.com/myfile.php?theurl=1,2,3,4,5 (ids) Now in the myfile.php i have my sql connection and: $ids = $_GET['theurl']; (a...
Still working on a simple web app, but am running into an issue where $_POST variables aren't pulling over. edit.php: <link rel="stylesheet" type="text/css" href="includes/styles.css" media="screen" /> <title>Inventory</title> </head> include 'includes/dbconne...
I created a url using Chtml::Link like this: CHtml::link("Remove", '#', array('class' => 'delete'))) Now, when user clicks it i send a ajax request like this: $('.delete').click(function(e) { e.preventDefault(); $.ajax({ url:'" . $this->createUrl('//shop/shoppingCart/delete') . ...
still new to php (3 days) i'm facing a new problem, i have this simple xml file : <iPhone> <anEvent> <data1>some Data</data1> <data2>Some data here </data2> </anEvent> <anEvent> <data1>some Data</data1> <data2>Some data here </data2> </anEvent> </iPhone> What i want...
I have a php calendar which displays all of the dates perfectly on the page but I need the pre-teen dates to display as a 2 digit number ( 01, 02, 03, etc ) but they are not showing up like that - How can I do this as it's important for the end link, i.e. href="events.php?date=20131201" instead o...
I watched other topics, but didn't found an answer. So I'm using CKeditor, and I need to limit the count user could make new lines. So if user makes 4 new lines, output for this would be: <p> </p> <p> </p> <p> </p> <p> </p> I need to block this "feature" and after preg_repl...
I'm trying to incorporate my php login system into the mobile version of the site I'm building with jquery mobile. So at the beginning of my index.php page, I'm requiring init.php, in which session_start(); is called. I'm using the following code to block certain pages depending on whether th...
include('static/routefiles/router.php'); $hai=new Router3; $home=array( '' => array('ALL','title'=>'Home | Adhoks','inc'=>array( 'model/allposts.php', 'model/snapshots.php', 'view/header.php', 'view/rightbar.php', 'view/content/home.php'...
Alright so I saw a question similar to this but thought my situation was a little different and warranted a question. So I am working on a site that allows you to select from two dropdowns. I'm using jQuery to keep track of when these drop downs change. Then based off of the change I update the P...
For a website I host I'm encountering the following error in my Apache error_log: PHP Warning: assert() [function.assert]: Assertion failed in <>/wp-content/plugins/woocommerce-cart-reports/models/AV8_Cart_Receipt.php on line 259 The site is running WordPress 3.6.1 with WooCommerce 2.0.14....
I have been searching for a regex for names but i didn't find the one i want specifically for my situation. The regex that i'm searching should: Be 1 to 50 characters long Accept utf 8 Accept - and _ and ' only in the middle of text Have one or more names so it has to allow spaces Work in php a...
I am new in pagination. In my code the numbers are starting from 1 in 'next' page again and again. It should not start again with 1 and after 10 or user choice input, it should start from 11 and so on. here is my code.please help $aColumns = array( 'question', 'answer'); $sIndexColumn =...
So I basically want to save all interactions happening on a web canvas I built but something is going wrong. So I have the following code on my javascript: Tools.logInteraction=function(x){ var url = 'interaction.php'; $.ajax({ type: "POST", url: url, dataType: 'te...
One of my PHP functions just not work. Mysql returns success but it doesnt UPDATE column that i want. I really no have idea why that problem exist. So here is the function that UPDATING it: function savePhone($phone) { dbConnect(); $q = "UPDATE site SET phone = '$phone' WHERE id = 0"; $r = ...
I have a table user (id VARCHAR(5), name VARCHAR(30)) I used INSERT INTO query in two way: Directly: $sql="INSERT INTO user (id,name) VALUES ('00001','abcd'); ---> result: id(00001), name(abcd). That's the right result. By function: function insert($id,$name) $sql="INSERT INTO us...
I have to copy some image url in magento. The user uploads his products on the admin form, and uplouds a picture only for the smallest size. All type of products have a configurable product. Configurable: Nike short Simple: Nike short S - have picture Simple: Nike short L - don't have pictu...
I want to find difference between 2 dates in php.But I am not getting exact difference. please help me. The output I must get as "2 years 0 months 0 days". But I am getting as "1 years 12 months and 4 days". where I am wrong? $createddate="2015-12-24"; //find difference between the dates presen...
Because I find PDO executions extremely hard to remember and find myself looking back at previous projects or other websites just to remember how to select rows from a database, I decided that I would try and create my own functions that contain the PDO executions and just plug in the data I need...
I am new in php and now i installed wampserver 2.2 application and when i click to Localhost option, the "Unable to connect" page shown in my Firefox browser. this is my www folder: And this is my index.php file: <title> Hello To PHP Learning! </title> </head> ...
I really do like ruby and locomotivecms, but I need to implement PHP code in my sites and there is no way neither to insert ruby code or to rewrite the php code. Could you please recommend PHP framework + PHP content management system with the ability to easily create models in the cms (like in ...
I have a variable $mydata (my code is in php) which includes text and some pictures. Every picture included is in this form : <img src="mypicture.jpg" alt="lala" title="lala" border="0" /> This variable $mydata which has text and images after is inserted into my database (mysql). What i want ...
I am getting following error when trying to fetch image from picassa in my php application Object of class Zend_Http_Response could not be converted to string in C:\wamp\www\test\example\list.php on line 49 Below is my code // load library require_once 'Zend/Loader.php'; Zend_Loader::lo...
it is a very simple question, but the solutions are soo many I'm having a hard time figuring out the different performance issues. Before checking if a shop is open following this method: Find next time business is open; mysql hours calculation I need to check whether the shop is on some holid...
Hello Stackoverflow members, I have a question split into three parts. First of all, what is the most secure web server for linux? I have heard of thttpd but I'm not sure if it is all that secure. What is the most secure server side scripting language? Again I have heard PHP is a mastermin...
I want to start with full disclosure. I am very very novice with SQL. I am working with an energy monitoring system that collects gas/water/electric usage data and stores it in a database on my computer (sql). We have set the database to query the system to help us find peak usage among other ...
i have some issue with Featured Images on my wordpress template. I want to display the thumbnail image of the post in full size inside him and miniature in the blog homepage. where i did it wrong? Waiting for your help. Thanks In advice functions.php http://pastebin.com/XddnXGep page.p...
I have 2 ajax calls one to insert data, one to get data. Together with the functions for select and insert. the console log of the ajax call select is empty. However, when i check phpmyadmin the correct value is there. If i start the game again, there will be 1 value (from previous game) but the ...
I'm using a $_GET function in php to perform functions for my Java server. The website is similar to this: http://api.somewebsite.com/perform/function.php?authkey1=randomMD5&authkey2=randomMD5¶meters=something Where the variables authkey1 and authkey2 represent a randomly generated MD5. The...
I have a problem with circular redirection on the page. I don't know how I can escape it. I have a header page with all the db connectivity and the session check for all the other pages. I need to include it into login page but I don't want the menu to be displayed on it, I only need the header f...
I have this line in blade format {{ Form::text('date', null, array('class' => 'form-control', 'type' => 'Date', 'placeholder' => 'Date' )) }} but when the page loads the type attribute does not get resolved to 'date', it goes to 'text'. How do I get this in blade? <input class="form-control"...
I am moving data from sqlite to webserver(mySql), from iphone to web and php will be landing site which insert data in mysql after getting data in POST format. I am using NSURLConnection in ios. I am confused how to move data, so I figured out that I should append all the data in string from a ta...
I have a number input and I want this field to update a div each time I update the number input. By number input, I mean this: <input type="number" name="year" id="year" min="2013" value="2013"> I added this code piece, but it does not work. How can I achieve this? Thank you very much. <...
I want to build a plugin or component that would take my data array before save, see if there are files to be uploaded (I will check for fields named attachment, image, thumb and gallery), upload them, create thumbnails if needed, write entries in the appropriate tables and modify the data array ...
My insert query isnt adding anything to the database, i checked my syntax and it is correct $id = $_SESSION['id'];//the current book id $name = $_SESSION['username'] ; $rating = $_POST['rate']; $review = $_POST['review']; echo "<br>"; echo "$name"." -$rating"." -$review"; $insert = mysqli_query...
I'm trying to create a custom authenticator and I followed the tutorial here: http://symfony.com/doc/current/cookbook/security/custom_password_authenticator.html But I'm getting this error: ServiceNotFoundException: The service "security.authentication.manager" has a dependency on a non-existe...
i have the variable $uid that always contain a number. I want to execute different actions depending on how the $uid ends. For example: if(&uid ENDS WITH 2,3 or 4) {echo "Some content"}; else if($uid ENDS WITH 1,5 or 6) {echo "Some other content"}; else if($uid ENDS WITH 7,8,9 or 0) {echo "Some...
Right now I'm using the following piece of code to send my push notifications function applePush($deviceToken,$sound,$message,$object,$thread = 0) $passphrase = 'Secret'; $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'secret.pem'); ...
So I have a test DB that is live, I was away for the holidays and come back and my MYSQL DB is wiped of data (only about 8 lines). It was all test data so I am not worried about it, my thoughts is that I was SQL injected through my PHP signup form but I don't see any vulnerabilities here. I am ...
I have .htaccess enabled only for two rewrite URL tasks but I found that it is slowing down the website. Is there any alternative to using .htaccess? I don't have access to httpd.conf on the server as this is shared hosing service so I am looking for something else. This is the .htaccess code: R...
I have a function that extracts the details of an item in a database, and adds it to an array before returning it. Currently, i am trying to query the filepath of any images related to the item and add it to the array.To do this, i run the query with PDO, fetch the filepaths using a WHILE->fetch ...
I'm trying to find the correct way of pulling specific field data from a MySQL database. I am using the $_GET but it shows all the data and id. How can I get the data from a specific ID(primary keys). mysql_connect('localhost', 'root', ''); mysql_select_db('leave'); $sql = "SELECT *...
I'm writing PHPUnit unit tests for this Zend Framework 2 class: namespace MyNamespace\InputFilter; use Zend\InputFilter\Input as ZendInput; use Zend\InputFilter\Factory; use Zend\InputFilter\InputInterface; use MyNamespace\Exception\InvalidParameterException; abstract class AbstractInput...
How can I specify the argument type as an array? Say I have a class named 'Foo': class Foo {} and then I have a function that accepts that class type as an argument: function getFoo(Foo $f) {} When I pass in an array of 'Foo's I get an error, saying: Catchable fatal error: Argument 1 pa...
is that I have already created a system but I am tweaking the admin panel for manual user verifacation. How the system works, Register for your site name iD but when you register you have to confirm your email address before your account to become active, but if for some reason the user can conf...
This is page 2 $var= $_GET['var']; $id= $_GET['id']; echo "Book Title:<br>" .$var. "<br> Book id:".$id."<br>"; $result = mysqli_query($con,"SELECT * FROM books WHERE bookid='$id'"); while ($row = mysqli_fetch_array($result)) { echo "<br><br>Author:<br>".$row['author']...
I am developing a system which has mutliple user levels. However most of the time the views inside each modules should be the same. For example a user view should be 99% identical to the admin view however an admin can have some small extras like delete buttons on user posts etc. What is the be...
Ok, I'm pretty sure I'm stretching Opencart beyond it's normal usage... but I'm trying to figure out the best method of performing this task. I have products in my shop that are software. I have a module that assigns a serial number to the order once it is placed. The serial number is based on w...
I've made encrypting of the password in my register script and in the database encrypted passwords are stored, and for login i have to use them to login, so I would want to use the unencrypted ones to login. I've read some of the threads in here but nothing is helping me, it just doesn't want to ...
This is my first SO question please be kind. Every now and again when building an API you encounter a request which takes a while to process. A long API process can cause the request to timeout. (In my case a PUT or a POST method which involves uploading to and communicating with a third par...
I am currently reading up on a lot of HTML(5) and CSS and so far so good. I am at the point where I can create a -in my opinion- good looking webpage. That aside, I would like to be able to easily have content added to the websites I create, such as blog posts, images, etcetera. Scouting the we...
Here's some background first. 1) My aim is to use Ratchet WebSockets to create two-way client-server communication. 2) I have installed ratchet and accompanying software, as described here. 3) I have successfully created a Hello World application as described here 4) Now I am trying to create Pu...
I need to read a text file into an array in Javascript. 1) I got this basic code off of stackoverflow: var myArray = []; $.get("../MyFile.txt", function(data){ myArray = data.split('\n'); 2) The code works great when called from the original loading of a php page. 3) The ...
Does anyone know how to make a search term stick into the search after the POST is made, which is my current method. I need the search term to stick in the searchbox even after clicking on somthing else in the site. Here is my current code- <input type="text" name="searchterm" <?php if(isset($_...
I'm new to Wordpress and I'm wondering why this loop is only displaying the last image instead of all of the images. Any reference? Here's the link, too: http://87cen.com/desmob/ <?php get_template_part('templates/page', 'header'); ?> <?php get_template_part('templates/content', 'page'); ?> <?p...
I have an issue getting the subcategories from the same table, the subcategories have a parentid that represent the main category. Where i'm wrong ? My structure is the next. Controller: $cats = $this->categories_model->getCategories(); foreach($cats as $ct){ $cat_id = $ct->id;...
i am working on a project, there is concept i dont know how to deal with it. I need to send notification to the user on their mobile device, to understand lets take an example :- like i want to ask to my friend weather he wants to go for movie or not. i need to send notification to his mobile de...
hello friends this is a variable to automatically expire session session_start(); $SESSION['expires_at'] = time() + (300); header("Refresh: 300; url=sessionexpire.com/Log-out.php"); and in the Log-out.php, i destroy the session there and then redirect it to sessionexipre....
I'm trying to make an inventory management system for someone, and one of the goals of it is to just go down an aisle of boxes and go beep-beep-beep with a barcode scanner to log all of UPCs. What I'm trying to do is make it to where when the scanner scans something, the page automatically recogn...
I have been using Symfony2 lately, and I've been following this tutorial: tutorial.co.symblog.co.uk Unfortunately, since the tutorial was written a long time ago, many things are wrong. I've been able to fix most of them through the employment of common sense, but this one is tricky... I'm crea...
I've checked all over, including links like: http://getluky.net/2004/10/04/apachephp-_files-array-mysteriously-empty/ PHP upload file - only $_FILES['name'] is populating Etc and tried all the suggestions but to no avail. I've even went the the extent of var_dumping the $_POST and $_FILES: arr...
I'm fielding a request that someone essentially wants one master page with their logo at the top, and the remainder of the page will load a series of pages (populated by a static array) and then repeat itself. My intent is to have a page load in the 'content' div element, wait a period of time (...
I have the following line of code that displays a user's first name once logged in. I had text that says Welcome, before the echo statement but it looks silly unless you are logged in. Is there a quick way to only display Welcome, if the session FirstName is not empty? <h2><?php echo "".$_SESS...
Lets say we have an image tag but is not w3c valid beacause in the end is missing "/>" : <img src="myfile.png" alt="MyiMage" title="MyImage" border="0" > Then how we can replace this with str_replace par example or an other php function so that we can make this image valid like : <img src="my...
I am planning to run multiple applications in php, asp.net and some other languages in a single dedicated webhost, and have those apps fully available to the public. Some of the apps are now on a LAMP configuration and they are fine at handling ~100,000 users a day. I'm wondering about the down...
I'm using PHP 5.3, and trying to develop a simple web service that gets some parameters with POST method and has a response. function start(){ getAndValidateParams(); global $response; echo json_encode($response); function getAndValidateParams(){ // token (mandatory) if(i...
Due to the need to match the client's environment, I need to downgrade current PHP 5.5.6 to PHP 5.3.16 in XAMPP. Just FYI, the Apache in the current XAMPP is version 2.4.7. Can someone please help me on this matter?
I want to create a facebook-like-box widget in wordpress: <div class="widget-content"> <div class="fb-like-box" data-href="<?php echo $fbpageurl; ?>" data-width="260" data-colorscheme="<?php if ( is_active_sidebar('sidebar-1') ) { ec...
Happy Holidays everyone I am new to PHP so any assistance would greatly appreciated. I am, like a lot of people, working on a web site with PHP and mysql access and I am seeking to write a page where I can set or adjust my site parameters and store them in a mysql table called "Unit_parameters"...
Is there any standard php files that should be included like bootstrap and a config file? These files are extremely useful, are there any other best practice files?
I am having difficulties in setting Behat framework correctly. The test runs fine, however the step definitions are not being picked up from the FeatureContext file. Have tried out answers from other questions with no luck. The behat.yml file is currently stored in the root of the project: defa...
I am using PHP 5.3.6 (Yahoo) and having issues with the saving/retrieving session variables using $_POST. I have recreated the issue in my development environment (PHP 5.5.6) by setting ENABLE_POST_DATA_READING=OFF. I am new to PHP and have struggled 1st figuring out the cause, and now with t...
in fact I am a beginner in the field of API and this is the first time I registered on wunderground.com, and I follow the documentation to generate the key ID. later I found links and codes. Forecast in French http://api.wunderground.com/api/2ea138a9dd52eabe/forecast/lang:FR/q/France/Paris.json...
I was wondering how can I retrieve data from table3 with the use of 2 foreign keys. I will show you my tables first then try to explain what I am trying to do and how I am doing it. Table1 ID Primary key Table2 ID Foreign key foodID Foreign Key Table3 foodID Primary key So I would firs...
I have lessons stored in a table. Theses lessons are repeated every week, so I only store the index of the day (0: Sunday, 1: Monday, etc...) Here's an example: (My real table has much more columns) ID NAME DAY 1 English 1 2 Math 2 3 Physic 3 If I want to get the les...
This question is regarding the protection of a password that I can't hash/encrypt. In my web application I'm salting and encrypting account passwords with the use of BLOWFISH. I've come across a password I can't hash/encrypt as it's the applications external SMTP server. What should I do to secur...
I am trying to make a library system, everything is going well, but I faced with such a error Notice: Undefined index: user_log in C:\xampp\htdocs\e_library\top.php on line 23 and line 23 is here: $user_log = $_SESSION['user_log']; if (isset($_SESSION['user_log']))...
I am trying to set permissions to users and when i put this in my database config code public function hasPermission($key) { $group = $this->_db->get('groups', array('id', '=', $this->data()->group)); print_r($group->first()); with the combination of this code that is in in my my ho...
I'm just having some trouble initializing a DataTable using Ajax and PHP. According to the inspector the error is: Uncaught TypeError: Cannot read property 'length' of undefined jquery.dataTables.js:2649 (anonymous function) jquery.dataTables.js:2649 oSettings.jqXHR.$.ajax.success jquery.dataTab...
Hello What is the difference between SiteUrl() and BaseUrl() In my previous project it is base url but now in my new project it is Siteurl.Why this happens? Is baseurl() is an outdated one
i am trying to upload a file using ftp class of codeigniter for that i have written the following: $this->load->library('ftp'); $config['hostname'] = '127.0.0.1'; $config['username'] = 'localftp'; $config['password'] = ''; $config['debug'] = TRUE; ...
I read somewhere that when you define a function you can define a default value for a variable that you might use or not use, like so: function test( $a, $b, $c=0 ) { if ( $c != 0 ) echo 'a + b + c = '.( $a + $b + $c); echo 'a + b = '.( $a + $b ); I was wondering...
date_default_timezone_set('GMT'); $datetime = array( 'year' => date('Y', time()), 'month' => date('m', time()), 'day' => date('d', time()), 'hour' => date('G', time()), 'minute' => date('i', time()), 'second' => date('s', time()), I use this...
hey guys i just wanted to ask on the norm for making links. ok so basically i have the links on top of my page, home , about us and what not. now this menu is in common for all my pages, so id be super efficient and just load in the content in a div called content. so basically my question is...
I have been playing with xpath and I can get it to work when I select paragraphs however this text doesn't seem to be working. Here is the html <span id="favorite_count" style="display: block;"> <span style="cursor:help; border-bottom: 1px dotted black;" title="Active members who have made you...
How do I set a color by condition eg: In my table there is a column called STATUS where receive the result from db. with three texts: PG, PEN, ATR. If status is PG, then color green, PEN color red etc.. How to do that?
I want customer to choose from 2 options same day delivery or standard delivery with 2 different delivery charges, can anyone help please, I am stuck in this. Thank you
I have the below line of code in the FuelPHP view file (php) and I am converting the project code from PHP template to TWIG template engine. <?php echo Html::anchor('quiz/edit/'.$quiz->id, 'Edit'); ?> How can I convert the below line of code to work with TWIG template? I tried the below thing...
I can't seem to find anything in the php.net documentation that explains the following results: $ php -r 'var_dump(bcsub("0.3", "0.2", 4));' string(6) "0.1000" $ php -r 'var_dump(bcmul("0.3", "0.2", 4));' string(4) "0.06" The subtraction result is exactly what I would expect it to be (I specif...
I want to select the user from my database using email or username, my code is: $sql = "SELECT * FROM `users` WHERE (`Email`='".$User."' OR `Username`='".$User."'') AND `Password`='".$Password."'";
I wanted to make a script to order some rows from a database with drag & drop. The rows are displayed in a table, and I drag and drop rows to reorder them. Each tr have the row id from database. When I drag and drop a row, jquery serialize the table content and sends it to php to save rows positi...
Please help me. I'm at a total loss. After more than 2 days of Googling everything I can think of, I still have no answers. This DID work in the Sandbox. My code for sending the tx and token to Paypal. <form name='verification' action='https://www.paypal.com/cgi-bin/webscr' method='post'> ...
I had localhost setup and everything was working fine. I wanted to create different virtualhost's to target specific projects and was going to setup git repository for each. I was "/Users/michaelmartinho/Work/development" then decided to change to "/Users/michaelmartinho/Work/development/project_...
Imagine I have a script abc.js, which has one global variable userid. Several AJAX requests are made instantly after it is loaded (it can happen after or before DOM is parsed by browser). I need the script to have different variable value for different users. Requests has to be made instantaneous...
Dear I am setting my Variable Value in PHP Code, When I access this in JavaScript, it does not work, I am using following code, $off='some value'; JavaScript : <script> var host00 = "<?php echo $off; ?>"; alert(host00); </script> But when it is triggered, the only Blank Alert is...
I have a lot of files to pack to one zip file. It will took a lot of time (maybe 1-2 hour). Zip packing is initiated by user from browser. I need to get a way how I can run zip independently in system (CentOS) and be capable to get information about process from PHP to let the user know how much ...
I'm using Wikimedia. I need to create a dynamic table for some articles. For instance, given a page called "Lupo", I need to query the DB, find the entry using the code "Lupo" (same value as the article title) and generate a table with some data provided by the query resultset. I'm trying to do...
I want to access an Oracle database that is on a remote Linux server with my company's intranet. Currently I can access it through Excel and a System DSN on my Windows 7 machine. But I am running into difficulties with multiple queries in my excel spreadsheet, so I want to create a web page tha...
I'm attempting to connect to a SQL Azure database via PHP running on an Ubuntu 11.04 server. The server is running PHP Version => 5.3.5-1ubuntu7.11. I've installed freetds-bin, freetds-common, tdsodbc, odbcinst, php5-odbc and unixodbc using apt-get install multiple times. I attempted to compile...
i have database configured and showing the query output also php code that sending test mail to gmail user but i need to mix that two codes so i mail the output of query to a gmail contact. following are two codes that perfectly working separately. SELECT * FROM emp WHERE MONTH(dob) = MONTH(NOW(...
I am reading an excel spreadsheet with PHP COM utility, everything is working fine except there are some cells in Excel file having different language data. When I read this data through PHP Com it displays like ??????? $ExlApp = new COM ( "Excel.Application" ); $workbook = $ExlApp->open_workboo...
well this is really weird so i got this code for timeout user so he automatically logs out if 500 second passed since last time being active i put this in the upper bar since it's on all my pages if(!isset($_SESSION)) session_start(); if(isset($_SESSION['time'])) if ($_SESSION['time'] + 600 < ...
<?php include('common.php'); if(!(isset($_SESSION['adminUsername']))) header("location:index.php"); <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">...
The data is retrieved from the database then encoded into JSON data, then passed into the view: $json_data = json_encode(array('questions' => $x)); $search_results['search_results'] = $json_data; $this->load->view('findquestions',$search_results); which looks like: {"questions":[{...
I have a string like this 'Hello? My name is Ben! @ My age is 32.' I want to change it into an array will all words, spaces and punctuation as seperate entities in the array. For example if I did var_dump($sentence) the array should look like this: array(10) { string(5) "Hello" [1]=>...
thanks for reading. it is basic, but new to PHP world. suggest me some solution to get complete this work. I'm using wordpress and gravity forms. it is an user registration form, and having name/age/phone/... all the details. Work is simply I need to age and phone number before showing the for...
I want some PHP to do the following in this order: Gain exclusive lock to a file (waiting if already locked) Read the contents of the file Empty the file of all contents Remove the lock But any code I'm coming up with one way or another always relinquishes the lock between the reading and wri...
I'm creating a login page, and I have this code to check if a user with a given username exists. Here's the code: $query = mysql_query('SELECT COUNT(id) FROM users WHERE username = $tuser'); return mysql_result($query, 0)==1; I know that the value of $tuser exists in the database, and when I r...
I have to design a database for an advert site. Until now this is the design i came up with: Administrator(Id,Name,Password) Advert(Advert_Id,Title,Description,Category,User,Date_created,Picture,Type) User(User_Id, Name ,Phone,email,Address) Category(Cat_id,Cat_Name) Type(...
Say I have a text file with a bunch of lines (the real text file has a LOT more): Testing Another line ABCDEFG How can I remove a random amount of lines from this file with PHP? So that means, I can specify how many lines I want to remove randomly. From what I know so far, I believe...
This is a snippet of code with some lines commented out. It seems to work if I send one case using all literals (not variables) but when I throw the ". $uid . " and the others in there it does not work. I keep checking the database after each use to see. <?php // working name and pics ...
Is there any way to use Facebook PHP SDK to Login and Logout users only for my site. Currently with the tutorials and examples provided, if i Logout from the website automatically will Logout even from Facebook.com.
I keep getting this error "Fatal error: Call to a member function children() on a non-object in /home/radiomov/public_html/rss.php on line 37" Line 37: $image = (string) $xml->channel->item[$i]->children('http://search.yahoo.com/mrss/')->thumbnail->attributes()->url; Here is the fu...
Yii bootstrap widgets TbDatePicker not hiding after select a date. echo $form->labelEx($modelRenterStatus,'moving_date'); $this->widget('bootstrap.widgets.TbDatePicker', array( 'model' => $modelRenterStatus, 'attribute' => 'moving_date', 'options' => array( ...
I have several PNG format Imagick objects which are intended as individual frames for an animated GIF. How would I convert these frames into a single animated GIF?
<?php $string="Hello how are ##you ? I want ##join you."; echo $string; // now I want replace all ##.... words with <a>##.....</a> // example Hello how are <a>##you</a> ? I want <a>##join you</a>. Now I want replace all ##.... words with ##..... example Hello how are ##you ? I want ##joi...
I want to display a table (I get entries from MySQl-Table). The user who sees the tabel should be able to decide if he wants to make some rows or columns invisible for print. The invisible rows and columns would be stored in extra box, so that the user can make them visible again. Is there maybe ...
erm...i remember last year i use the jquery ajax post, i can simply get the post data by typing $_POST['param'], then today i got some project use ajax, then i load the latest jquery lib, i use the following code <script type="text/javascript"> $(document).on('submit', '.ajaxform', function(...
I have this code to write some data previously scrapped to my database. I need to check inside the final foreach before write if the book already exist by checking his ISBN number with PDO. How I achieve this by using PDO? $dbUser = 'ebook_scraping'; //Database username $dbPass = 'scr4p1ng'; /...
暴走的毛衣 · PHP 8 error: htmlspecialchars(): Argument #1 ($string) must be of type string, array given - Joomla! 3 周前 |
心软的夕阳 · PHP: shuffle - Manual 3 周前 |
善良的牙膏 · 阿里巴巴最新组织架构大轮岗,融合仍然是主题 - 脉脉 1 月前 |
活泼的红金鱼 · 地质灾害航空遥感技术应用现状及展望 4 月前 |