« first day (259 days earlier)      last day (51 days later) » 

4:08 AM
0
Q: wp_enqueue & youtube API on different templates

vytflaI'm trying to use the youtube API on two of my template pages. Obviously I want to enqueue it correctly. When I put this code in my footer.php page, I got it to work: <script type="text/javascript" src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script> <script src="http...

0
Q: using Document.get elementbyid

Kiran RSSubject:- VAlidation is not working by using document.get element by id. I have the following javascript code in my page. <script type="text/javascript"> function validate(){ var name=document.getelementbyid("send"); if(name==""||name==null) { alert("Please enter your name") return false;...

0
Q: Returning more then one row from DB

Jess McKenzieAs you can see in my code below I am using ->row()->$db_field;. I somehow need to manipulate this so I can return $db_field and $db_field1. What do I need to do to be able to return both rows? Code: if ($query_country->num_rows() > 0) { return $query_country->row()->$db_field; }

0
Q: How to show invisible buttons after clicking on checkbox in php?

Sumit RathoreI am using php to connect to a database and show all rows of a table as a table on a webpage. Now what i want is to have a checkbox and a hidden button in each row so that when i click on a checkbox in a row then corresponding button of that row become visible and when i click on that button the...

0
Q: Executing Python Script with PHP Variables

MicahI am writing a simple application that uses information from a form, passes it through $_POST to a PHP script that executes a python script and outputs the results. The problem I am having is that my python script is not actually running with the arguments being passed in. process3.php file: <...

0
Q: Php reading Foxpro DBF file

Georges C ZinhoI need to do a record search and display in a Foxpro dbf file using PHP. My dbf file name icitem.DBF, i am using ODBC and OLEDB methods but both return errors. Method 1: I manage to install the foxpro ODBC driver and create a system DNS, below is my php script and output. php script: $odbc = o...

0
Q: PHP writing into text file while looping

sravisI'm developing an app where user upload excel [.xlsx] file for dumping data into MySQL database. I have programmed in such a way that there is a LOG created for each import. So that user can see if there is any error occurred and etc.. My script was working perfectly before implementing the log s...

0
Q: Zend Framewrok 2 return ViewModel not working

yunhasnawaI created a Zend Framework 2 admin website based on Zend's Album example. Everything works in HomeController which is acted as my default controller. However when I created another controller, the view won't loaded. This is my code in indexAction. class UserController extends AbstractActionContr...

-2
Q: How to better scrape YouTube URLs from site?

JasonI'm trying to get a list of YouTube URLs by scraping the URLs from a site where people generally post them. I enjoy the content posted so I'd like to automate it and watch the videos later. It's just something fun I'm trying. Here is what I have so far: <?php $website = file_get_contents('http...

0
Q: GAE php "urlfetch error"

user2954939i want to get a webpage content via my gae php application. but the code doesn't work. my code is: echo file_get_contents("http://www.navyfield.com", false); and i tried my code on php-minishell,http://php-minishell.appspot.com/ it didnt work either. here is the result Google App Engine/1.8...

0
Q: Grails, how to fill a form from database?

user2954933i'm doing a Grails app for school but i'm having some trouble. What i need to do is, (form a DB called students) fill a form with: ID (user will provide this one) Name (from DB) Specialty (form DB) i don't really know if this can be done whit this: Filling a form in JSP with ajax thank you in...

0
Q: Getting radio selection in PHP returns on not the value

user2954911I am trying to get the value of the selected radio button using php. But when I try to echo the value of the radio it returns 'on', no matter which radio button is selected when I submit the form. HTML: <legend>Question 2</legend> <p>Where was CoffeeScripts first stable build announ...

0
Q: PHP can't pick up file

AndrewI've been trying to create a registration form that requires students to upload documents at the very end. However, after picking up the form values via jQuery, the PHP document can't seem to pick up my uploaded form. Any ideas? Form: <form id="joinUs" enctype="multipart/form-data" method="p...

0
Q: How can I use inheritance with PDO?

NicoI need to build a microframework. I have a generic model where the real models would inherit from. How can I inherit a sql query like "select * from table_name" using pdo knowing I can't bind the query's table name? I hope I've explained myself, thanks.

0
Q: Can I used memcached selectively?

OC2PSHow does memcached really work? If I have 5 different Percona MySQL databases d1, d2..d5, each serving a different PHP application a1, a2..a5 respectively, then can I just try to boost d1 with memcached? I understand that memcached changes a lot and that in order to use it, I'll have to "tweak...

0
Q: Showing fatal error call to undefined function _e() in wordpress

MelvinPlease help me out I have added a search box widget to my site http://www.immostwanted.com. And when I am trying to search some item it is showing the error as Fatal error: Call to undefined function e_() in /home/spencerj/public_html/immostwanted.com/wp-content/themes/proreview/search.php on li...

0
Q: PHP OCI error oci_bind_by_name

LireoecI have been trying to get this function to work, for context it is meant to be a session fetcher for my online store. It keeps erroring out on the oci_bind_by_name line. I was wondering why this is the case and possible solutions to this problem. function getSessionID($customerID) { global $...

0
Q: aligning images and its details side by side in shopping cart

user2934937I am developing a shopping cart. In the first page I have to display all the items.I have to display item's image,price and a link to vie about its details.I need to display the items and its details side by side. Just like online shopping cart sites. Can you please help me. I don't need a slider...

0
Q: Add 'textarea' Field Product Opencart

Ashish VermaI need to add a custom field 'textarea', same as Description with CKeditor in products. Steps I have followed: Created a column 'contents" in product table through following sql command: ALTER TABLE `product` ADD `contents` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ; File: a...

 
4:56 AM
0
Q: Ajax how to disable div or item

user2434677Im new to ajax, is there away you can help me, how to disable all items once click is successful: here is my code for ajax: if (!parent.hasClass('.disabled')) { // vote up action if (action == 'click') { alert("test"); }; //how do i a...

0
Q: Studio is not working in Sugar 7.0

user2955009I am newbie to Sugar 7.0. I am trying to open Studio but studio is not working, it only display the nothing. I have searched alot, but not found any solution. Can any body tell me that whats the problem with Sugar7's Studio ? Thanks

0
Q: sending checked box values to php script to process via jquery

saintI have a table with four columns with a checkbox at the end of each row. I would like to know if there is a way of writing a jquery function that will select all the values of each row when the check box has been ticked and the submit button has been clicked.. and then pass the values to .php fil...

0
Q: How to get etra json data from the server using JQueryUI autocomplete after selecting an item

user2944805after selecting an item on the returned results, how do i alert another item from php? here's plugin settings. $(function() { $( "#SearchInput").autocomplete({ source: '../Search/BP_Search.php', minLength: 1, autoFocus: false, select: func...

0
Q: PHP Login Page Redirect

user2896254this code is incomplete and I need it to redirect to a page called mainpage.php with hardcoded information for the username and password. Here's the code. <?php session_start(); $username="user"; $password="123"; if($_POST['username'] == $username && $_POST['password'] == $password) ?> <html> ...

0
Q: Php not parsing new line in variable obtained from GET request

user2954995I am writing a plugin in which I need the user to be able to download a csv created on the fly (I don't want to use up server space). I have the text I need to print to csv pinted in a hidden element in a form, which I then echo and create csv using fopen and fclose. The problem is that new line...

0
Q: JSONException:Android Can't connect MySQL and PHP

George EdwardJAVA Code: ![protected String doInBackground(String... args) { // Building Parameters List<NameValuePair> params = new ArrayList<NameValuePair>(); // getting JSON string from URL JSONObject json = jParser.makeHttpRequest(url_all_products, "GET", p...

0
Q: Send Javascript variable to PHP to be saved to DB

user2872697Hi I am new to PHP and javascript, am unable to send a variable from Javascript to PHP page. My Javascript code is separate .js file where I have declared a variable count which incremented at each correct answer that user gives. I wanted to pass this data to PHP page so that I can save it to dat...

0
Q: php mass mail get blocked by gmail

shanavasWe want to send mail to our 5000 users about their account details every day We are using php CodeIgniter mail function to send mails with loop Now our users especially gmail are not receiving mails, We are getting mail logs as gmail has temporerly blocked our ip Someone please help me how We c...

0
Q: how to connect to different ip address using php socket programing

Rincy Raphaeli am running wampserver in one system and its ip address is 172.16.127.105. i took this as my server and run the server program server.php as { // set some variables $host = "172.16.127.105"; $port = 25003; // don't timeout! set_time_limit(0); // create socket $socket = socket_create(AF_IN...

0
Q: I need to match all characters in a group as long as they don't match a certain word

Fred GarbuttI'm not sure if this is a simple question, but i have been unable to find an answer to it thus far. I am trying to write a regular expression that pulls apart a .docx file and matches replaces all <w:tab /> tags with <w:ind /> tags, as the <w:tab> tags don't seem to preserve tabs correctly when t...

0
Q: multiples INSERT INTO SQL and PHP

user2955030$DEVICE_REQUEST_ARRAY = $_POST['DEVICE_REQUEST']; foreach ($DEVICE_REQUEST_ARRAY as $value_set) { foreach ($value_set as $key=>$request){ echo $key ." ".$request."<br/>"; $query = "INSERT INTO master_request_devices ( '{$key}'...

0
Q: who does PHP's YIELD->send() works?

learning phpfunction yielding() { for ($i = 0; $i < 10; $i++) { var_dump(yield); } } $y = yielding(); foreach ($y as $val) { $y->send('foo'); } output: string(3) "foo" NULL string(3) "foo" NULL string(3) "foo" NULL string(3) "foo" NULL string(3) "foo" i expected the output to be: 1...

0
Q: RegEx to process and change multiple links in a string

marcnycI am having a hard time figuring this out: I have a string ($data) which contains some links formatted this way: [pagelink]Folder/File[/pagelink] The $data contains multiple of these links. I need to replace these links with actual html links and I have this code to do it (which works): $da...

0
Q: how to show square root symbol in php code using gd library?

Kiran RSI am now dealing with a mathematical problem with my codes. I have second degree equation , for example , ax^2+bx+c=z . If we have to find the value of 'X', we have the eqution , x=(-b +/- root(b^2-4ac))/2a. The main heaach is i've to show the square root symbol in image using gd library. But i...

0
Q: The appropriate way to securely use flash in webpage

Thanos DarkadakisI will start with an intro to prevent you making specific questions. Introduction I have no idea about flash programing. What i do know, is that when i browse a page that contains a flash object, i can somehow save it in my computer. I just want to know (before i start learning flash coding) if...

0
Q: Internet Explorer cannot display drop down menu properly

niaizahraWhen i run my project in IE8 my drop down menu in navigation bar seems not working properly as in Chrome and Firefox. Its appear in bullet forms that line in the left side of the page.See the image below. This happen when i try to alter the URL of my existing website. I put all my php file ins...

0
Q: PHP special names - simple explanation needed

cactusboatCan someone please explain how i would answer the questions below, simply, so I am able to work it out myself. I have the questions together with their answers at the bottom. Consider the following code and complete the incomplete entries in the table: <?php class Employee { ...

0
Q: Extend ModuleAdminController Add/Edit not working

Amb3rL4nnSo this seems really dumb question maybe and basically a text book implementation. But when using the Add/Edit buttons created by the renderList() the submitted fields are empty. I have gone into the core ObjectModel class and output the results and indeed no data is passing back. From what I ...

 
5:38 AM
0
Q: php form post not sending email

Michael McLaughlinSo I was able to get the user all the way to the thank you page, but when I check my email (which is correct in the real code), I had nothing. any help would be appreciated. <?php $myemail = "myEmailInAString@gmail.com"; $name = check_input($_POST['full_name'], "Enter your name"); $phone = che...

0
Q: Why does php md5() always different from python's hash.md5() if using chinese character?

ruibinhere is my php code: $str = '你好'; $input_encoding = mb_detect_encoding($str, array('ASCII','GB2312','GBK','UTF-8'), true); echo sprintf('input encoding:%s', $input_encoding); $str_gb = iconv($input_encoding, 'GBK', true); echo sprintf("utf8 encoding:%s\n", $str); echo sprintf("gb encoding md5:%...

1
Q: PHP Class not echoing properly

TrauliaSo im in the process of learning php and classes is giving me trouble here, this code if im not mistaken should echo out Blue and Dusty but for some reason it is sticking to the default green <?php class World { public $color = 'green'; public function __construct($color) { $this->$colo...

0
Q: Passing PHP session to different folder

user2955076how do you pass a PHP session value to different folders? I have this index page in the localhost. localhost/index.php <?php session_start(); $_SESSION['Username'] = 'Hello'; header('Location: ../AnotherFolder/index.php'); ?> In here, I want to echo the $_SESSION['Username'] on other s...

0
Q: php's FINALLY is for Uncaught exception?

learning phpFor what is can see, the only difference between putting code inside finally block and outside finally block is that the code inside finally block will be executed when if there is an uncaught exception while code after try-catch-block that is not inside finally-block will not be executed. am i c...

0
Q: Php syntax error confusion

jayadevkvI have been using php simple image libraray for image manipulation quite a while(and never come across this error before). Now the script stops throwing a syntax error when the code is put online and there is no error occurring in the local server The error that shows: **Parse error: syntax e...

0
Q: yii grid does not follow page size

EnricoI have this typical search in yii. All works well except that the grid view does not display all the results. the headers says "Displaying result 1-2 of 6 results" although the page size in dropdown is set to 20. here's my dataprovider public function search() { // Warning: Please modify ...

-1
Q: How to center username and password textbox

user2896254I'm trying to get the admin login to center in the middle so that it looks better, here's the code. <?php session_start(); $username="user"; $password="123"; if(isset($_POST['username']) && $_POST['password'] == $password) { header("Location: mainpage.php"); } else { ?> <html> <head> ...

 
6:08 AM
0
Q: PHP include statement different between servers

tPlummerWorking on a win2009R2/IIS7 server, this php include statement was valid: include('/path/file.php'); Moving over to a shared Linux CPanel server, it is not. I have to instead do this: include('path/file.php'); When I first wrote the code, I was under the impression that the opening / meant...

-2
Q: I am getting error Can't connect to MySQL server on 'Host ip address' (110)

RedSunI am getting error "Can't connect to MySQL server on 'Host ip address' (110)" I am using FileZilla Client and phpmyadmin

0
Q: SwiftMailer Help - PHP Contact Form w/ File Attachment

712JeffersonTrying to do something seemingly very simple: write a script for a contact page that allows the user to input a few basic lines of info, attach a file and e-mail it to a fixed address. My, how this has turned into such a headache! Here's the page in question: http://www.starcrestescrow.com/form...

0
Q: Remove .php extension is not working

UserProgI found a lot of tutorials and questions regarding to removing the .php extension in the URL. I have tried a lot of examples and until now it is still not working. This drives me crazy. I also want to put trailing slash at the end of the URL but first I would like to achieve this first. Currently...

0
Q: no-www url for sub-directory/sub-domain

Raj ツSay example my domain is http://www.domain.com and i wanted to redirect into no-www url (http://domain.com), for that i used this code in .htaccess RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] It's working fine http://www.domain.com redirects to http://do...

0
Q: how to use javascript in php when there is a header?

mishir.aliif(($row["status"])!="valid") { $stats=$row["status"]; echo "<script type='text/javascript'>"; echo "alert('Your Status is $stats..Please Try Again Later...');"; echo "</script>"; header ("location: index.php"); } it is a part of a php code. if i use // before header, javasc...

0
Q: i m having caution of Deprecated: Function eregi() is deprecated in url code

saiyyedfardeenhttp://fastseoindia.com is my site... on below link http://fastseoindia.com/tools/robots-txt-checker/ when you insert your website link... it will show you your site's robots.txt but will give error on top... Deprecated: Function eregi() is deprecated in /home/hjlhvqyy/public_html/fastseoi...

0
Q: Php doesnt execute when coming from window.location

user2509768I have a php file named "savegame.php". I use xampp. When i enter "localhost/morabaraba/savegame.php" as a url manually it works i have a file "index.html" in the same folder as my "savegame.php" file and using window.location = "savegame.php" redirects to c:\....\morabaraba\savegame.php but it...

0
Q: I want to select record multiple key with like

shaktiI want to select record from table with key.My code is working but it's not select all record regarding Php and Mysql it select only PHP,Mysql record. My code is $skill=PHP,Mysql; mysql_query("select * from tablename(skill) where fieldname(key) like '%$skill%'");

0
Q: Heroku Scheduler and PHP

PoochI have seen many instructions using Heroku Scheduler , but none explain how to use PHP with it. Would anyone have a good example of PHP being used with the Heroku Scheduler? I don't want to be pointed to something that isn't with PHP, since all the replies i saw to similar questions did not show ...

0
Q: Postgresql 8.3 "shadow user"?

MuhvI have currently online working system (SunOS 5.10 i386/PostgreSQL 8.3). Now i need to create new "shadow" user who has read-only access to same data as working system from other server (Ubuntu/PHP). netstat shows that postgres listens all netw. interfaces. Unfortunately I dont have any experie...

0
Q: Echo to another page

user2896254How do I get the input from this textbox to show up on another page called mainpage.php. Here's the code for the form that I want outputted onto the mainpage.php <form action="" method="get"> <b>Bio</b> <br> <textarea rows="5" cols="20" name="result" value="result"></textarea> <br> <input type="...

0
Q: Fatal error: Call to a member function prepare() - On call function more one times

user2594631I have a problem on call this function more one times Index.php <?php function check_status($id){ require_once ('inc/connect.php'); try { $query = $db->prepare('SELECT `usage` FROM `room` WHERE `id` = :id'); $query->execute(array(':id' => $id)); $row = $query ->fetch(PDO::FETCH_NUM); }catch (P...

0
Q: PHP Email Pixel Tracking Not Firing in Yahoo Mail

MicahIn order to track email open rates, I'm firing a pixel in a mass email I'm sending from my server. The script is working in Mac Mail and Gmail email clients. The email is received and the pixel is downloaded. However, it's not working in the Yahoo mail client. The email is received, however the...

0
Q: Preg Match checking in PHP

WarriorI have pattern like this 'D34566'. how i can check this pattern contains in the given string. String = D34566-Test Case. Pattern = D followed by 5 digits. i.e A word starting with D and followed by 5 digits.

0
Q: any way in PHP to access the KEY of YIELD outside FOREACH?

learning phpIs there a way to access the KEY of the YIELD or it is acceptable only through foreach loop? function foo() { yield 'bar' => 'baz'; } $foo = foo(); foreach ($foo as $key => $val) echo $key; // output: bar $foo = foo(); echo key($foo->current()); //Warning: key() expects parameter 1 t...

0
Q: mail gt marked as spam by gmail, any solutions?

Rickyi am using php code to send a mail with an attachment in my web application. all are working fine expect gmail marked it as spam. my code is look like below. move_uploaded_file($_FILES["file"]["tmp_name"],$path . $_FILES["file"]["name"]); $filename = $_FILES["file"]["name"]; ...

0
Q: English to Arabic conversion in buddy press

Kiren SivaI want to translate English to Arabic in wordpress (buddy press). In php $reason = __(sprintf("Wave limit has been exceeded for today, you can wave %s tomorrow",$user),"buddypress"); In buddypress.pot #: wave msgid "Wave limit has been exceeded for today, you can wave %s tomorrow" msg...

0
Q: PHP session_id() refresh on every request, $_COOKIE['PHPSESSID'] empty

user2780294I can't figure out why, but tried all answers/google.. I found nothing. Here's the situation: Localhost code session_start(); echo session_id(); print_r($_COOKIE['PHPSESSID']); Result: Consistent session_id() across app pages, and on page refresh. $_COOKIE['PHPSESSID'] matches th...

0
Q: Session randomly expire and logs out SOME of my users

Marcus LindI'm having issues with users of my website complaining about getting logged out automatically multiple times while using my serivce, however I can't reproduce the error and the issue does not seem to effect every user, since I have hundreds of users that is using the service fine without complain...

0
Q: PHP sort assosiative array by key

user2629419I have a associative array in the following format: How to sort the array by 'c_name' in ascending order Array ( [country_detials] => Array ( [0] => Array ( [c_id] => AD [c_name] => Andorra ...

0
Q: Ajax call on yii dialog box close function fails

not.your.ordinary.girlI have this problem with using ajax call on dialog box close function. Here's my ajax call function: function samplefunction(var1,var2){ $.ajax({ url: "controllerFunction?var1="+var1+"&var2="+var2, type: 'POST', dataType: 'json', success: function(data)...

0
Q: why does the it displays the php file as text?

user2955204i know this question has been asked befor but i really didn't understand anything out of the answers. i don't know much about php i just wanted to connect my html website into a php file that will save all the password into a text file. but when i enter a random password and it directs me into th...

0
Q: Need a help on logs with codeignitor?

tpdevI have used code ignitor framework.Have used its log part. I had a query regarding configuring logs in the application. As per the documentation they say that we can configure in app/config/php and filter the logs as debug,error or info messages. But even after doing that, I am not able to filter...

-1
Q: Saving to MySQL TIME and DATE data types through PHP

JRulzI need to store date in DATE type and time in TIME type in a MySQL database table. I have found many ways such as formatting and converting from unix time etc. but whats the most straightforward, simplest way to create data to store as DATE and TIME types in MySQL when using PHP.

0
Q: Use a trait conditionally in PHP

MouliI want to use a trait in a class, only if a condition is satisfied. For example: trait T { } class A { if ($condition) { use T; } } I know I can't use if directly in class. So, I'm looking for a way to use traits conditionally similar to the above. Is it possible?

0
Q: Object not found! codeigniter control

gabrielhy all, can you help me friends... I get error : if(count($q_cek_login->result())>0) { foreach($q_cek_login->result() as $qck) { if($qck->ID_JABATAN==1) { foreach($q_cek_login->result() as $qad) { $s...

0
Q: log4php logger's additivity

Shivan RaptorIn log4php configuration documentation, there is a configuration option called "additivity" which stops the inheritance from root loggers. However, I added to the PHP-format configuration file, root logger is still logging the entry that supposed to appear inside logger queryLogger only: <?php ...

0
Q: loading only new data from database instead of loading all data using loop

user2955239I am in the middle of a social networking site. I am stuck in the status update process. I want to show the status when some status update takes place. Is there a way so that instead of using loop to load and show all the status, i load only the new status and previous status remains on the profi...

0
Q: Implementing a html markup with PHP in OpenCart, How?

Gary DapogiNo PHP skills yet, I've just learned HTML/CSS and think I'm already good at it, but still not in PHP. I am developing my own OpenCart Store and also making it as my practice environment for html/css. I've installed a paid module to make a product option as custom product field. I've already set ...

0
Q: How to Implement queue in php?

user2955245I am having data base with contact numbers of users suppose 123,1234,456,123,456,... Now I have 2 callers and I want that there will be queue so that no repeated call will be made. Both the callers are making calls at the same time. In simple both the caller will have distinct contact numbers...

0
Q: custom module routing is not working in magento

rajeevktomyi am a beginner in magento. I have added a custom module and made routing for that custom module. however it is not displaying anything at all, showing a blank page!!!! Not even the page not found message. here is my code.. my config file is as follows app/code/local/Test/Test/etc/config.xml <c...

0
Q: php display data in div, h1, ul using while loop

user1462863I am not very good in php and mysql but based on my code, I am able to display the results that I wanted but, it is not displaying in the right DOM structure. I would like to display like below: <div class="container"> <h1>Header</h1> <ul><li> <p>data 1</p> <p>data 2</p> </li></ul> </div> <div...

0
Q: Laravel 4, default Email queue priority

Marek SzymeczkoI've configured Beanstalkd for my Laravel 4 application. I've got two queue events I need to handle. One is some calculation for each user (one calculation per user) and the second one is mailing. The question is, do I have to implement Queue priorities? Or does Laravel 4 have those things hand...

0
Q: PHP not properly passing UTF-16 String to Python

MichaelMitchellI am passing a UTF-16 String from PHP to Python, the String comes in from a header to PHP, then is passed/executed with this: $mystring = system( "python test.py {$_SERVER['HTTP_EVE_SHIPNAME']}" ); The header being {$_SERVER['HTTP_EVE_SHIPNAME']}. My Python code: import sys shipName = sys.arg...

-1
Q: How to save Facebook Post ID to mysql database?

Jben KayeI have a program (an app) which ask for user input then generate an image and post the image link to FB timeline. now i want to do is to get the POSTID and save it to my database. so i can have a record which i can retrieve if ever i want to connect to the FB POST. how can i do this? below is the...

0
Q: Execute a line of php before ajax submission

Greg LI have a function in wordpress that handles the uploading of files to the wordpress image gallery. After converting the form to ajax, I realized the file upload no longer works. The thing is, if I could just get the function to execute before the ajax it would work. Here is the code: function ...

0
Q: Store Cached image path in Sqlite database

David KimzI can download images from the web and save them to Cache, now I need to store their path in SQLite Database. Any help please !! thanx in advance. Below is my code Snippet with help from http://www.androidhive.info: //Saving Cached Images to File E_Meges...

0
Q: How to loop the input type text?

user2901740How can I loop the input type text so that it can have it's own unique attribute eg. name, value. What I mean is that for example name="text1", name="text2",. Something like that. Here is my code. Thanks :) <HTML> <HEAD> <TITLE></TITLE> <SCRIPT language="javascript"> function add...

-1
Q: How to return constant value from string in php?

Jobaer ShumanHere is constants: define('Qc', 1); define('D1', 1); define('D2', 1); define('S1D1', 1); define('E1D1', 1); define('E1D2', 1); define('An', 1); define('D3', 1); Formula comes from database: $formula = "Qc + D1 + D2 + S1D1 + E1D1 + E1D2 + An + ...

0
Q: php mail to send a PDF attachment and receive a confirmation message

J HI'm a relative novice trying to write code so that: 1) a user can fill in a form with their email address and (optional) their name and a message body 2) I send them a reply message automatically with a pdf they requested 3) I get an email with their email address (and name and message if they...

0
Q: file type upload is not working on windows 8 phone?

Bhattiwhat is the alternate of input type file for windows base mobiles, i can see the browse button but when we touch on browse button nothing work. Ref to: http://viljamis.com/blog/2012/file-upload-support-on-mobile/ *what is the quick solution to replace input type file * My Code <input id=...

0
Q: Does loadHtmlFile php function sends ip address of the web server to the target website server?

Zahid RainSuppose my website is mywebsite.com and collecting data from remotewebsite.com I am using loadHtmlFile function to load data from a remote website. The page I am accessing is dynamic and I am calling loadHtmlFile every 3 seconds to get the updated data via ajax call. My concern is, the website o...

0
Q: Issue with binary operation in PHP

sourcecodedecbin() converts decimal to binary , also 1 XOR 0 = 1 so , decbin(0) ^ decbin(1) should give me 1 but it is giving me nothing .... why ?

0
Q: PHP SOAP WSSE Error

RobI've been attempting to auth using WSSE headers. I've found a lot of useful information on this site so far, but still have not been successful yet. I need to send headers like such: <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oa...

0
Q: Deprecated: Function eregi() is deprecated in class.kValidate.php file

saiyyedfardeen Deprecated: Function eregi() is deprecated in /home/hjlhvqyy/public_html/fastseoindia/klib/class.kValidate.php on line 107 Deprecated: Function eregi() is deprecated in /home/hjlhvqyy/public_html/fastseoindia/klib/class.kValidate.php on line 109 Deprecated: Function eregi() is deprec...

0
Q: ip4 and ip6 convert in different way

wervaI want to store ranges of IPs into database. The problem is that some IPs are ipv4 and some ipv6. I want to convert all to ipv6 then store into database. for example: according to converter: 192.168.1.100 => 0:0:0:0:0:ffff:c0a8:164 What makes problem is that php treats them in different way...

0
Q: "likes for comments" database designing?

Srii have database tables for Posts and comments. i want to allow users to put a like or dislike for each comments and posts. so..i have few ideas of doing this. please tell me either i am correct or not. create two additional columns in comments table. likes | liked_uids if a person clicks on ...

0
Q: How to add sortable columns in a Joomla component (table), both ASC and DESC with an arrow

KelvinI have followed through the tutorial, http://docs.joomla.org/Adding_sortable_columns_to_a_table_in_a_component When I have followed all instructions there, I was able sort the columns, but with only ASC direction and there is no arrow indicator. Does anyone happen to know how to enable both ASC...

0
Q: MySQL: Updating a Field With The Same Value

Michael RichI use the below method to update a field comment_confidence in my comment table. public function update_comment_confidence($confidence_score) { $this->db->update($this->_table, array('comment_confidence' => $confidence_score), array('comment_id' => self::$comment_id)); if($this->db->aff...

0
Q: How do I get numeric values in an array in str_replace()’s search parameter to map the way I expect?

binkiphp > echo str_replace( array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'), array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'), '01234567890abcdef') . PHP_EOL; klmnopghijkklmnop I expected this str_replace() call ...

0
Q: Fatal error query codeigniter

gabrieli have query, but it's error ...why? can help me?? $tot_hal = $this->model_welcome->manualQuery("SELECT * from tbl_transaksi a left join tbl_pelanggan b on a.id_pelanggan=b.id_pelanggan left join tbl_karyawan c on a.id_karyawan=c.id_karyawan where a.status_transaksi='OK'"); error : Fatal erro...

0
Q: Like or favorite a post with unique user using Laravel Eloquent

Sagiruddin MondalI was creating a like system for my website. in this I wanted one user can only like one time for a post. and a post can be liked by many user. Also many user can like many post. So if I guess it right, It is a many to many reletionship. in this context, I create the following table ... user...

1
Q: Need suggestion to edit a php through php

YadheendranI have a config file which is written in php as below, <?php class WebConfig { public static $WEBPATH = '/customers'; public static $ACCOUNTPATH = '/empaccountpath'; public static $INFO = '/accountInfo'; const ACCOUNT_STATUS = '/account_status'; const ENABLE_SEARCH = '/enable...

0
Q: Move position of MySQL row up/down using php

FaisalI'm fetching my page's menu from MySQL table as an unordered list <ul></ul> ORDER BY their position, Here is my MySQL table's screenshot All I want is a query when I fetch record of page_id_pk=3 and SET its page_position from 3 to 2 and UPDATE it so now it holds page_position 2 and rest of t...

0
Q: kendoui grid CRUD example

user2313172I'm new to KendoUI. I'm developing an app using the Grid with CRUD functions. It is for a relatively simple application for a few columns (10) and rows (25). I managed to make it work for Read and Update. But I don't know how to code it properly for Create and Delete. I cannot find examples with ...

0
Q: Set userprefs when loading a gadget in PHP

thekman30Greetings from a long time reader, I am wondering if anyone could give me an example on how to set the UserPref of an XML Gadget using when loading it in PHP? So far I have managed to make the gadget display by iterating the the tags until finding the content tag, then echoing out the code betw...

0
Q: PHP get_result() with mysqli prepare not working

AkilanI am trying to implement php mysqli prepare in my existing source. To fetch "select * from " I used object oriented method. Its working fine in my local server. When i deploy into server, it will not show the result or error. It breaks after the get_result() function. Here is my source, $mysql...

0
Q: Cant find base path for bundle

DavidI'm using Symfony2 and want to generate getters and setters for the entities by running: $ php app/console doctrine:generate:entities TestBundle The Console returns me the following message: [RuntimeException] Can't find base path for "TestBundle" (path: "C:\xampp\htdocs\ProjectX\src\Nam...

-1
Q: Increment time by 15 minutes in php

ashwinbhyIn mysql database we have a column of type time we need to increment the value of time by fifteen minutes in our php code. for example time is 09:45:00 it should become 10:00:00

0
Q: Syntax Error, unexpected $end -- PHP error, what's wrong?

user2955368My entire error code is Parse error: syntax error, unexpected $end in /home/a3704125/public_html/home.php on line 356 Here is my entire PHP file.. Tell me what the problem may be? ._. Thanks! <?php define('INCLUDE_CHECK',true); require 'connect.php'; require 'functions.php'; // Those two fil...

0
Q: PHP Files work in one setup but not in another

zack_falconI've recently made a new Fedora setup, consisting of Fedora 19, Oracle 11g, Apache 2.4.6, and PHP 5.5.4 (afaik). My objective is to migrate an existing PHP setup from one aging PC to this new one. As far as I know, I have everything correct, sans PEAR*. Now, I've been able to create an info.php ...

0
Q: PHP - Replace subfolder in link (in order to change language)

AndyThis is my first post on this forum, so please forgive any of my unintentional errors. So, let me try to explain what my problem is: I have a two language website with a folder structure like this: mywebsite/ru (russian) and mywebsite/en (english) When I'm on the russian version of the websit...

0
Q: How to use document.write() into .html()?

Boris KuzevanovI know that question is a little stupid. But i have next problem: I do obfuscation of my HTML code by http://myobfuscate.com/ , as you can see this site do like this: he creat varriables and put on it JS code. Here is code like this: var lOOL = 'document.write()'; than it print on page by eval...

0
Q: MySQL database timezone isn't being set correctly - why?

Andrew PhillipsI have a MySQL database hosted via a Cloud service provider. The timezone is different to my local timezone. I'm trying to set the timezone correctly .. Here's my PHP code I'm using when I want to get a new connection to a MySQL database: static function get() { if (self::$instance!=null) ret...

0
Q: Deprecated: Function ereg_replace() is deprecated in line 114

saiyyedfardeen Deprecated: Function ereg_replace() is deprecated in /home/hjlhvqyy/public_html/fastseoindia/klib/k_functions_text.php on line 114 code is below: $value = ereg_replace("[ ]{2,}"," ",$value); // line 114 plz help and give me a real code.... i can't understand full code that's why i pos...

0
Q: URL specific encode

d.raevI try to recreate a URL but can not find the encoding function $input = "2/3*( ((word*888) )>(word2 AND ((word3*888))/word4>888"; $encoded = "2/3*(%20((word*888)%20)%3E(word2%20AND%20((word3*888))/word4%3E2888"; Tried with urlendode, rawurlencode but they replace the brackets and "*".. The ...

0
Q: How to maintain visitors history using cookies with php

Vky ArainI wants to find the visitors history with cookies untill cookies doesnot expires, if iam setting a cookie on my page and when visitor visits my page and coming back to site before cookies time period expires and visitors visits my inner pages and search anything, how i maintain visitors history w...

0
Q: Recursive SELECT query in Mysql

leo wongI got two following tables category:(one to many-----question) id name parentId 1 test1 0 2 test2 1 3 test3 1 4 test4 3 ..... question: id title category_id 1 question1 1 2 .... 1 3 .... 2 my question is : if i search category id = 1 ,there will be...

0
Q: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource -- What do I do with this error?

user2955368Here's what the code states: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/a3704125/public_html/home.php on line 117 Here is my entire PHP/HTML code: <?php define('INCLUDE_CHECK',true); require 'connect.php'; require 'functions.php'; // Those two file...

0
Q: td colspan not working for tr with ids

NitishI have a table structure similar to below: <tr> <td colspan="5"> TEST </td> </tr> <tr id="abcd_<?php echo $id; ?>" style="display: none"> <td colspan="5"> <span id="hidtb_<?php echo $id; ?>"></span> </td> </tr> The table is within a loop and the value of $id c...

-1
Q: How can i setup an online photo frame editor that produces photoshop file or compatible one for me to process?

user2955412I want to develop something like this website has: http://www.mycustomcase.com/iphone4/photo_case (select 1st option displayed on left and you will find an online case editor) I want to understand the mechanism used in it, i know it is a combination of lots of tools but i want to know how is th...

0
Q: CssEmbed generates exception on bootstrap_less file

KdgDevI'm currently following this tutorial: https://www.youtube.com/watch?v=5om81wXYIns It's about learning Symfony 2.3, and right now is demonstrating how to set up Twitter Bootstrap and also how to use assetic with cssembed, to compress all css and javascript code in to 1 file each. I'm working on...

0
Q: Selecting between 2 specific elements to get comments between closing and starting tag

Leo PflugI'm currently trying to fetch the data of a simple XML-Sheet which contains data for translation use it's structured like this: <string name="action_settings">Settings</string> <string name="action_error">Something went wrong.</string> Sometimes there are comments after to describe the conten...

0
Q: Magento - Store switch and cookie based redirect

user2955437I have a website with stores in english and italian. When we change the store, the product URL changes - 1 URL for english product page and 1 URL for italian product page. English store is the default store. The switch works but when I go directly to the italian product URL I'm redirected to a ...

0
Q: Installing phpunit via pear on Windows

ArfeenI have already setup pear on Windows and its working fine. I wanted to install phpunit but seems like the repository is returning 403 forbidden response(Channel discovery added already). Is there anything I need to do before installing phpunit ? c:\wamp\bin\php\php5.3.13>pear install --alldeps...

0
Q: Authenticate a PC before running my website

Qadir HussainWell, Let me describe some information about my work I m making an web application, its a kind of some online shop using PHP, jquery, ajax and JavaScript. My intention is may be strange , i.e I want to launch my site on only one PC on local host. How should i set my site so that it only run...

0
Q: How to use ajax to update database table?

Sumit RathoreI am showing a table on a webpage using php and mysql. I have added a chackbox in each row. Clicking on the checkbox will result in displaying two buttons in the row whose checkbox we clicked , one is delete and other is edit. For this purpose with the help of stack overflow i used jquery. Now wh...

-2
Q: Unexpected behaviour of mysql at different times

pradeeppsWhen i execute my program,arises an error exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens', after few seconds i recreated the same situvation with out changing code..then it execute properly.What may be t...

0
Q: Best way to get output from another PHP file as a variable

IsaacLI need to include the output/result of a PHP file in another file. I found info online about using curl to do this, but it doesn't seem to work so well, and so efficiently. This is my current code: function curl_load($url){ curl_setopt($ch=curl_init(), CURLOPT_URL, $url); curl_setopt($...

0
Q: Write code to log in, auto populate fields and submit actions?

PomsterI need to write code to log onto a site with the username and password and then find all the fields that match and populate them with my data, then have this code submit this action and then log out. I have no idea what this type of coding is called or where to start looking how to preform these...

0
Q: handle with images in php

Zubair Haiderhow insert picture into DATABASE using PHP and then upload again on page from data base using PHP . recently I have inserted first name last name and know how to get again from database. but don't know how to handle with images in php

0
Q: Ajax POST and Return the data as json

yogamadnessHello I'm new on ajax i want to make some ajax post that will select data from mysql database based on what user input on ui and show the data as json object, this is my code that not work index.html ` </fieldset> <form id="search"> <fiel...

0
Q: How to secure a php script

Guus van Walstijun I have got a php script. In this script i will be connected to a ftp server, and show a file. What would be the best way to secure this script so can only log in 5 times in 1 hour or something like that? My script: <?php session_start(); $_SESSION["ftp_user"] = $_POST["user"]; $_SESSION["...

0
Q: Scrape longitude and latitude from this html using preg_match

Ben PatonI'm trying to use a regex to extract just the longitude and latitude coordinates from this html. This is just a snippet of the full html from http://www.bricodepot.fr/troyes/store/storeDetails.jsp?storeId=1753 so I need to be able to search through the whole targets page html and match the longit...

0
Q: How to delete an input type text?

user2901740How to delete the specific input text that is dynamically generated? I tried to used the remove() but not working. any idea? var txtLoop = 1; function add(type) { //Create an input type dynamically. var element = document.createElement("input"); //Assign diffe...

 
8:44 AM
-1
Q: Escaping JSON strings but stripping HTML attributes for saving to DB

ExtrakunThe project I am working on allows user to have simple config files which are stored as JSON strings inside a database. The issue now is I wish to escape HTML attributes, but leaving the quotes untouched. If I use htmlspecialchars, all the quotes will become &quot, and the JSON formatting will be...

1
Q: Unable to filter data from mysql

MahouI tried to read data of my MySQL database, I created the fullcalendar and show up the event on calendar. However, it is unable to retrieve the data from my MySQL database. The First php code : <?php require_once('conn.php'); ?> <?php $maxRows_RsCourse = 1000000; $pageNum_RsC...

0
Q: fix complicated mySQL query that fails on multiple users

salivanAll tables and query itself is replicated here: http://www.sqlfiddle.com/#!2/b25f8/7 I run this query: SELECT a.name_surname,GROUP_CONCAT(w.word) FROM words_en w INNER JOIN connections c ON c.word_id = w.id INNER JOIN ( SELECT f1.asked_user_id AS friend_id, f1.created, u.name_s...

0
Q: How to get extra json data from php using JQueryUI autocomplete after selecting an item?

user2944805After selecting an item on the returned results, how do I alert another item from php? Here is the plugin settings. And if there's a better way i can improve my controller, please suggest something with an example. $(function() { $( "#SearchInput").autocomplete({ source: '../Search/...

0
Q: Remove duplicates in a PHP array

user2955522i'm using the Google API to extract data from Analytics. But i can't seem to remove the duplicates in my array. I have checked the forum and array_unique seems to do the trick but i can't seem to get it working. Any ideas? Much appreciated! THE CODE: <?php $jsonurl = "URL"; $json = file_get_co...

0
Q: simplexml update xml file permission issue on ubuntu server

fefeI have a permission issue when I try to update an xml file with simplexml $xml->asXML('my.xml'); and I have been trying to change the permissions on file chmod 777 my.xml but doesn't seems to work. What other alternatives I have ?

0
Q: php getopt() function not giving correct answer

Muneem HabibFollowing is my command line arguments: php a.php -g UAMS ABC Now when I get command from command line using getopt then I am getting only first argument i.e UAMS. I want to get both arguments i.e UAMS and ABC. Following is my piece of code to get argument throug getopt() function. $options=...

0
Q: I want to change the dropdown.selectedIndex to "text" instead of what it currently is "value"

user2955503I have a javascript dropdown on website, here is the code- <?php function get_request_uri_without_page() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["...

0
Q: FPDI class not starting

synan54i want to setup FPDI in my localhost but its gives me an error Fatal error: Class 'FPDF' not found in C:\wamp\www\book\fpdf_tpl.php on line 20 what i did i ust went to download page http://www.setasign.com/products/fpdi/downloads/#p-380 downloaded 2 packs FPDF_TPL and FPDI i unzip that files...

0
Q: GoogleMap getting all data need

user2955539I'm using a standard google map, with assigning the zoom, radius and the long latitude even the category of places, the only thing i want to know is: If it's possible to get all the data by assigning the "LongLat" by there within "500" RADIUS and if i can get all the "restaurant" names within th...

0
Q: Getting error from fdf_get_value()

Mehedee Rahman SetuI was trying to get field value from fdf file. I have used following code, but getting error. <?php $fdf = fdf_open("test1.fdf"); echo "Name: ",fdf_get_value($fdf,"first_name"); fdf_close($fdf); ?> Error message: Fatal error: Call to undefined function fdf_get_value() in C:\LocalServer\htdoc...

0
Q: Javascript username validation check in jqBootstrapValidation.js

Phil HarmonieI'm using jqBootstrapValidation.js ( http://reactiveraven.github.io/jqBootstrapValidation/ ) and I want to check if a username that I choose is already existing. I loaded all Usernames in an array: $array = array("User1","User2",...); and now I want to check if the username already exists whi...

0
Q: Replace Router or Controller in Zend2

bordeuxI want in my module replace mached route with my own, when request don't have specific GET parametr. For example: example.com/ControllerName/Action/?mode=ajax Is mached to ControllerName But when is example.com/ControllerName/Action/ is mached to my controller in my module. How can i do it...

0
Q: I need to fix a function that scan WordPress post for YouTube link and put the link on a single line

user2948145function the_content( $more_link_text = null, $strip_teaser = false) { $append = '&w=480&rel=0'; $content = get_the_content( $more_link_text, $strip_teaser ); $content = apply_filters( 'the_content', $content ); $content = str_replace( ']]>', ']]&gt;', $content ); $content = p...

0
Q: Corrupted File Returned PHP Header File returned from database?

Stevie GI have the following function that gets a blob from the database and should return the file to the browser, however it is returning a corrupt file: $file_data is an array with the returned row from the files table with the blob, the content type, last modified and other such things. $data is th...

0
Q: PHP: Applying multiplication factor to a broad number of values

MaxEvronI'm coding an audio amplifier in order to apply an envelop on an audio track. The audio comes from a file containing raw 44100 KHz 16-bit stereo samples. I coded something like below. In order to simplify the example, the amplification factor is constant but is varying in the real project. <?php...

0
Q: Two forms - one submit button?

michaelmcgurkI have TWO forms on my website. Is it possible when I submit one of these, it will take form data from a particular field in the other form? I am using the Recurly system with PHP. Thank you, Michael

0
Q: Retrieving mysql data on to one php page from multiple tables

N Mahmoud AmryI am developing website which database driven. It has two pages i.e index.php and subpage.php. On the index page there appears 14 links namely about_us,projects,services,partners and among others. And for the case of the subpage.php, it has "a blank body",the header, navigation and the footer. M...

0
Q: Can I use PHP SDK and JAVASCRIPT SDK at the same time?

Jben KayeI have a php program/app which asks for input, generate an image and post th image link to user's timeline (processor.php). I used PHP SDK in posting to timeline since I am more familiar with PHP. Now, in my gallery.php, i want to show like buttons for each generated image. I am aware that i have...

0
Q: GeoRedirection script not working properly

Learner Always I am developing a country specific website, for which I thought to have a geo redirection installed at my php server. The basic approach is to record the incoming IP address in $_SERVER['REMOTE_ADDR'] and then use a geolocation database to convert that into country information. I did go with Max...

0
Q: PHP - Not redirecting on successfull login

user2955598This is a strange problem When I go onto login.php and enter my login details on my testing server I get redirected to admin.php page as I should, However when I uploaded my files to my hosting server and I go to login.php and enter my login details NOTHING happens, I mean nothing the page just ...

0
Q: Step by step third party Google API Integration

user2955564I just want to know if anyone of you ever experience using google api login authentication in Symfony2? Right now I have downloaded the google client api but I really have no idea on how to integrate it in symfony2. I have been looking for a solution on the net and all the solution suggested of u...

0
Q: Dynamic images + geolocation (google maps API?)

IE-haterI'm thinking about a possiblity for showing a users geolocation in an email. Would it be possible to generate a dynamic image with PHP which tracks the users geolocation and gives back an image. Generating a dynamic image is no problem. But before I put too much effort in it, I try to find out i...

-2
Q: Unable to run query

user2955619when i run my php page this error show: Unable to run query:Unknown column 'NUM_OPTIONAL_COLLEGE_COURSE' in 'field list' $sql ="INSERT INTO MAJOR (`COL_NO`, `DEPT_NO`, `YEAR`, `NUM_OPTIONAL_UNI_COURSE`, `NUM_MANDATORY_UNI_COURSE`, `NUM_OPTIONAL_COLLEGE_COURSE`, `NUM_MANDATORY_COLL...

0
Q: Form filled BY a table

user2955526I'm new to PHP and MSQL and trying to build my first application. In this case i need a drop down form which is filled by a table. (MSQL = PHP MYADMIN) ______________ Input table: Table_Product ID, PRODUCTNAME. (There are more columns, but don't need them.) ______________ This table is used ...

0
Q: Removing a Cron

Emincan DemirkayaI've got a problem with a cron. This is the line: 09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete When this line works i'm taking a mail from my server: PHP Warning: Module...

0
Q: Displaying the value (link) selected in a modal window with the index value

user2723949   Hi ,, I have a page with some values in a table which are read from a .csv file and displayed. The values changes with time ( dynamic ) , So I am using for loop in PHP with the size of the file as limit of loop and displaying the values and each values are links that displays a modal window ...

0
Q: You have an error in your MySQL Syntax - in a simple Query

user2802113So I am trying to replicate a simple blogging system I made a month back, But the query no longer works on my new site Here is the code <?php function BlogPosts() { $sql = 'SELECT * FROM "blog-posts" WHERE BlogDeleted = 0'; $value = mysql_query($sql); if(!$value){ die("<h1>QUERY ERROR IN B...

0
Q: Java Applet's URLConnection sent to PHP does nothing

starmandeluxeI've studied up on the Oracle documentation and examples and still can't get this to work. I have a Java Applet that is simply trying to send a text field to a PHP script via POST, using URLConnection and OutputStreamWriter. The Java side seems to work fine, no exceptions are thrown, but PHP is ...

0
Q: File upload issue in Yii/PHP

arun_phpI have a situation here, while uploading larger files(greater than 10mb) nothing happens, no file is uploading, no db entry, no error messages etc., I'am using Yii.. phpinfo says upload_max_filesize and post_max_size are 1G and max_execution_time is 3600 .After submitting the form, the page loads...

0
Q: php Find matching word from a string with array

user2568578i need to find 1 word from a string, like: $row['keyword'] = "hello my name is jon"; If the word "text" matches to one word from $row['keyword'] so do something.. i try this, but i think there is a better way: foreach($rows as $row) { if (strpos($row['keyword'],t...

0
Q: incrementing time value by 15 minutes

ashwinbhyI have value 10:00:00 in my mor_start which is of type time in mysql database i want it to increment by 15 minutes. $tim=$values['mor_start']; $date = date('H:i:s', strtotime($tim)); echo $date; the above code displays 10:00:00 but when i try to increment the time by the following code i get ...

0
Q: Getting error after deleting data

Mohamad Noor Qusyairi Manlanwell,this is my error, the data successfully deleted, but the error come out.. here is my search.php coding. The error at the line 30 <? mysql_connect("localhost","root",""); mysql_select_db("kuih2") or die("database could not connect "); ?> html code for search.php <html> <head> <met...

0
Q: TCPDF strange output

beingalexUsing TCPDF I am generating PDFs. The PDF's are one page with two PNG images inserted. This is all working fine on my local Ubuntu server but on a remote server the output is strange, see attachment. No errors are generated from TCPDF. Has anybody got any tips as to why this may be happening? ...

0
Q: Joomla parameter for template modul

PiTheNumberI have a template "ja_purity_ii_something" could be from joomlart.com. Anyway, this template contains modules like /html/mod_latestnews/default.php. In this file a parameter $list magically turns up. How can I change this parameter? Some code from default.php: <?php if (count($list)) : ?> <di...

0
Q: PHP display key => value array in order

AhmadhcI want to fill an html table from an array organized as Key => value, i use zend Framework, and my problem here that Php didn't respect the order of the value in the array when i have to print them in an html code and this is my controller: <?php class Dashboard_LogsController extends Dashboar...

0
Q: new user registration page writes to user info to .txt, sign in verifies user exists in .txt file to allow user to log in

wish i was good at phpI am new to php and trying to learn it. I am practicing by doing a php code to so that when a user is at the login screen and they sign in with a username and password, when they click the sign in button, the page will check the .txt file to see if the username and password exists on the .txt fi...

0
Q: How to trigger a PHP script after payment?

techLet's say person A has paid an virtual item that I am selling in a store. (Person A has paid using Paypal) Immediately after paying, how do I update my database to give person A the virtual item? I use PHP and MySQL. I am thinking of using a PHP to update MySQL database.

0
Q: Output specific location on IP

Michel VertongenI'm searching for a php script or javascript that outputs the correct city location based on the IP ADDRESS, something that does this. $IP_city = $_SERVER['REMOTE_ADDR']; $city = ''; if ($IP_city) { // Search to the $city of IP; echo 'Your current location =' $city; }

0
Q: Why is mysqli_query() sending empty strings to my database?

infectionslaughI'm making a register form in html and I can't make it save the data to the database, everything I send is an empty string! I don't know what's so bad with the code, I don't think the syntax is wrong, hope someone here can help me to see here I have gone wrong: <?php $con = mysqli_connect("loca...

0
Q: Merge two tables to a new table using php and mysql

user2955523Hello this is my first time i post but hopefully i won't mess up to much. Basically i'm trying to to copy two tables into a new table, the data in table 2 and 3 are temp data that i update with two csv files. It's just basic data that share the same ID so thats the Primary Key and i want these t...

0
Q: PHP/MYSQL Javascript - Insert row value pulled from database into textfield with a button

SiZaIm pulling out table information from a mysql db: I need the buttons to select the information shown into a textfield, the below code works perfectly for the mobile_number but does not work for serial_number. both field types are varchars. php to pull out info and html button <?php while ($row...

0
Q: PHP : how to insert data variable into table using postgreSQL

Beebrabiei get value from request variable this code $fname = $_REQUEST["first"]; $lname = $_REQUEST["last"]; require_once("Connection.php"); $sql = "INSERT INTO test(fname, lname)VALUES('".$fname."','".$lname."')"; if($sql) echo "Save Sucessfully"; else echo "FFFFUUUUUU"; pg_close($connect); ...

0
Q: Access config global in Zend Framework 2

Aurélien MaigretI would like to access to my global configs (config/{,*.}{global,local}.php) located in my personal libraries (in the vendor directory). But despite my search in the web, I did not succeed to achieve this. I know how to access the config file of a module : \MyModule\Module::getConfig() I know...

0
Q: Symfony2 upload file without form

Thibault MartinezUsing symfony2, I would like to upload some files only from their path on my PC. I read an excel file containing some path to pictures (like /home/thibault/pictures/*.jpg) and I want to upload them on my server. So, I do not want a form. All the documentation I have read deal with upload from a...

0
Q: Validating appReceiptStoreURL Returning 21002 Status

Infinity JamesI have created a class which handles the purchases on In-App Purchases and also the validating of receipts. A while ago I used to use the transactionReceipt property on an SKPaymentTransaction, but have updated my code a fair amount and now use appStoreReceiptURL on the [NSBundle mainBundle]. Ba...

0
Q: php query Select 10 players and 3 reserves for each one

custombrandstable players player1 player2 player3 player4 player5 ... player100 etc I need to select 10 unique random teams with 4 players as: 1 base and 3 pivots Currently trying to use: require_once "connect_to_mysql.php"; $sqlCommand = "SELECT id FROM players ORDER BY RAND() LIMIT 10";...

0
Q: mssql_query returns resourse, but mssql_num and mssql_fetch_row gives an error

LeneronI have a strange issue - I am calling a stored procedure with mssql_query, and it returns me "Resource ud #4". But when I try to work with mssql_fetch_row() it gives me an error; $res = mssql_query("query"); If ($row = mssql_fetch_row($res)){Die('ok');}else{die('bad');} //trying to fibd the mist...

0
Q: Adding images to groups in facebook graph api not working

user2955662I am having trouble getting the graph API to post images into a group. I have no trouble posting into a group feed, but as soon as I try and upload an image into the group I get the following not so helpful error message: An unknown error has occurred. I am using the php facebook toolkit. ...

0
Q: Load Data from db via javascript and php array

Levent KayaI want to get my data from mysql db with php and assign them to my javascript array. I have 200 records in my db and i will get 10 records randomly. $myQuery = mysql_query("select * from tblx where xyz=1 order by rand() limit 10"); What i want to do is take these records to assign them in to a...

0
Q: How to pass a function return value to php socket program in another page

Rincy RaphaelI wrote a client server socket program in php. Now i want pass function return value of page SearchURL.php to the Client.php SearchURL.php '; return $s; fclose($fp); } ?> the Client.php how can pass the $s value to the client.php? can i possible to run in ...

0
Q: SubQueries in yii

Naga shayanAm trying to code for a subquery select * from mob_reg where name in (select name from auth where parent ="naga"); I followed all these answer's [Sub-queries ActiveRecord Yii [How to set multiple condition on criteria for CActiveDataProvider? But am getting invalid arguments for foreach()....

0
Q: Listing a row in html table based on a condition

Harun ThuoI'm trying to list a record from the database based on its id..i have one script that lists all records from the database and displays the records in an html table.in the table, there's one row 'Campaigns' that is a link which when clicked displays only the record of one row..the idea is to list ...

0
Q: CSS effect inside PHP code

Programming_crazyI have written some HTML code inside PHP with echo as below: echo '<a class = "fragment" href = "'.$row['url'].'" target = "_blank" >'; echo '<div>'; echo "Title: $title"; echo '<br/>'; echo "URL:"; echo '<h4>' .$url. '</h4>'; echo "Pre...

0
Q: Double click an element using Selenium Webdriver - Facebook PHP library

Marcel ColombI need to double click an dom element using Selenium Webdriver - Facebook PHP library. There's no direct way to perform a double click on the element, but there's a way over WebDriverMouse this is how far I've got. $myElement = $myWebDriver->findElement(WebDriverBy::id('myElement')); $myWebDr...

0
Q: Distance between 2 gps points

joan16vI am using this function, but I need more accuracy. Any ideas? function distance($lat1, $lng1, $lat2, $lng2, $miles = true) { $pi80 = M_PI / 180; $lat1 *= $pi80; $lng1 *= $pi80; $lat2 *= $pi80; $lng2 *= $pi80; $r = 6372.797; // mean radius of Earth in km $dlat = $lat2...

0
Q: Grab days left in month past a date as array - PHP

Joey CadleHow would I grab the days of the month past a given date as an array. For instance: get_days_left('2013-11-20'); ... would return: array('2013-11-21', '2013-11-22', ...);

0
Q: Filter an array within a range when keys are timestamps

J CrowI have an array with the keys as timestamps - the actual keys are unix time, I have just formatted it here for simplicity. How can I filter this array so that it unsets all values and only keep the array between 2013-08-02 00:00:00 and 2013-08-02 00:02:00 ? 2013-08-01 23:58:30 ---->> 322 active ...

0
Q: Magento - SOAP API, Mass Update Product Visibility

Steve ChurchI want to refrain from using the import export, we have a LARGE amount of products (5,000) Basically, I have done some heavy configuration the the templates to display the catalogue in a very wholesale way for our client, if you want to look it is here (www.musclefinessewholesale.com) however, y...

0
Q: How to do ajax form post while page load after submit a form in symfony2

Mohan RajI have to retain drop down value and also some specific data according to the drop down selection. Normally its working fine for me but i need same thing after submit a form (save the data), after save i need to retain the same. Please advice about this or any other solution already having?

0
Q: Flex: How to pass parameters with prefix to my PHP HTTPService?

user2419604I have a PHP script to get data from a server. However I am having difficulty transposing the call function that has a prefix 'req= from a HTTPService in Flex. Here PHP example script that works to call the data from server: <? function sendPost($param){ $ch = curl_init(); $url='...

0
Q: force to download remote image immediately without HTML5

IgorChI trying to force to download a remote image, I failed to attempts do it on client (cannot use HTML5, thanks to IE8), so I'm trying to use server side (php). The only way how to do it I found thanks following answer, is using curl. Other way like readfile($file_url), always return an empty file....

0
Q: Youtube link string replace with get method

MezelderzTrying not to go to youtube for every video I find on some other site, and that is from youtube. If I right click and copy video URL, url will have this feature stuff inside the link, I am trying to get rid of that with str_replace. Link http://www.youtube.com/watch?feature=player_embedded&v=wq7...

0
Q: How can I find out the name of a variable inside a function?

rubo77I have a function function my_dump($a,$name){ echo '<pre>'.$name.":\n"; var_export($a); echo '</pre>'; } How can I achieve this with only one argument so the function recognizes the name of the called variable itself? for example: my_dump($cool_variable_name); will output: ...

0
Q: i am trying to get data from php and wamp server to my android.but it shows the error json parser- end of input at character 0

user2825588this is my json parser code. package com.example.sampletest; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.Lis...

0
Q: hide gridlines on a .doc generated by php

rispoli michelI'm generating .doc with php using this code below. <?php session_start(); header("Cache-Control: ");// leave blank to avoid IE errors header("Pragma: ");// leave blank to avoid IE errors header("Content-type: application/octet-stream"); header("content-disposition: attachmen...

0
Q: Cannot see wordpress widget without log in

user2834491My wordpress widget on single page isn't display to visitor ( no code on view source) <div class="secondaryColumn"></div>` ` It display normally on homepage. and when I log in I can see it on single page too. May you help me with it?

-1
Q: How to parse JSON string into Android as an Array?

mobilGelistiriciA very simple question, a lot of examples out there, but none of them worked for me. I need to parse the simplest form of a json string : {"id" : "5" , "name" : "John"} How do I turn this into an array, list, map whatever, so that I can get something like this ? myArray["id"] = 5

0
Q: store IPv6 to database after being converted to binary

wervaI have an ip table with varbinary fields: ip_start and ip_end Now I have a problem, $ip=('2001:255:ffff:ffff:ffff:ffff:ffff:ffff'); $binary=unpack("A16",inet_pton($ip)); var_dump($binary); Now, how to store $binary_start and $binary_end to ip table? Do I need any wrapping of data(such as bin2h...

-1
Q: Object not found! redirect link codeigniter

gabrielwhy i get the error : my code : <li><a href="<?php echo base_url(); ?>welcome/logout">Log Out</a></li> error : Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error...

0
Q: How to to create groups of php arrays encoded as json and return each group by name

user2944805is this possible? i want to return name and type of a car, in one json element. The normal way is this, { $return = array ('label' => $row['name'], 'Type' => $row['Type'], ); } echo json_encode($return); But i want something like this so i can just call "NameType", $return = ar...

0
Q: Error when logging in using CakePHP's Auth component

harrygI've integrated Cake's Auth component into my app. It mostly seems to work ok but I quite often get an error when logging in looking something like this: Error: Call to undefined method Security::getDataSource() File: C:\xampp\htdocs\ips-mvc\lib\Cake\Model\Datasource\DboSource.php Line: 1...

-1
Q: How to access array in outside while loop in fgetcsv

snehali want to fetch all csv file contain into array so i used fgetcsv function.it is working correct. but when i want to return my array it is empty. problem is outside the while loop. here is my code: <?php $filepath='Data\'; $csvfile=array(); /* here i did declaration */ $csvfile=csvcontain($...

0
Q: How to install pthread on php 5.4 on an x64 windows architecture?

Hugo StartThe dll founded here : http://windows.php.net/downloads/pecl/releases/pthreads/ contain a x64 version only for php 5.5.

-6
Q: Telnet via PHP code

almoujtahedHi I want to make simple telnet via php script only to check weather the connected server if running or down Thanks

0
Q: How to run PHP's OCI8 extension on Mac OS X Mavericks?

user2955794I am trying to install OCI8 on default PHP that came with OS X Mavericks (PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38)). I have installed Oracle Instant Client (Version 11.2.0.3.0 (64-bit)) and I am able to run sqlplus and connect to oracle server. I have installed oci8 using pecl: pecl insta...

-1
Q: php pagination, wont echo pagination buttons

Casperso i have made this pagination following a tutorial on the internet and the pagination itself works fine if i change the url to be correct but for some reason it wont echo the button "1,2,3,4" etc $cykel_pr_page = 1; $current_page = 1; if (isset($_GET['pagenr']) && is_int($_...

-2
Q: Login script php mysql

RobinThis is my login script. And as you might have figured it is not working. the $check is always empty. And i cant seem to find the reason for it the query is good. And i have a valid database connection. session_start(); if(isset($_POST['username']) AND isset($_POST['password'])){ $username ...

0
Q: How to remove controller name from the URL in codeigniter?

Imran AhmedI have controller named “profile” and the URL for user profile is www.example.com/profile/user I am already using the rerouting of codeigniter in the routes file $route['profile/(:any)'] = "profile/index"; what I am looking is to remove the profile controller name from the URL so it will be ...

0
Q: PHP session is getting lost completely when embedded using iframe on safari web browser

user2955865I have a php application completely depend on sessions to carry data from one page to another. Users can embed it using iframe. My sessions are getting lost completely when user access it from safari web browser. This is only happening when my php application is embedded using iframe. Working fin...

0
Q: preg match if found exclude that string php

user930026I am stuck in a very simple PHP problem. I am having a string as $a = "123 text"; or it can also be $a="lorem ipsum 1234 dummy text"; I want that the output shall be $a="text"; or $a="lorem ipsum dummy text"; In short I want to exclude the number that can either be 123 or 12345 or anything els...

0
Q: Passing PHP variables to Livecode

kexxcreamProblem: I have a number of variables stored in $_SESSION in PHP and I am wondering if it is possible at all to transfer these to Livecode scripts (.lc)? Current solution: I use $_GET to move information but I would like to know a way where you can connect PHP with Livecode and transfer inform...

0
Q: set autoincremental serial number in php

user2942100I am working on PHP using Kohana 3.2.I am displaying large number of data from database.I want to set the serial no from 1,2 upto the n-numbers depend on the number of data i am showing.I want to show the data in sequence.How to handle it through program.I can echo the total number of data(count)...

0
Q: 1. Use table data to 2. a HTML form

user2955526I have an table with data (grootformaat): ID, PRODUCTNAAM, etc. I need to have the PRODUCTNAAM to show up in a html drop down form. <?PHP $con = mysql_connect("localhost","***","***"); $db = mysql_select_db("grootformaat",$con); $get=mysql_query("SELECT PRODUCTNAAM FROM rauw2 ORDER...

0
Q: how to block a specific link on the site for a specific ip range using htacces

Dam Forumsthere is a link for a video on my php page in our server.when particular user comes from a specific region.Assume Latin America. when user comes from Latin America and video link will be displayed. but once user clicks on the link, i have to redirect user to a forbidden page. can i do this using...

0
Q: How to Pass Array from Zend Dom Query Results to table

user2955921I am querying a URL for columns YEAR, RATING and I want to insert those two into a database. E.g. YEAR RATING 1992 9.2 2000 9 1999 8 . . . . . . . . So, I am writing script like: $url = 'BLA BLA '; $data = file_get_contents($url); $dom = new Zend_Dom_Query($data); $year = $dom->query('.secondar...

0
Q: Google Safe Browsing API - Download the data from the database

MusterknabeI want to use the Google Safe Browsing API to check certain websites if they got phishing/malware on them. The problem I encountered is, that I also check the backlinks on that site and I'm following the links on the sites. Which means, I need more than 10,000 requests a day. So it would be optim...

0
Q: Array with StdClass in it

Joran Den HoutingWhen I do a var_dump on $raw, I'm getting this: array(8) { ["products"]=> array(1) { [90303]=> array(1) { ["amount"]=> int(4) } } ["totalprice"]=> float(15.96) ["totalamount"]=> int(4) ["currency"]=> string(3) "EUR" ["totalprice_format"]=> string(5) ...

0
Q: Efficient way to fetch_array from n column

HakimSay I have a table as follow: +---------+------+------+---+-----+---+ | term | 1 | 2 | 3 | ... | n | +---------+------+------+---+-----+---+ | connect | 7 | 14 | 2 | ... | 8 | | finish | 1 | NULL | 9 | ... | 1 | | ... | | | | | | | net | NULL | | ...

0
Q: Need htaccess for dynmic subdomain

user2955900I want an htaccess code to redirect a folder named exactly as the subdomain. I have activated wildcard subdomain. For eg:- I want to redirect subdomain.example.com to subdomain.example.com/subdomain. But url should be displayed as subdomain.example.com itself. Please help!

0
Q: how to code in PDO

user2434677Hi guys im having problem converting the code onto PDO, I am new to PDO, is there a way we can recode the below code to PDO for a better code. heres my code: <?php include 'class/init.php'; include("config.php"); $ip=$_SERVER['REMOTE_ADDR']; if($_POST['id']) { $id=$_POST['id']; $id = mysql_rea...

0
Q: Uncaught ReferenceError: How to get PHP variables in $.get() Javascript?

Taha KirmaniI am writing a program in which, when a user clicks on the button, the information from the Page adds into the Database. I have written the following code, it is successfully taking the values from PHP and place the values in Javascript variable, if i alert() them it shows me the correct data, bu...

0
Q: Upload Image as BLOB to database through current form - Codeigniter

user197474I currently have a form that inputs information to the database from a php form, I want to add a field to the database table called profileimage which is uploaded within the current form but I am having problems getting the image to upload... View (profile_content.php): $this->load->helper('for...

0
Q: OpenSSL error - handshake failure

clarkkOn about every second request I make to an API I get this error!? The backend on the API is one of my own servers which I have setup myself with self-signed SSL certs What is happening here!? It can't be the SSL certs because it works in some cases Warning: fsockopen(): SSL operation failed w...

0
Q: how to calculate values from database stored formula in PHP?

Jobaer ShumanI have an application which is calculate ratings. Rating formula is stored in database. Formula can change from admin settings. Let me show an example: This is formula which is stored in database: +-------+-----------------------+ | ID | Formula | +-------+------------------...

0
Q: don't show hidden table

PHPnoobI have a problem I am trying to fix. http://i.stack.imgur.com/k47u2.png. Bascially I have a jqery which active the hidden form when you click on the "send" button. The quanity and "colour" and "size"(sorry miss this in the digram) as a both server and client side validation. My problem is that if...

0
Q: wp_schedule_event not firing

user1548981I'm trying to schedule an event inside a theme's functions.php but i cannot get it to "fire". I'm using the Cron View plugin and it shows the event scheduled correctly but nothing happend when is time to execute This is my code if ( ! wp_next_scheduled( 'prefix_hourly_event' ) ) { ...

0
Q: Use of single module multiple times

Ashwini AgarwalI have created Auth and Acl modules using zend-framework2, And these two are working good. Now I want to use these modules multiple times with different configuration. Basically, I have two sections in my project - User Section Admin Section And both have different session variables and d...

-2
Q: PHP unique url per account

CP2000i am making a subscription service using PHP where i would like every user to have their own URL and or subdomain on my server . For example if the domain name is stackoverflow.com i would like each user to have john.stackoverflow.com and/or stackoverflow.com/john Currently i have "loader" p...

0
Q: How to combine these two codes

TharinduluckyOK, here's the big deal, I've been trying to build my first WordPress theme. Which has a Tabbed settings page created by me. Actually, it's created according to this article. http://wp.smashingmagazine.com/2011/10/20/create-tabs-wordpress-settings-pages/ And I wanted to add images. So, I need...

0
Q: Displaying random product in a related product table of 5

user2946964I am creating a row of "product related table of x5" and using MYSQLcode RAND to generate RANDOM products and a exception clause using id!='$id' - where id is existing product that is being viewed currently. However the problem is that all the product images generated were all of the same simil...

0
Q: PHP $_POST array is empty for no apparent reason (XAMPP?)

user1794121I have a problem, my form opens another PHP script with post method, but it doesn't pass on any values. I tried fixes such as setting in php.ini: post_max_size = 8M variables_order = "EGPCS" and Didn't work. Here's the form code: <form enctype="text/plain" action="zalogujCheck.php" name="com...

0
Q: XAMPP 1.8.2-2 Apache Web Server won't start, always stops immediately

OnovarI'm running XAMPP 1.8.2-2 on my mac (OS X 10.9) and the Apache Web server won't start. It always get the status starting up.. or stopped. (never a green light.) I already tried to change the port to 8080 or 8888 but it still won't run. Can someone please help me? I show some images below to give...

0
Q: Throwing 404 response when should be throwing 403

Manolo SalsasI have the next rule: RewriteCond %{HTTP_REFERER} ^$ [OR] RewriteCond %{HTTP_REFERER} !^https?://itransformer.*$ [NC] RewriteRule \.(gif|jpe?g|png|wbmp)$ - [R=403,L] in the main .htaccess file. When anyone try to hotlink an image, he will get a 403 response. However, he's getting a 404 respons...

0
Q: Reverse a number inside a string in PHP

Itay GalI have a UTF8 string that contains letters and digits. For example: "Hello World 37. What? 24 last 6650" and I want to reverse only the digits but keep the numbers in the same place. The output should be: "Hello World 73. What? 42 last 0566"

0
Q: Programming Paradigms: Strongly Typed parameter with Inheritance

LarsWarning: might cause TL:DR I am working with PHP 5.3.10 and have the following problem. I do have an abstract class DataMapper, which is extended for the specific DataModel I want to persist. The following code does this trick: abstract class DataMapper { public abstract function findById($...

0
Q: Building a Twitter Composer Modal with URL Rewriting

iagdotmeI've built my own Twitter app in PHP with the front end using Twitter Bootstrap as the framework. I want to build a composer window to that my app can post a tweet (or a reply). Rather than reinvent the wheel, is there something I can use that preferably uses jQuery? Ideally it would... Have...

0
Q: PHP OOP with mySQLi fetch

user1949366I am relatively new to PHP OOP and i know that there are numerous questions here on SO, but none of them seam to be pointing me in the right direction. I have created the class user, and I am calling this in another file. I am trying to get the method 'reset' to call up 'connect', connect to th...

0
Q: Different location directives in ngnix

Oscar OteroI am new in ngnix and I don't understand very well the location directive. I have a website with the folloging configuration: location / { rewrite ^(.*)$ /index.php last; } #assets location /web/assets/ { rewrite ^(/web/assets/.*)$ $1 break; } location /web/assets/cache/ { if (!-f...

0
Q: Up vote and down vote in Laravel eloquent

Sagiruddin MondalI want to create an up vote and down vote system for my website. where uniqe user can give vote up/down for one post and next time he only allow to oposite to get off from database and after that he again can up or down vote. in this case i am having users table : id name debates table : ...

0
Q: Email Validation and Deletion from text file - PHP

Andrew Glassim trying to do an email validation. i've got an input text field which i write to a file when the user enters data into the input field. i would like to have a simple code which would check if the email is valid, and if the email isnt valid go back to the orignal page and dont add it to the .t...

0
Q: Remove specific entry from database with PHP by via id

CataneoI am trying to make a button for a manager to remove an employee from the list. I know I'm doing something wrong because it automatically removed all that manager's underlings. I actually want the remove button to only remove them when pressed. Here is my function: public function view_team($us...

0
Q: how to update a qunatity if itemname is same in mysql using php

user2938105when i got a item from company then i enter a all item detail in my PHP form and its save in MySQL and there are two table in MySQL one is receive and 2nd is stock so when i got a item its save in two table receive and stock but some time stock (table) item is same so i want to update if item ...

0
Q: How to define a static variable with runtime generated name

sunlight76in a php webapp I would like to some parameters from sql. App is growing so parameters could be added. At user login I would like load parameters to static variables to be used during the session. Actually I load them at every page change, but I'd like to improve performances. Actually i read a...

0
Q: Zend Framework 2: Database connection in view helper

StonerI found a few other posts relevant to this issue, however i wasn't able to achieve what i wanted so i decided to delete everything and start over with some help... This is my work so far, which does the job but the data are provided hard coded in an array and i need to create a database connecti...

0
Q: SELECT DISTINCT for email but also get another column

user2956072Trying to get only unique emails but also show the shipping name. $sql=mysql_query("SELECT DISTINCT(email) As email FROM tbl_order"); while($row = mysql_fetch_array($sql)) { echo " ".$row['shipping_name'].",".$row['email']." <br />"; } But it does not show the shipping name, any help would be ...

0
Q: How to combine PHP's DOMDocument with a JavaScript template

James LongI've got a bit of a strange question here, but it's stumped me completely. As much as anything, this is because I can't think of the correct terms to search for, so this question may well be answered on StackOverflow somewhere but I can't find it. We have a proofing system that allows us to take...

-7
Q: how to start with website development as a beginner?

Shakti saxenaI am new to website development. Can someone tell or guide me on how to start with basic website development. which technolgies should I use and all the basic information? Thank you.

0
Q: Converting from DOMNodeList to string in PHP extra characters

Colm MulhallI have converted results from a web scrape from DOMNodeLists to strings: $node = $the_sentence->item(0); $the_sentence = "{$node->nodeName} - {$node->nodeValue}"; However now when I print out the result it includes whatever tag the text had in the page as well as the &nbsp character: Before: ...

0
Q: How to select a relationship to be a correct Boolean JSON value?

CL SoThere are three tables hotel hotel_room_type room_type hotel and room_type is many-to-many Now I just search hotel_room_type and room_type by hotel ID, to find out the room type in that hotel, and I also want to select the room type not in the hotel. The expected result should be something ...

-2
Q: Bio metric finger print extraction

sMilbzFor my final project at university I want to store fingerprints in a database using a bio metric USB finger print scanner. There is not a lot of information out there about it so I am looking to the world of SO. So once I have purchased the hardware and use it to scan my finger, what format is i...

0
Q: spl_autoload_register searching in wrong directory/file

NathanI have placed the following code in my functions file (MyFunctions.php): spl_autoload_register ( function( $Class ) { $Class = str_replace ( "..", "", $Class ); include $_SERVER['DOCUMENT_ROOT'] . '/phpsb/class library/' . $Class . '.php'; ...

0
Q: Are constants as evil as global variables and singletons?

Your Common SenseI've heard many times on this forum that using global variable is a dead sin and implementing singleton is a crime. It just came to my mind that old good constants bear all the features of these dishonored practices: they are globally accessed and no doubt they introduce globallest state ever. ...

-1
Q: can't close a current window and open new window

RedSunProblem in closing a window. i am using 4 files. link.html userdetails.php ultrapro.php final.php upto ultrapro.php its working fine like opening and closing but ultrapro.php file is not closing and not opening final.html file In userdetails.php file Working $query = array( 'username' =>

0
Q: var_export() and static class properties

TiMESPLiNTERI played around with var_export() and I'm wondering why static class properties not getting exported by var_export(). class TestStatic { public static $FOO_BAR = 'foobar'; } $testStatic = new TestStatic(); var_export($testStatic); Results in TestStatic::__set_state(array( )) Is there ...

0
Q: Regex - Remove single whitespace

hgerdinI´ve got a string that looks like this: "T E S T R E N T A L A K T I E B O L A G" And I want it to look like this: "TEST RENTAL AKTIEBOLAG" But I can´t seem to find the right regex expression for my problem. I would like to remove one single whitespace between each character. Kind Regard...

0
Q: Issues accessing returned JSON in Javascript

AlcapwnI am trying to send a JQuery AJAX post to a PHP page, and return a variable back to the Javascript. Javascript var username = $("#regFormUsername").val(); $.post("ajax/registrationcheck.php",{username:username},function(result){ console.log(data); //I have also tried console.log(data.te...

0
Q: How to store and fetch a fingerprint to a database

sMilbzFor my final project at university I want to store fingerprints in a database using a bio metric USB finger print scanner. There is not a lot of information out there on how to do this using JavaScript and PHP so I am looking to the world of SO. Can someone help to get me started?

 
11:56 AM
0
Q: Is it possible to get country details from serialized data without unserialize?

Sanchuabacies AbaIs it possible to get country details from serialized content without unserialize ? a:11:{s:8:"newsFrom";s:0:"";s:7:"country";s:2:"IN";s:15:"state";s:0:"";s:16:"region";s:0:"";s:6:"awards";s:0:"";s:7:"website";s:0:"";s:8:"facebook";s:0:"";s:7:"twitter";s:0:"";s:8:"linkedin";s:0:"";s:10:"googlepl...

0
Q: PHP/MYSQL JavaScript - Insert values of multiple dynamic rows into textfields

SiZaAs you can see in the JsFiddle, I have a table (it's a static example, but in reality it's dynamic) and it pulls out rows of data from a table. I want to be able to create one button which will inserts all of the values of the mobile number and the serial number into textfields. so if there are ...

-1
Q: Create a PHP Poll with just one vote per IP

MerlinI have an Ajax Poll for my website users, but in our case a user can vote an unlimited number of times after he refreshes the page, and the results are being recorded. I would like to let users vote just one time from their IP and after they have voted, at page refresh just to show them the resu...

-1
Q: Php calling javascript function

Marcelo AymoneI can do that? Im trying to call a javascript function after conditional php "if" <script type="text\javascript"> functioncall = (function(id){ alert(id); }); </script> <?php if(isset($_get['id']){ echo "<script>functioncall({$_get['id']});</script>"; } ?>

0
Q: Windowsphone to PHP communication through Webclient

Frank ProvostI want to upload an Image i selected with the PhotoChooserTask. The Selection itself works fine and i can open the Image. I also already decoded it to Base64 (Works). Since I can't find any working example on how to work with httpwebrequest on windowsphone I tried it the following way. pri...

0
Q: PHP for loop not getting all posted values

charlieI have a HTML Form where i can add rows dynamically, every time a row is added the number in my input field goes up each time each row there are 4 input fields and each one has the number on the end of the name on my submit page i have this PHP for loop: for($x=1;$x<=$_POST["number"];$x++) { ...

0
Q: PHP/SQL date sorting outputs nothing

KojakIt seems I'm having problem sorting my output as date. The column is date_added, but it does not seem to work very good. Here is my queries and loop, but the script doesnt seem to output anything at all! $select_votes = mysql_query("select * from images count(*) as TotalOccu...

0
Q: How to create pagination when using data from xml file

chirag NandwaniI am creating a search result page using json/XML over a link. I successfully fetch the data using for each but as there is a loop i can not able to set a pagination. There is no database from which i can get data and use pagination. Thanks in advance for help

-4
Q: How can I read user input using php alone

puchuHow can I read user input using php alone. I'm using form tags for handling user inputs.How can I do the same with Php alone.

0
Q: Yii application and Mibew chat to be compatible with each other

abramsenI use Yii framework and in the framework i use 3rd part application which is Mibew Messenger (or chat ).The both application have their own databases (the both have user table). The problem is next, 1st when i log in into my "main" application with username and password i want to be able to log ...

0
Q: Android get data from MySql table

roshanpeterI am developing an android app... where I developed a table in MySql and table has certain results for values of 1-10 and all the values are entered seperately ... in my android application when a particular value is displayed the result of that value has to be taken from the table... but it is ...

0
Q: Trying to configure ArrestDB. Something I think is wrong with my Data Source Name.

Brandon WillbanksI am trying to configure ArrestDB to create an api for my site. https://github.com/alixaxel/ArrestDB As it says in the installation I need to change the $dsn to: MySQL: $dsn = 'mysql://[user[:pass]@]host[:port]/db/; Currently I have $dsn = 'mysql://user:password@localhost/database/'; I trie...

0
Q: Sort results alphabetically in a recursive function

AnibelI was obliged to use a recursive function to fill a drop down list, however, when I tried to display results in alphabetical order using ORDER BY it didn't work! Below is my recursive function: function tree($root) { global $conn; $n=0; $result = $conn->prepare("SELECT id, name FROM perso...

0
Q: is running a repeating sql event scheduler every 1 second too taxing?

mickerI cannot find any answers to this anywhere. Is running a repeating sql event scheduler every 1 second too taxing for the server?

0
Q: php - Declare a global variable once within a class as aposed to within every function

TheApptrackerI would like to assign a global variable within a method that is within a class. Currently I have this setup and it works perfectly, but as you can see I have to declare the global in every method within the class. class myclass { public function functionOne($SqlVal){ glob...

-1
Q: php print page with header and footer in all pages depend on no of rows

Shivesh JaiswalHi i have a sql statement with php code and this query results 72 rows now i want to print this report but i want header and footer in all pages and every page limits only 25 rows. how to do this. here is my code <?php echo $header; $con=mysqli_connect("162.9.9.9","root","","lotuserp"); if (my...

0
Q: Using PDO with MySqls Like %%

jmenezesI failed with this. Despite all the answers here, I just cannot get this right. How do I bind a search term when using like in mysql with php's pdo? $searchTerm = 'kfc'; $stmt = $conn->prepare("select name from table where name like CONCAT('%',:searchTerm,'%')"); $stmt->bindParam(':searchTerm', ...

0
Q: Is it possible to combine two Mongodb queries ? #php

SreenathActually I have to date ranges, one is actual date range and the other is comparison date range. For each date range I'm executing two different queries. I selected aggregation method. Code I wrote for each date range is .. $resultsetpre = $db_1->command(array( 'aggregate' => 'ACCOUNT_PERF...

-1
Q: You have an error in your SQL syntax - Update SQL

user2536680I have the following code mysql_query("UPDATE `stocks` (`price`, `open`, `high`, `low`, `chng`, `time`, `percent`)VALUES('$pricez', '$openz', '$highz', '$lowz', '$changez', '$times', '$percentz' ) WHERE `symbol`=$symbolname"); And, it keeps throwing the following error: You have an error in ...

0
Q: application/msword insead of application/vnd.ms-excel

piernikBoth functions (mime_content_type and finfo_file) returns wrong mime type (application/msword) of my xls file. Question is why? This tool http://mime.ritey.com/ returns proper mime type - application/vnd.ms-excel I use script for attachement management for webmail and it has to be very universa...

0
Q: filtering the data based on different Ids using php and ajax

user2956205Hi Friends I am Generating report based on different ID's.please give me the suggestion to write function using php.how to use the ajax responce for this. please some examples for this using ajax and php. for example redbus.in filtering.I want to use same functionlay for my report.please pleas...

3
Q: How do I get the last used variable in PHP?

rubo77in bash there is something like $_ which is a temporary variable that stores the last argument of previous command is there such a thing in PHP or how can I access the last used variable in the script? this would be very handy for simple debugging functions.

0
Q: PHP CSV upload checking and skipping headers line

Sabri if ($_FILES[csv][size] > 0) { //get the csv file $file = $_FILES[csv][tmp_name]; $handle = fopen($file,"r"); //loop through the csv file and insert into database do { if ($data[0]) { mysql_query("INSERT INTO PowerFlex (customerCode, postCode,Name,...

0
Q: Display an image before each tag in Wordpress

Camilla WestinI have made custom posts with custom taxonomies. I am now trying to display an image in front of every custom tag. With the code below I can only se an image in front of the first tag. I'd like the image to show before every tag. <?php the_terms( $post->ID, 'case_tags', '<img src="theimage" />','

0
Q: Value of Array is Sting not integer

MarkPI have a multi-dimensional array which I need to pass to Google Charts. The script is called via Ajax, runs three times and then passes back the array json_Encoded. I then needed to add headers to the array so I used array_unshift(). here is the script $dataArray = array(); $i = 0; ...

-1
Q: Can I run a CRON job for an hour

Peter StuartI am creating an app that requires a CRON job to be executed every 60 seconds. My host only allows a CRON job once an hour. I was wondering if I could create a script like this: $i = 0; while(1==1){ // update database code delay(10000); // $i is incremented once a minute/10000ms $i++; } //i...

0
Q: Magento indexer.php - Duplicate entry occasional errors

Raul SanchezWe have a customer with a huge catalog (around 100k references) synchronized every night with an external ERP The synchronization process does not anything strange, just set some data for products & then save() them, using Magento methods & try/catch checks, so we can be sure the saved data is a...

0
Q: change label html from within the page

user2865808hi i'm new at programimg web pages, but i have this question, i need to change several labels in a html page an i need the change to be permament, the thing its i want to change it when the page its already loaded in the web browser, so however visit the page can change the labels. some friend ga...

0
Q: Laravel 4 - Dinesh/Barcode - QRCode

SinpatogoI downloaded this package : http://registry.autopergamene.eu/package/dineshrabara-barcode and i don't understand how does it works. I would like to generate a QRCode. But there is no documents which explain us how to create a basic qrcode. Someone ever tried this package and can explain me ho...

-2
Q: Coin game in php

user2956240Basically my problem is the following, two friends are playing a game in where they put all coins on a board in three piles, they can take the coin from whichever pile they want and I need to know who has the chance of wining more. The player x will always start first.

-2
Q: How seperate one array to two array by php

NguyenI have this array: $array = array(1,2,2,11,1,3,1,4,3,1); I want to seperate it to two arrays: $arr1 = array(1,1,1,1); $arr2 = array(2,2,11,3,4,3); How can I do?

0
Q: MySql timestamp query and comparison in monthly and weekly

Christian Burgosi have a table where i enter entries for applicants. it has a column date_added where the type is timestamp and the default is current_timestamp. i want to make a weekly and monthly report but i can't decide what would be the best thing to do. i need an sql statement that return the number of ent...

0
Q: E-mail not getting sent in PHP

user2956287I have the following code in a PHP file. $to = $row['EmailID']; $subject = "XYZ"; $message = "yes!!!!"; $from = "pallav123goyal@gmail.com"; if(!mail($to,$subject,$message,"From:" . $from)) { echo "Confirmation E-mail couldn't be sent to " . $row['EmailID'] . "<br>"; } else { ...

0
Q: Parse Mongo Json object to android [Display hello world from mongo to android applcation

peterodoherty92I need to parse data from a mongodb collection to android application where i will its can be parsed by json and displayed in the android applcation. `database->collectionName; $document = $collection->findOne(); echo json_encode($document); ?>` this is the php code for my web service i conn...

-1
Q: how to update if two row is same in mysql

user2938105this code is select item name and update value and i want if item name and company name is same then update like that $result = mysql_query("UPDATE stock SET quantity=quantity - $quantity WHERE itemname='$itemname',company='$company'") but its not working it is showing this error You ...

0
Q: How to write the .htaccess file?

Billeh SarkozyAnyone to help me re write this http://halisi-kenya.com/articles.php?id=30 to http://halisi-kenya.com/articles/tile-of-the-article

0
Q: Yii Framework syntax error, unexpected end of file

KonterI know parse error and such things are programmers 101, but I cant find whats wrong with the file and the error "syntax error, unexpected end of file" Following the tutorial helps me a lot getting to know php and Yii, but maybe the error isnt in that file, maybe somewere els. Hoppyfully you can...

0
Q: Can´t set cookies | SET-cookie header correctly

idontevenI can´t set cookies with setcookie(). I thought it´s really easy to set cookies with this, but it won´t work... What I found was this: Something to add cookies in a header with "set-cookies". This should solve my problem (I guess, didn´t try by now). Set-Cookie Header With Multiple Cookies Th...

0
Q: MySQL to MySQLi Convert Samples

Nenad dvLIf someone could just show me how to replace / fix it for mysqli I'd appreciate. Here are two examples, so I can learn from them and go through to fix everything required. Sample 1: include dirname(__FILE__) . '/database.php'; mysql_select_db(databasename, mysql_connect(server, user, pass))...

0
Q: OOP PHP make separate classes or one

user2956219I'm studying OOP PHP and working on a small project but I have hard time grasping some concepts. Let's say I have a list of items, each item belongs to subcategory, and each subcategory belongs to category. So should I make separate classes for category (with methods to list all categories, add n...

0
Q: Sending a PHP response to specified webpage

ChronnieI got a tiny question about PHP responses. I tried the tutorial provided by W3C School about Ajax and PHP. Everything worked fine. But now I want to send the response to another webpage instead of the webpage that triggers the event. This is my AJAX Code: function remote_function(int) { ...

0
Q: Generate links from folder names and link to file within. PHP

user2956284I'm trying to recreate this in PHP but having some difficulty. Basically I'd like to open a blank page with a List of of all folder names within a given folder. These will be presented as links, linking to the same PHP file I made earlier. i.e. folderA folderB folderX folderY If these were th...

0
Q: Why does my PHP site alternate between two cookie values?

samejeansonI'm currently building an online shop where you have many options to configure your product before buying. All configuration data is stored in the PHP session on the server. Although we have a separate button for starting a new configuration, it turns out that when helping clients many of our emp...

1
Q: cake : how to update a specific field in HABT relation?

Moyed AnsariI have $hasAndBelongsToMany relation between projects and documents and they are linked with associative table projects_documents(id, project_id,document_id). Something likes that class Projects extends AppModel { var $name = 'Projects'; var $hasAndBelongsToMany = array( 'Documen...

0
Q: Get Meetup events data through meetup open events stream in php

Sheikh JamesI am trying to get meetup events data through meetup open event stream API. http://www.meetup.com/meetup_api/docs/stream/2/open_events/ i am using the following code for get data . // Open a stream in read-only mode if (!($stream = fopen("http://stream.meetup.com/2/open_events", 'r'))) { d...

0
Q: Uncaught SoapFault exception: [SOAP-ENV:Client] true in

Bhavin Ranai m using php soapclent, other calls are working good with this URL.here is the snap of the request to be passed. not getting what is the problem ? ( ! ) Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] true in C:\wamp\www\ginger\createEditProfile.php:8 Stack trace: #0 C:\w...

0
Q: Radio buttons not working as they should

user2956297I have these two codes. When i submit my form, it always default to a checked no <td><input type="radio" onclick="selbustbl(1)" name="rdo2" id="busyes" value="yes" <? if(isset($_POST['rdo2']) == 'yes') echo " checked"; ?> />Yes</td> <td><input type="radio" onclick="selbustbl(2)" name="rdo2" ...

0
Q: supplying 'id' to the child 'list'(li) of the unorder list (ul) in codeigniter

user2956239normally in HTML we supply ID and class to the li of the ul is as shown below <html> <head> </head> <body> <ul id="ul" class="ul_class"> <li id="list1"> List 1 </li> <li id="list2"> List 2 </li> <li id="list3"> List 3 </li> </ul> </body> </...

0
Q: MYSQL/PHP Try to calculate to columns if checkbox is check

user2956333i have in a table 5 columns 1. pret 2. avans 3. tax 4. withtax (checkbox) 5. total ia want to calculate total with 2 condition: A. IF withtax is Checked then use formula: $values['TOTAL'] = $values['PRET'] - $values['AVANS']; B. IF withtax is unchecket then use formula: $values['TOTAL'] = (...

0
Q: What does Add DROP SYNTAX in X-Cloner of Wordpress mean?

The Quantum PhysicistWhat does "Add DROP SYNTAX" in the XCloner plugin mean? I checked the manual and it says something I don't understand. Add MySQL Drop: Tick this checkbox if you want XCloner to add the DROP TABLE IF EXISTS statement to your generated SQL. This option is only for advanced users. Ho...

0
Q: Postgresql select people you may know orderded by number of mutual friends

user1026090I'm building a social network, and I want my members to be able to easily find new friends. Just like in Facebook, I want to suggest them some people they may know by the number of mutual friends they have. My PostgreSQL database structure for friendships is as following: > PROFILES_FRIENDSHIPS >...

1
Q: I want to insert multiple data into multiple rows when a submit button is clicked in codeigniter

user2733443I want to insert multiple data into multiple rows when a submit btn is clicked Below is my html form <?php echo form_open('daily_shop_performance/insert_missing_records');?> <table class="table" style=" width:100%; "> <thead> <tr> <th>Days</th> <th>Shop ID</th> <th>Date</th> <th>Takings</th> <th>...

0
Q: Strict Standards: Only variables error -

user2956374I developed a joomla site (3.1.5) on url http://www.develop.breede.co.za and on there I have a PHP script for a call rates calulator that worked perfectly. I then moved the moved to http://www.breede.co.za and no3w the script works perfectly, but I get the following error: Strict Standards: Onl...

0
Q: how to create a sandbox merchant account in American Express payment Gateway API

user2956371I like to integrate the american express payment gateway API in my website. Is there is any posibility to create sandbox user account in AMEX. Can anyone suggest me how to create API user credentials in AMEX?

0
Q: PHP DOMDocument: Can't read Facebook RSS feed?

lauthiamkokWhy can't I read the Facebook RSS feed with $xml = ("https://www.facebook.com/feeds/page.php?format=rss20&id=34468042582"); $xmlDoc = new DOMDocument(); var_dump($xmlDoc->load($xml)); result, boolean false But when you place this address below on your browser, you do see the RSS feed, ht...

0
Q: Best way to pass and handle multiple parameters to an API

MusterknabeI'm creating an API that handles user data via $_POST. The API works as it is. What I want to do know, is to accept multiple URLs as $_POST parameter. But how would I do that? I thought the best way is that the user passes the values like that $array = array ( 'id' => 'id', 'id' => 'id2' ); Af...

-2
Q: SELECT query having 3 tables

pascale abou abdohy all, i have 3 tables in which i use the following query: $getquery = mysql_query("SELECT u_fullname , p_name, grade FROM description, users, projects WHERE description.user_id = users.u_id AND description.project_id = projects.p_id GROUP BY u_fullname, p_name, grade LIMIT $start, $per_page");...

0
Q: Extract using php on google app engine

divyenduzHow can I extract a zip file using php running on google app engine. I tried the ZipArchive class but it gives a class not found exception on google app engine.

0
Q: PHPmailer sending 3 duplicate emails when submit is pressed on a form

user2956222I have an issue with phpmailer sending duplicate emails, the phpmailer versions is 5.1, the code is below but I cannot find the error. I get 3 emails from the same contact form with duplicate content. Does anyone have a fix or can see the issue? } if(!function_exists('ProcessFormr')) { functio...

0
Q: How to redirect to a new page from alert popup in jquery?

JSLoverI'm having a radio button group of three radio buttons with same name but different ids as follows: <p class="custom-form"> <input type="radio" name="generate_paper" id="generate_paper_manual" value="manual" checked="checked" onChange="change_paper_generate_type();" /> <label for="genera...

0
Q: HTTP authentication header character limit for basic authentication?

Daniel CarvalhoI've researched that there is an overall HTTP request size limit, and read this is normally a restriction set by Apache. But considering there's a bunch of other headers I could send through, that I'm not, I highly doubt I'm reaching the overall request size limit. All I'm doing, is HTTP Basic a...

0
Q: CURL get one specific array

Michel VertongenI found this code on internet and its works, but it outputs like this Array ( [IP Address] => xxx.xxx.xxx.xxx [Country] => Netherlands [Region] => Regoin [City] => City => provider ) I just want to get the city in table 4 ( maxmind ) and outputs only the city instead of all the other things H...

0
Q: Edit data from blog in Iframe

holienI'm currently building a blog from scratch and I'm using php, javascript + Iframe to add new posts to the blog, and this works perfect. The problem I'm having is my "Edit post" function. When I'm editing a post it should fetch the posted text, and it sort of does. However it's got a Not found hea...

0
Q: Where to put some view code in Cakely way

user2956391Hi everyone and thanks for answering. If i want to remove some code from a view for simplify it, what's the correct way? I've created an element in Elements/model/some_code.ctp and call it from the view.ctp but my colleague suggests me to create a file in View/Controller/some_code.php and call ...

0
Q: PHPVideoToolkit - Fatal error: Class 'PHPVideoToolkit\Trace' not found

behz4dI want to use the class PHPVideoToolkit, and I just downloaded the package from Github, and after copy pasting it to my localhost to see the examples, I'm getting: Fatal error: Class 'PHPVideoToolkit\Trace' not found in E:\xampp\htdocs\video\examples\includes\bootstrap.php on line 13 Not foun...

0
Q: PHP simple form validation - help needed

user2955356Ok, what I'm trying to achieve is a very simple form validation like the following. Name: [required, min length: 2, max length: 255] Email: [required, min length: 3, max length: 255, valid email format] Date of Birth: [optional, format: dd/mm/yyyy] However I'm getting the following error whe...

0
Q: Foreach with if/else outside it's function

jerryI'am creating a Joomla Template (Joomla 3) well some of you may have experience with this, and will recognize the problem I got. When you insert Modules in to you template and leave them empty, it's still uses some space. To prevent this i would like to add a variable CSS class. As solution used ...

0
Q: Select players as team and mark in db as selected

custombrandsi have one table named players with 2 columns: players and status I need to select unique random teams! Every team has X players as: Y base and Z pivots Y and Z its set due input form If in insert 3 for base and 2 for pivots The result should be like 3 teams or 3 players: team 1 Base 1 Pivot 1...

-2
Q: Notice: Undefined variable: ids in

user2956413i have a script that works fine for years and suddenly i face this problem : please check the code and mend any solutionplease. any kind of help willbe appreciated. Notice: Undefined variable: ids in /home/content/a/t/a/ataasaid1/html/category.php on line 4 Notice: Undefined variable: id in /...

0
Q: Passing PHP variable to JwPlayer

SylphI'm looping the video URL from database and each video has a certain frame that I would like to "seek" to. I'm using the "seek" function provided from JwPlayer. However, I can't seem to get it right on how to pass the variable to JwPlayer javascript. Below is my JS for JwPlayer $('.video').fan...

0
Q: Slider captions remain fixed while slides are looping correctly in wordpress

AdrianI have the following code in wordpress index.php <div id="sliderwrap"> <!-- Start Slider --> <div id="slider" class="nivoSlider"> <?php query_posts( 'category_name=Uncategorized&posts_per_page=3' ); while ( have_posts() ) : the_post(); ?> <?php the_post_thumbnail(array(...

-3
Q: PHP set a variables from $_GET['var']

jmenezesIs it possible to set a variables value from a $_GET['var'] doing somthing like this: if( $foo = isset($_GET['foo']) ) // Or something close to this. I.e if $_GET['foo'] is set assign it's value then and there instead of this like I currently do if( isset($_GET['foo']) ) $foo = $_GET['foo'];...

0
Q: PHP how to secure password in database

LodhartI'm using data from another server (not my server) and I need to login to this server. So I need to know password for every user account. I need to send this password to the server through HTTP request (no problem). But the server expect unsecure password. So if the password is '123456' I have ...

0
Q: Failed to load resource: the server responded with a status of 500 (Internal Server Error) - Testlink php

user2956452I have installed testlink in my ubuntu server. Some of the pages are showing empty. When I enable display errors on . I got the following error in my browser. Help me to get rid of this issue. Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/test...

0
Q: PHP arrays replacement

user2903728$data = Array ( ['key1'] => 1 , ['key2'] => 20 , ['key3'] => 11) $key1 = Array (1 => "a" , 2 => "b") $key2 = Array (1 => "a" , .... 20 => "y") $key3 = Array (1 => "a" , .... 11 => "n") what is the easiest way to replace all values in $data array to return: $data['key1'] = $key1[$data['key1']]...

0
Q: Error when using XHProf and XHGui

codecowboyI have installed and configured XHGui as per the instructions here: http://www.sitepoint.com/the-need-for-speed-profiling-with-xhprof-and-xhgui/ However, when I try to profile a page I see an error inserting into the details table (have truncated this as there is a large string of binary/compre...

0
Q: How to use sanitation with Wordpress Built-in functions?

Dejo DekicI am having an issue with understanding when to use (or not) Wordpress sanitation functions. For example according to Codex this is how we can use get_month_link() to create a "posted on link" (so when we click the link it will take us to list of posts published at that time). <?php $archive_yea...

0
Q: php index.php, add to cart issue

user2950085I am having trouble executing this code in my index.php. It says 'CartAction not set' I need your help php gurus. I can display any files you need to fix this error. Here is the code: // Handle AJAX requests if (isset ($_GET['AjaxRequest'])) { // Headers are sent to prevent browsers from c...

0
Q: CURL get specific arrray

Michel VertongenI found this code on internet and its works, what this script does is go to http://www.iplocation.net/index.php?query=223.196.190.40&submit=Query and get the information of country, city, ips etc. outputs it like ; Array ( [IP Address] => xxx.xxx.xxx.xxx [Country] => Netherlands [Region] => Rego...

0
Q: Google map is not update new geolocation when i moved the marker to new position

Alexthis is my google map code. I'm trying to update new latitude and longitude when i moved the existing marker to new position. But I don't understand why the following google map code is not updating the new latitude and longitude when i moved it to new position. Can you tell me what is the wrong ...

0
Q: How-to include if(isset inside a query

user2838753This little piece of code gives Notice: Undefined index: . I know it can be fixed by using if(isset()), but I have no idea how to place this on the correct matter in this $query line. Tried a lot, but can't get it right. <?php $query = mysql_query("SELECT `id` FROM `place` WHERE `placeno` = '...

0
Q: PHP Simplexml not showing id

user2956473I am trying to show the document id wich is show in this feed: http://www6.lexisnexis.com/publisher/DataFeed?Action=GenerateXml&orgId=102593&topicId=all Now this is my code: <?php $completeurl ="http://www6.lexisnexis.com/publisher/DataFeed?Action=GenerateXml&orgId=102593&topicId=all";...

0
Q: PHP/XML help google store locator tutorial

user2954486umm basically I'm relatively new to PHP, I've been trying out tutorial (see link below) and I keep on getting an error, I've googled it but nothing seems to work :S The error I get using Chrome is: This page contains the following errors: error on line 1 at column 3: xmlParsePI : no targ...

0
Q: JSON OUTPUT in spanish language

Sam KhannaI am working on an ios app and developing web services in PHP. This app is in spanish so I want all the json results should also be in spanish so that I can display them directly. All the third party api's like google and bing translator are paid. For example: I want to convert {"name" : "sa...

0
Q: Using a PHP session variable within a MySQL file run in PHP?

Sean LimpensIt might sound a bit confusing, and perhaps what I'm doing isn't right at all, but here goes. Our users can upload .csv files containing their school's data, exported from an external management system called SIMS. Once they upload that file I want to run a .sql script that updates our database ...

0
Q: CrossBrowser: File Upload Issue (HTML+PHP) - NOT TO UPLOAD IMMEDIATELY

E2BIs there a possibility to NOT upload a file IMMEDIATELY, but to store maybe in an array to upload it in a later step? I want to ensure is that the user can navigate freely between the form pages and then upload the files in the last step. The only way I know is to encode the files and store them...

0
Q: php / apache2 - shorthand if (bug - discussion, finding an explanation)

Markus SteindlThis is something very weird I could not explain, but probably some of you already found the same or a similar issue? Imagine the following pseudo PHP code: <?PHP mysql_connect("localhost", "mysql_user", "mysql_password"); mysql_select_db("mydb"); $result = mysql_query("SELECT id, my_nam...

0
Q: create a playlist using deezer

Stanislas PiotrowskiI'm trying to do a library using deezer Iframe So in database I store all the id of the the playlist I want to display And in front office I have that code <table style="width:100%"> <tr> <td>Nom de la Playlist</td> <td>Date</td> <td>Genre musical</td> <td>A...

-18
Q: Convert php to javascript

user2404977I have a problem writing AJAX. Can somebody convert this php to javascript. ASAP. <?php $a=file_get_contents('/cms/6700893/value_4the.txt', true); $number = 236+$a; $filename = "axh".$number.".txt"; $file = file_get_contents('/cms/6700893/'.$filename, true); ?> Thank you

-3
Q: PHP Simple Form Validation

user2955356Ok, what I'm trying to achieve is a very simple form validation like the following. Name: [required, min length: 2, max length: 255] Email: [required, min length: 3, max length: 255, valid email format] Date of Birth: [optional, format: dd/mm/yyyy] However, once i click submit (either if the...

0
Q: PayPal IPN e-mail not sent in Live mode, but works fine in sandbox mode

John Doe SmithI wanted to go live with a site today, but PayPal doesn’t work correctly in live mode! :( In sandbox mode everything worked fine: The user clicks a button on my site, is redirected to paypal and after payment he receives an e-mail with a download link via IPN and is redirected back (automaticall...

0
Q: Value is NULL Codeigniter

JohnSmithIm trying to create the following statement (which works): SELECT id, COUNT(*) AS item_count FROM message WHERE user_id_to = '1' AND read_date IS NULL GROUP BY message_id With Codeigniters Active Record. My code looks like this: $this->db->select('id'); $this->db->from('message'); $this->db->...

-1
Q: I want to be a programmer, work in corporate environment, earn well, learn fast and also become a great programmer.

Shin SanI'll try to keep this simple: I'm 29, been dabbling with computers for the past 10 years, had entry level jobs in tech support for different apps, been fixing computers for a while and now want to specialize in something. I'm not 100% stranger to programming but haven't gone past if/then/e...

0
Q: PHP PNG image creation outputting wrong colors

chaenselI am trying to put an png overlay over an underlying png file. The script works just fine, but instead of giving me the overlay colored as it should be, it is outputting it in gray color. But only the overlay image is gray (bg-color of the overlay, which is basically a border for the underlying ...

0
Q: Making form fields conditionally read only (PHP)

ChrisLet's say I have several series of form fields in table rows: f1, f2, f3; g1, g2, g3; h1, h2, h3 etc. Now let's say that I have a username stored in a PHP session variable that may match a field value in one of those series. Here, the field value that might be a match would be f1(echo $row['pers...

0
Q: Some help to factorize code base on permission

user2956550Morning, with this code (symfony mask builder) MASK_VIEW = 1; // 1 << 0 MASK_CREATE = 2; // 1 << 1 MASK_EDIT = 4; // 1 << 2 MASK_DELETE = 8; // 1 << 3 MASK_UNDELETE = 16; // 1 << 4 MASK_OPE...

0
Q: Getting the request headers send via file_get_contents()

Szerémi AttilaWhen using file_get_contents() to request an external URL, how can I find out what headers I've sent, or alternatively what headers I am about to send? I'm basically looking for a request counterpart for $http_response_header or anything else I can use to extract the same data. I know I get to s...

0
Q: PHP XMLreader to MySQL: put Id value in every insert

user2956549I'm currently working with XMLReader, which I'm using to try and parse certain elements into a MySQL query. test.xml <item> <id>100</id> <productdata> <g:material>paper</g:material> <g:size>25cm</g:size> <g:price>69 EUR</g:price> </productdata> <productdata> <g:material>paper</g:material>...

0
Q: Aarki PHP postback need help to make postback.php

user2956586http://i.stack.imgur.com/mBYxt.png Hello.I need some help about aarki postback.I will use Aarki SDK and need to Aarki postback files. Can anyone help me about how to make postback.

0
Q: Import file from one server to another

user2711135I am looking for the best way to save image located on the web( example: http://website.com/image.jpg) to my server(upload from the internet). I am lookign for a methos in php or JS. Thank you.

0
Q: php exec() syntax check

BorislavThis works in the command prompt(in one line) : cd C:\Program Files (x86)\LibreOffice 4\program && "C:\Program Files (x86)\LibreOffice 4\program\python.exe" unoconv -f pdf d:\class1.doc but when it comes to do the same in PHP's exec() nothing happens - neither message nor any file, probably ...

0
Q: How to make dynamic php divs for content instead of hard coding html

RobbieP14383I have written from a tutorial, the code below which gets the content from a table in the db but the divs that the content are in are hard coded into the html file. How can I turn this code into something that will create as many divs as necessary depending on the quantity of the content. I mean...

0
Q: php pdo construct mysql call extremely slow on drupal 7 site using nginx and php-fpm

williamelworthyI have a drupal website that is calling the static PDO __contruct for a mysql connection, on a remote server at first and then changed to a local server to remove network latency for sanity checking. On the local db call I am getting the following generated from xhprof and an extremely slow page...

0
Q: Nortel Baystack 5510 snmpwalk PHP

user2956620I have Nortel Baystack 5510, LAMP (PHP 5.5.5) and snmpwalk script (mac-adresses) <?php @Header('Content-type: text/plain; '); $a = snmpwalk("192.168.xxx.xxx", "public", ".1.3.6.1.2.1.17.4.3.1.1"); $keys = array(); $values = array(); $array = array(); foreach ($a as $key => $value) { $keys[$key]=...

0
Q: Read blob image from database

user2956642I am trying to display my images uploaded to my database on my PHP website. I have the following code. This only displays the blob binary value. I want it to be an image. If I add a content-type header is gives me a blank page with an broken image. include 'core/database/connect.php'; $q = "SEL...

0
Q: Why ajax call does not work on IE7

user1960170I am developing an app for a company i work for but this ajax call only works on IE9+, FF, Chrome . I've been reading around without much luck. Here is the code i have.It is pretty simple: var request_getShoppingCart = $.ajax({ url:"classes/sCart.php?action=getItems", cache: false, });...

-2
Q: incorrect if statement value returned

green green grassI have an apparently trival if statement that just won't work correctly. if (!empty ($_POST['interest']) && (float)$_POST['interest'] >= 0) { when $_POST['interest'] is 0 or positive it should return true. However when it is 0 it is currently returning false incorrectly. What is going on here?

0
Q: How to write custom url for users

user1477731I'm currently redirecting users to www.example.com/admin.php?id=shop1, but I want the url to look like www.example.com/shop1 . How can I use mod_rewrite? Thanks

0
Q: html and php form field and submission

user2647160I have a short html form and some php code on the same page so that when the form is submitted, the entries appear on the same page. This code works as far as posting the entered information from the form to the page, but I have 2 problems: The text box for some reason was only letting me enter...

0
Q: Are PHP frameworks needed in this specific situation?

henrehSearching finds a few specific questions about the value of PHP frameworks, and I'll go into why I don't think they apply here. Basically, I'm embarking on a PHP app with one, maybe two other developers. I've been wondering about doing it with a framework and have been extensively researching Ze...

0
Q: getCustomizationId operation: Netsuite API and PHP Toolkit

user2650211I am having exactly the same problem as here: Missing "getCustomizationId" in netsuite 2013.1? I just refused to give up on it. I have investigated further and by running the code in the post just pasted I get this error: Stack trace: 0 /home/netsuite/PHPToolkit_2013_1/PHPToolkit/NSPHPClient.p...

-1
Q: How to edit .htacccess file programatically

Mike0I am working on some kind of php MVC framework and i want only some files to be accessed on the users request. This files my vary so it is not a solution to hard code on the .htaccess file. So my question is how can i achieve this logic?

0
Q: php DateTime diff method behavior

Paolo RossiI have to find the days until an expiration date. I tried to use diff method of DateTime class. $dataexp = 2013-11-06 00:00:00 ; $now = 2013-11-05 13:00:00 ; $dtn = new DateTime('now'); $dte = new DateTime($dataexp); $diff = $dtn->diff($dte); $diff ---> display 1 My problem is if the dataex...

0
Q: codeigniter session Error was encountered

coderin my localhost it works perfectly but after uploading it to server i am seeing this error A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/alpha/public_html/blog/application/controllers/h...

0
Q: mysql_num_rows returned with ajax

Christian Burgosi need to pass two dates to a mysql query through ajax. i have two date inputs. this is the index.php that has the input <div id="input"> <td><input type="date" name="date_start"></td> <td><input type="date" name="date_end"></td> <input type="button" class="button" value="Get Value"> </div> <d...

0
Q: Joomla3 component add additional registration fields

XavjerI am currently creating a shop-like component for Joomla 3. For this component, I will need some additional user-fields (Address) for the processing of the order. My question is as follows: What would in your opinion be the best way to achieve this: Edit the Joomla Login component and add the...

0
Q: Twitter does not authenticate new customers

dev-nullI have an application with approximately 200 users that sends status updates for them on a cron job that runs every minute. The users are checked each minute and if they're due to send a tweet then they are added to the queue. The users set a time interval for how often they'd like tweets to be s...

0
Q: Create file from JFIF data

Erik DolorI have a dump of our LDAP database, and i'm attempting to extract all images from it using PHP. The images seem to be stored in JFIF format (at least, according to http://tools.ietf.org/html/rfc2798#page-5). However, i can't figure out how to create a JPEG file from this; I attempted file_put_con...

0
Q: Web service AJAX Post on iOS getting error 400

ByteBackground: I wanted to create a hybrid application that can change form factor at will. This requires the app to embed a webView. This webView also should be able to talk back to the back end server. I host the back end on my Mac (localhost) with really small php code. API <?php function get...

-7
Q: What is the best language to develop a Project Management web application?

user2956697I have knowladge about Java, JSP, Servlet, php, html, css. Now I'm going to develop a project management web application. Can anyone tell me what is the best language for this project. And please help me to find resources.

-2
Q: My contact form isn't working

RicoI received this code from my host for my contact form <?php $request_method = $_SERVER["REQUEST_METHOD"]; if($request_method == "GET") { $query_vars = $_GET; } elseif ($request_method == "POST") { $query_vars = $_POST; } reset($query_vars); $t = date("U"); $file = $_SERVER['DOCUMENT_RO...

 

« first day (259 days earlier)      last day (51 days later) »