« first day (279 days earlier)      last day (31 days later) » 

12:02 AM
0
Q: PHP - strftime output in another language is garbled

arvinsimI have this code in PHP to translate dates to their locale $date = time(); $locale_code = 'en_NZ'; $format_full_date = '%e %B %Y at %l:%M %P'; // 21 August 2013 at 3:26 am // Set locale setlocale(LC_ALL, $locale_code); // Get date $locale_date = strftime(lang('format_full_date'), $date); // ...

0
Q: AGILETOOLKIT :: js()->..->execute() must be used in response to form submission or AJAX operation only

Qambar RazaI am getting this error when i do form submit. here is my code: View class View_Tabs_Activities extends View { function init() { parent::init(); $f = $this->add('Form', null, 'PostForm'); $f->setModel('Post'); $f->addSubmit(); } function defaultTemplate() { return ...

0
Q: php how to find SUM of Total payed by class

user3029499I have this script which enable user to search Mysql database and it return exactly SUM of total amount payed by a certain class from (2000-2013). But is not more profitable to me if it return SUM of Total from (2000-2013) as starting year up to ending year. What I want and difficult to me to q...

0
Q: two ajax request from one page

user3006683Simply I would like to load data from two php page using jquery. I put the below code together, however only the one works not both. Any ideas? $(document).ready(function() { loadData(); }); var loadData = function() { $.ajax({ type: "GET", ...

0
Q: JQuery toggle not working inside PHP code & div tag

user3029496I am trying to toggle an image to make a form appear/disappear when I click the image. This works fine in jFiddle if I strip all the PHP code out. This is my first post here. I hope I'm explaining well enough. This is my jQuery code: <script> $( "#show" ).click(function() { <br> $( ".rename" )...

0
Q: Not able to insert string which contains '

user3027531I have wrote a script to insert record in my DB. The only issue I am getting is when I try to store data which contains ' character then the script doesnot work and it doesnot store anything in the DB. Forexample Jhon's Birthday , Amy's Home etc . Any solution to this problem which allows special...

0
Q: Php files show blank page

user753152i have php 5.3.1 installed on apache2 in ubuntu 12.04 server . my site was working fine untill last week when i found some of the files were missing and website was not showing.I uploaded site again on server and now when i browse any php pages it shows a blank page and also when i try to see the...

0
Q: Need help getting wp-filebase to include email form

user3029517Well I'm a long time reader of the site, but first time poster, I've just never needed to before. I generally find the information on this site and others enough to allow me to work out what I need, but after spending days trying to do this, I am pretty stuck. I am creating a client's site using...

-1
Q: Adding img dimension attributes into php code

user3029551I'm having a bit of issue adding image dimensions into my php code for my wordpress site. While I checked page speed through GTMetrix, they suggested me to add image dimensions specifically to increase page load time. Here's the code line calling those images: div class="postdate"><img src="<?p...

0
Q: Error in login page with CodeIgniter and MAMP

ConiCI'm doing a tutorial for a login page with CodeIgniter and I'm using MAMP. This is my controller: class Login extends CI_Controller{ function __construct() { parent::__construct(); } function index() { $data['main_content']= 'login_form'; $this->load->view('includes...

0
Q: Search MySQL table based on optional form inputs

Alex SchittkoI'm trying to write a function for my customer system that can search the "customers" table based on one (or more) inputs from the search form. The code is posted below $lookupCust['userid'] = mysqli_real_escape_string($mysqli, $_POST['userid']); $lookupCust['name'] = mysqli_real_escape_string(...

0
Q: Symfony 2 Add to favorite feature using AJAX

CloudJediI am trying to create an Add to Favorite feature for a report in Symfony2. When clicked on a Star icon(Add to favorite), a record has to be inserted into the DB with (report_code, userID). When user deselects the Star icon, the record needs to be deleted from the DB.(Delete from favorite) The re...

0
Q: No such table exists php POST file

William BraskyI am receiving a file via (sqlite file) and trying to connect to it using sqlite3. I tested this all using a sqlite file that was already on there on the server but now that im trying to do it when it gets uploaded I am trying to do operations to it. I am getting the error that not table exists...

0
Q: Insert custom field into static DOM element - WordPress

kslambertI am creating a custom archive page for a WordPress media site. I have a static modal containing some Vimeo embed code, each custom post has a custom field which inserts the Vimeo ID into the embed code. In my single custom post pages I have an image that reveals the modal with the correct video...

0
Q: DATEDIFF - Querying custom/user defined dates

user2995389I recently asked a question about this issue and got an amazing response, so I thought I would try the same thing again. I have a SQL database built in SQL Server 2008. In terms of this database, I have no issues drilling down into the information to get sales relevant data. There is one except...

0
Q: Laraval API controller structure?

Azrul RahimWhich one this controller structure for user api make sense Separate controller for UI and API for every api version /app/controllers/UsersController.php /app/controllers/api/v1/ApiUsersController.php or Separate controller for UI and API and handle versioning in code /app/controllers/Users...

0
Q: Fill textbox with info from address bar

GettinBetterI have a page that needs the user to input a promotional code from another page, depending on what choices they make. Now I'm not sure how this is done....or even if it's possible with my lack of knowledge. But I'd like to give it a go. What I'm trying to do is make the promotional code they cli...

0
Q: How can i get these HTML/XML-Tags as a String via PHP?

anewphpguyi need some table values as String in my php script. The HTML-File looks like: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> ... <body> ....

0
Q: Update db if mysql transaction ends or break?

Peter WesterlundIs it possible to update a database data from 1 to 0 if the ongoing mysql transaction ends or break? Need to have that data so I can stop the code from be executed by others simultaneously.

0
Q: PHP / SQL out of memory: Fatal error: Out of memory (allocated 1310720) (tried to allocate 4294967296 bytes)

DiegoI'm running the following query, with two longtext fields (175 & 525), and I get the error out of memory. Is this query already too long or is something else happening? Error: Fatal error: Out of memory (allocated 1310720) (tried to allocate 4294967296 bytes) $query = "SELECT username, url, acc...

0
Q: Curl in PHP, SSLV3 works in bash but not in libcurl

user2029890This command works directly in bash: curl --sslv3 -k 'https://www.test_site.com/test/abc.do' It does not work in bash without both --sslv3 and -k I've been trying to replicate in PHP with the following code but I get no response at all. Not even an error. Would appreciate any advice. ...

0
Q: PHP/PDO: Mysql insert function

RalphI'm trying to create a pdo mysql query function. This function works just fine if it only takes on array value but if its more than one value, it switches values on the bindParam() part. public function db_qf($table, $fieldvalues, $where) {//query function $sql = "INSERT INTO " . $table ....

0
Q: Error session_start(): open(/var/lib/php/session error

user3022919I am running my webserver and get the following error: Error starting session: session_start():open(/var/lib/php5/sess_hienlq7a0i6im8tvfel989ji25, O_RDWR) failed: No such file or directory (2) Reinstalling php5 gave no results.

-1
Q: Create Gift Registry using PHP, MSQL, HTML

user3029593I'm new here, and new to mysql. I would like to create a gift registry style checklist for a website so that users can go online to see the gift registry and choose from selected items, when they choose an item they select it via checkbox and submit a form. The form will remove the item, or mark ...

0
Q: validating the captcha codeigniter

Aoihey guys im trying to validate a captcha code in codeigniter. is there an easy way to validate the captcha? here is my code and it is not working because everytime it loads the page it will call a new captcha which will replace the word in the session. public function index() { $originalS...

0
Q: New block for price comparisons on product page

SimonI am migrating my existing site (www.salterkitchenscales.co.uk) to a Magento 1.8 (www.gynogapod.co.uk/scales/kitchen-scales.html) I have successfully created the 2 additional tables in magento database and have populated them. sks_prices sks_retailers In my original site I used this SQL to d...

0
Q: Google Maps Clustering markers and markers from DB with function $get - how to do it?

user3029558I'm Greg I've got a serious problem to cluster my markers on my google map, because my markers come from db mysql through json and I tried a lot of things to cluster and nothing works. Here is my map http://www.goget.pl/google/31.html Can anybody help me, please???

0
Q: TypeError: "input#".val is not a function

user3029601what i am trying to achieve is getting the 2 values from the drop down mean then send it to a php file then returns then updates the input field with the data, all works great apart from the final part which get the value into the input field, i am getting the following error "TypeError: "input#...

0
Q: PHP/MYSQL login error?

user3025939I've created a registration/login system for my website. It encrypts/ salts the password. The thing is, to enter my website I have to type in the encrypted password not the actual password I signed up with. Resgister.php <?php include 'header inc.php'; $error = ""; if (@$_POST['register'])...

0
Q: Firebug can't individuate css selector

Stefano MaglioneI'm trying to catch a css selector by firebug of a part in html page but seems doesn't exist and firebug can't see it. It can't see the dotted line between the item menu on top. This is the website: http://debatoversigt.dk/index.php/ct-menu-item-3. Maybe this dotted line is made by a php script? ...

0
Q: Get seeded random values in an interval

Tomáš ZatoI want to generate a session IDs in such way, that never two IDs occur. The IDs are supposed tobe, say integers from 0 to 2^32 (4byte unsigned integer). This makes it impossible to use just rand() because there would always be a possibility of two same IDs at a time. What I actually want is to ...

0
Q: Image cropping on mobile browser

GhostCodeI have a function that lets a user upload an image, then crop and resize it within a frame and then save the cropped image for later use. My problem is that I want to offer the same functionality for mobile users, but the crop must be 500 x 500 (pixels) and I can't show a frame of that size in s...

0
Q: Every 150 spent gets a 20 credit, but if 160 is spent, no credit is applied

Alex SchittkoI'm writing a customer loyalty system. I have a page where I type in the user's customer ID and the amount they spent. I want to write it to where every $150 they spend, they get a $20 credit they can use, but I ran into a bump. Let's say the user's current balance is $140. They need to spend...

 
1:19 AM
0
Q: How to create a search to specific columns?

user2714558How do I search a database using a specific field search? This code also needs to be secured from SQL injection but here is the basic code for learning purposes. The database connects but doesn't show the data. Please help! Here is the html input form. <h2>Search</h2> <form name="search" ac...

0
Q: Parse error: syntax error, unexpected '">' (T_CONSTANT_ENCAPSED_STRING)

user3029650Why the error? Parse error: syntax error, unexpected '">' (T_CONSTANT_ENCAPSED_STRING) It says it was happening on this line, please help! <input type="file" name="file" />

0
Q: How to create multi-backup database in MySQL?

JerielleJust want to ask. Is it possible to create a simultaneous back up in Mysql? For example if I have database1 and database2. All I need to do is, Anything that happens in database1 should be happen to database2? Meaning the database 2 is my backup. And can I do this in different host? Let's say my...

 
1:31 AM
0
Q: php+imagemagick - gifs go wrong

user3008805This code crops an image to square and then makes a 300x300px thumbnail: exec("convert $original_img -set option:size '%[fx:min(w,h)]x%[fx:min(w,h)]' xc:none +swap -gravity center -composite -thumbnail 300x300 $new_img"); exec("chmod 644 $new_img"); Problem is, when the image is an animated gi...

0
Q: How rename name files directory in elfinder2

learnerGood day. I use elfinder v.2; directory files: 'path' => '../files/243234345/' In modal window i see next: I would like that path files will be 'path' => '../files/243234345/' but inside of 243234345(see screenshot) will be write Home ? Tell me please how make it? P.S.: sorry if bad ta...

0
Q: Open page in modal box

papao surnameI have a script that restrict the click on a href link if there;s no checkbox selected. I want the editpr.php open in modal box. The problem is I'm not familiar with modalbox. Any help? <a class="button edit" style="cursor:pointer;" ><span><b>Edit Purchase Request</b></span></a> <a class="button...

0
Q: How to POST to another page without user interaction?

user1086516So I have a situation where a user submits some data through forms, then clicks a submit button which directs to a separate .php page where processing is done. After the processing is done I need to go to another .php page and send along with it a POST variable I already know the value of. In ...

-1
Q: Query fails when using ' instead of `

user3026745I download some code and I thought replacing ` with ' would be apporiate, but everytime I do I get SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''users...

0
Q: I want to return an integer from a sql query not "Resource id #7"?

Trevor KeatingJust for now I am trying to output the value of the highest j_id row. $result = mysql_query("SELECT max(j_id +1) FROM journey"); I'm also adding that 1 to j_id purposely. It works fine within the phpmyadmin panel. But when I try to use it within any php script I get back resource id. I know t...

0
Q: How to set original image height & width on resize script?

Attis BarrosI've finally been able to complete the script for an multiple image resizer, currently it's resizing the original image into 3 other sizes, but I am unable to figure out how to set the original height and width. I have used the getimagesize() but it does not seem to work. The whole code is here ...

0
Q: Show all MySQL databases with PHP

JadarI'm trying to show all the tables in my database. I've tried this: $sql = "SHOW TABLE_NAME"; $result = $conn->query($sql); $tables = $result->fetch_assoc(); foreach($tables as $tmp) { echo "$tmp <br>"; } but it only gives me one table name in a database I know has 2. What am I doing wrong?

0
Q: Post Dynamic Inputs that are Appended with jQuery

misterManSamI have found multiple questions that are the same: dynamically inserted form inputs aren't posted and jQuery not posting all inputs of a form after the .append() Most are caused by opening the form within a table or div or a problem with the html. I don't believe I have either of these problems,...

0
Q: Codeignitor on Ubuntu no welcome message

54N1I am trying to run CodeIgniter (2.14) on Ubuntu 13.10. I have put the files in "var/www/CodeIgniter" but when I enter the directory from the browser it dos not show any welcome message as it did previously when working with CodeIgniter on Microsoft Windows 7. I have verified that PHP works on the...

-3
Q: Can someone help me decode this obfuscated file?

user3029709This file was using eval(gzinflate(base64_decode but then it came with this, is there anyway to decode it? <?php if(!defined('xhc_wpa')) header('location:/'); global $wpa_col; $v989c440ece505dcaaf83155fed13f85e = nb4a88e6f621eeee0224f37989ad8dfe9( $v989c440ece505dcaaf83155fed13f85...

-10
Q: strange error PLEASE HELP ME

user3029650 Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in CODE: <?php if(isset($_POST['submit'])) { echo "<br />".$name." has been uploaded!"; } ?>

0
Q: Create a Category Grid With Multiple Photos Per Product in Magento

user1672219I would like to know if it’s possible to have several main product photos in a category grid in Magento Community Edition. Specifically, I have simple products, but when browsing a category (always in grid form), only show bundled products (each containing 1-4 simple products). Since I don't hav...

0
Q: CakePHP How to locate

user2957155Normally i used this code $.post( "DB.php", { action: "save", start: calEvent.start.getTime()/1000, end: calEvent.end.getTime()/1000, title: calEvent.title, body: calEvent.body, id: calEvent.id, success: funct...

0
Q: Check the radio button based on the value fetched from mysql database

user1495220For my app I need to fetch the data from the database and mark fields accordingly. I am stuck with how to mark the radio button based on the value fetched. I am sharing the code I wrote to fetch the data and the radio button which I need to check. $Medical_Record_Id=$_SESSION['Medical_Record_Id'...

 
2:23 AM
0
Q: Is there a way to convert PDF files to HTML/XHTML using PHP?

user3029789I need to convert PDF files to HTML using PHP. Pages are separated in s which will contain text/photos form PDFs as elements in HTML. Reason: I need to animate those elements using CSS when a user uploads a PDF, so I need it in HTML format.

 
2:47 AM
0
Q: When would a script be included twice in PHP?

DataRaiderGameThis is my first post, and I really like this site so far. Now on to my question: I know that include_once and require_once will only allow the called script to run once. My question is, if I don't use _once, would it always run multiple times? Does it run more than once by default? I searched fo...

0
Q: Sharing utility functions application-wide

MatthewThere are some utility functions that I use in many classes of my application, some examples would be : private function _trailingSlashIt($s) { return strlen($s) <= 0 ? '/' : ( substr($s, -1) !== '/' ? $s . '/' : $s ); } private function _endsWith($haystack, $needle) { return $needle === "" || ...

0
Q: Get each line from textarea that gets pushed to new line

bryanSo I have a bunch of textarea's ranging for 2-5 rows each. I am trying to separate each row into an array. Now normally we can do this by: $array = explode("\n", $textarea); But, what if you have a string that goes into a textarea that just get's pushed to a new line because there is no more sp...

0
Q: Submitting file to Google drive

Mehedee Rahman SetuI was trying to submit file to Google Drive. Though the file is uploaded to drive, I am getting error after hitting accept button. <?php require_once 'google-api-php-client/src/Google_Client.php'; require_once 'google-api-php-client/src/contrib/Google_DriveService.php'; $client = new Google_Cli...

-1
Q: How can I have a real time, interactable ssh program on the web?

JoshI have a program that can be launched through ssh. What would be the best way for me to launch that program, read its output in real time, and input into it through some sort of web interface?

0
Q: PHP CURL using JSON 413 Error

user2743209Below is PHP using CURL with JSON to POST data to the MemberClicks API. I keep getting a 413 error when trying to process the page. I've tried a few things, but none seem to work. So far I don't get and syntax errors just on the 413. if (!empty($_POST['userid']) && !empty($_POST['username']) && ...

 
3:16 AM
-2
Q: filter for drop down menu

sarah joneI am looking for php code for my problem. I have 2 drop down menu first drop down menu: hobby, favourite food, country second drop down menu: cycling, futsal, sleep my problem is, the second drop down menu will filter based on what are being choose from first drop down menu. if favourite foo...

0
Q: How to use Tree behavior with Containable behavior and getPath

BenjamI have a model called 'Rating' and it belongsTo 'Category'. 'Category' is using the Tree behavior and is set up properly with that. I am trying to pull a paginated list of Ratings, and use the contain element in my paginate array as follows: $this->paginate = array( 'contain' => array( ...

0
Q: Rest used 4 method of web service in php

Time.spI am new to working with webServeice, i need some simple example to understand with 4 methods post, get, put, delect of web service in client site. I note from method post->create data is <form action="http://localhost:8080/api/secure/jsonws/dlapp/add-file-entry" method="POST" enctype="multipa...

0
Q: Delete from Two tables in joined by a relationship

user1601973I want to delete a row from two tables, Teams & Teams_Members. The id in Teams table is a primary key and is a foreign key in teams_members tables known as team_team_id. I tried using this: DELETE `teams`, `teams_members` FROM `teams` LEFT JOIN `teams_members` ON `teams`.`id` = `teams_membe...

0
Q: cannot connect to database using mysql

user3029820I have a question that need all of you to help me. I got stuck with it several days. My problem is related to the connection to database using php. Both Mysqli and Mysql are enabled in phpmyadmin. I can connect to database through Mysqli, but i cannot connect through Mysql. Here is code Mysqli <...

0
Q: Issue querying results from database

user3029840We have a 2 field search form. The first field is a case selectbox and the values are populating in the field box. We have inspected element and can see the field values as the actual names in the select box. The 2nd box we have is a text box associated with city/state. The idea is that the first...

-1
Q: insert selected row and static variable SQL

Patrick Piersonis there any possible way to insert a static variable (say $static) AND insert a row selected from a database in the PDO statement? I have been googling the shit out of it all day and found nothing useful on the subject, its all on how to insert data that you've selected from the database but ma...

0
Q: remove space between chart and title on highchart

user3029849any one please help me to remove this space in high [1]:http://postimg.org/image/pwv2h20u7/ thank you here is my code $('#SYSTEM').highcharts({ chart: { type: 'pie', width: 100, height: 200 }, title: { text: 'SYSTEM' ,...

0
Q: Upload file not working when I add a function

XtraCodeThis code uploads a file to a certain directory. Now I want to add file name checker to avoid overwriting. I created a function that returns randomString_filename if the file name has a duplicate and also return exact file name if duplicate(s) weren't existed. This is the function written in PHP:...

0
Q: javascript ordering results by most recently added

user3029877Im using this code to list all the images in a folder on the page, the class "results" holds the 4 images per paginated page. I can only get them to list in alphabetical order, how can I get them by most recently added? <?php $files = glob("upload_image/*.*"); ...

0
Q: Form Validation With Regex

TheGrayFoxI've written a function to validate if a password is valid. The only problem I'm having is figuring out why this pattern that I've written in JavaScript isn't evaluating to true when tested with a password such as: 'SteveRogers#256'. Is this an issue with the way I've declared the regex pattern? ...

0
Q: Parse XML and RSS feeds

gerXpaul LlamesI have a problem on parsing my xml rss feeds. this is my codes. <?php $html = ""; $url = "http://beta.globe.com.ph/header/-/journal/rss/7170019?doAsGroupId=7122541&refererPlid=7122545&_15_groupId=7122541"; $xml = simplexml_load_file($url); for($i = 0; $i < 10; $i++){ $title = $xml->channel->

0
Q: TypeError: Object [object Array] has no method 'getProperty'

Che BizarroI'm kind of new to this whole posting a question thing, so please be gentle! I am using Breeze as part of the "Hot Towel" SPA stack and retrieving data from a custom WebApi endpoint written in PHP. It's not a full implementation, I've just written enough to give me what I need. The metadata my ...

0
Q: Associate arrays in a session removel of an single sety

watI have a session that contains an associate array Dumping the variables in the array produce array(1) { ["cart"]=> array(1) { [0]=> array(5) { ["pid"]=> string(1) "1" ["qty"]=> string(1) "1" ["name"]=> string(19) "some name" ["price"]=> string(6) "100.00" ["total"]=> float(100.00) } } } usi...

0
Q: MS Access (Fetch data and put on a server)

Ahsas SharmaFirst of all, I am not a programmer but a manager at a medical imaging center. We have a tailor made patient registration software for our organisation that utilizes a password protected MS Access database that stores patient data in a single table. Table columns include data about the patient, t...

0
Q: PHP Script to auto update code from remote server

Gaurav PareekI'm running two versions of my php code. One is on an internal network and one is on cloud. I'm trying to create a php script which check for a version change from cloud and if there is a version change then, it can automatically update the internal network code from the cloud.

0
Q: Having trouble fetching the other side of a many-to-many MYSQL relationship via PHP

Kevin DustieI apologize if this question has been asked and answered. I used the site search, Google, and watched a few YouTube videos, but I didn't find anything that was basic enough for me to apply it to my context. Essentially I have three tables: tool, metal, and tool_contains_metal, the latter being ...

0
Q: Prepand twig file with default template

HawiakIs it possible to prepand a template file with another template file? I have some PHP code that basicly renders a template(layout) with a function that renders another template(the view) inside of it. The problem is now that I cannot use blocks etc. My idea was to create some template file that...

0
Q: Selecting specific keys from a PHP array and then comparing them

DavidAny help would be greatly appreciated with this. Essentially what I am trying to do is, for each "ticketX" array, select the first response (by date) and then the first response from the helpdesk. So with the example below I would expect the following to be returned: Ticket 1 Key "2" and date ...

0
Q: Get Name or ID of Blinking Cursor Focus - HTML JS JQuery PHP

jlrosenbergI have a question regarding JS or JQery commands but first an oversight of a project: I have some data loaded into a CodeIgniter view such that I create between 5-25 different tables on a page depending on the dataset. All of these tables are part of a form and some of the data from the tables i...

0
Q: Compare two arrays based on the first N elements of the array PHP

William BraskyI am trying to turn compare two arrays based on the first three elements of each array. I will then use array_udiff to find elements in the first original array that arent in the second original array. Here is my code and current outputs function udiffanswers($a,$b){ $slicea = array_slice($a,0,3...

-1
Q: Joomla User Product posting

Eric P.I'm not that good at joomla, and am still learning, I kindly ask if someone has an idea how to achieve a joomla site in 2.5 that a registered users can make his/her own posting of product(Picture, Price, Details, etc). The primary concept of the site is, a community of users can post their produ...

0
Q: Call to undefined method CI_Form_validation::set_fields()

kputriwhen i try to add my the query in CodeIgniter i get this undefined method CI_Form_validation::set_fields(). Here is my Controller THIS gives me error and I am not able to update or add an entry into my database function __construct() { parent::__construct(); #load...

 
4:22 AM
0
Q: Html/PHP - Form - Input as array

Stephan S.I got a form like this <form> <input type="text" class="form-control" placeholder="Titel" name="levels[level]"> <input type="text" class="form-control" placeholder="Titel" name="levels[build_time]"> <input type="text" class="form-control" placeholder="Titel" name="levels[level]"> <input type="t...

0
Q: nginx not allowing drop down menus

hamhut1066I was having trouble setting up my php configuration, here. Now that I have this fixed, I think that it is causing errors with my dropdown menus. I am using bootstrap, and when I navigate to bootstraps example page, the dropdown menu works perfectly. When I copy the source code from the website ...

0
Q: Vtiger Product images are not showing in Product Image Information:

RoSeI am new to vtiger and i am using vtiger CRM 5.4.0. When i add an image to product it doesn't display in its detail view.Images getting uploaded and inserting to database i think the problem is with listing part. I found a code in side product module DetailView.php smarty->assign('BLOCKS', getBl...

1
Q: PHP memory leak issue

Sohaib ShaheenI am using following script <?php set_time_limit(0); if(isset($_GET['videoURL']) && $_GET['videoURL']!=''){ $URL=$_GET['videoURL']; $URL=base64_decode($URL); //clear all previous buffers start a new one ob_end_clean( ); ob_start( ); // open file $handle = @fopen($URL, ...

0
Q: How do hooks work in PHP?

JerielleCan you help me with my problem? Because I am studying a framework and it uses hooks. But the explanation for that made me confused. I can't find any good tutorial about it. Can you give at least a simple example and an explanation as well or any usable link to study?

0
Q: multiple onchange submit from a while in php not working

user3011784I have a table in HTML that gets built from a WHILE () { } inside this table, I have a drop down menu and on select, I have the onchange= command to execute a part of PHP code above on same file. Everything works well, except when I have multiple result in my while because I can't distinguish...

0
Q: Behat + BrowserStack

Sriram VenkateshI am looking to integrate Behat and BrowserStack. I got the basic functionality set up but I want to enable local tunnling. I have downloaded the required jar to do that. The problem comes when I want to set the "browserstack_tunnel" param. In the MinkExtenstion/Services/Extention.php I added t...

0
Q: PHP file does not return text in .responseText

CarterSo I have to files. A javascript file that is making an AJAX request to a PHP file that is suppose to return JSON. I have tested the PHP file with a print statment and there is definetly JSON being made. However in javascript the request.responseText is empty. Javascript: var mCurrentIndex = 0;...

0
Q: Apache Rewrite issue with url with more than 1 slash

Douglas RoosThe problem is basically this: I have an url: site.com?go=1&do=2&action3&id=4 if i use the rewrite method like this: Options +FollowSymLinks RewriteEngine on RewriteRule ^([A-Za-z0-9_-]+)$ /index.php?go=$1 RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)$ /index.php?go=$1&do=$2 RewriteRule ^([A-...

0
Q: While loop to change object property in php

sagitsi got this while loop into my listByEvent function inside my foto class to retrieve my db fotos: while ($fetch_query = mysql_fetch_assoc($get_foto)) { $this -> idFoto = $fetch_query['idFoto']; $this -> arquivo = $fetch_query['arquivo']; $this -> legenda = $fetch_quer...

-1
Q: how to delete file if width != 829 px And height != 90 px

user3030013how to delete file from input type="file" if width != 829 px And height != 90 px i use this.value="" but not work , How can i do ? <script type="text/javascript"> var _URL = window.URL || window.webkitURL; $("#image_1").change(function(e) { var image_1, img; if ((image_1...

0
Q: Constants becoming undefined in included file

AlexHeuman<?php define("URL", "http://localhost/framework/"); require_once URL.'config.php'; require_once URL.'library/standardObjects/foundation.php'; ?> However, when I use the URL constant inside of the foundation.php file it throws a notice:use of undefined constant. How can I resolve this?

0
Q: how to get text area value in jquery?

Phanii am trying to send the value of text area into database but i am unable to get the values of text area. and also i want once data is saved to database i want to show that data in text area. kindly help me. Thanks. here is my code. <script type="text/javascript" > function save() { var mai...

 
4:58 AM
0
Q: Wordpress - Error: Options Page Not Found

Keryn GillI know there's a few solutions out there for this problem, but none of them seem to fix my code. I've been following a lynda.com tutorial on creating plugins. However I believe they are using an older version of wordpress, which is why I think I'm running into trouble. I'm trying to add an op...

0
Q: Unable to get JSON data in _POST variable in php

ahsan zaheerI'm using this curl command to send json data to a php webservice, but i'm not getting anything in the $_POST variable. Here is the curl command curl -X POST -i -H "Content-type: application/json" -c cookies.txt -X POST http://192.168.2.1.7:8888/json.php -d '{"age":"234","password":"password"...

0
Q: To write an MVC framework or to not write an MVC framework in PHP

TheEnvironmentalistWorking on a web project, I found myself spending hours working on a framework to load the pages, stylesheets, logic, etc. At some point, I asked myself why I was writing a framework rather than using Symfony or CakePHP or some other popular framework for MVC. But what do they give that I can't c...

0
Q: How to connect php to google SMTP and send mail?

Merab Tato KutaliaI need a help in this issue, i can't connect to smtp and can't send. i tried different solutions from other question but nothing, can someone give me a good explanation step-by-step what to do..i'm new to php. I've done email-sending, sms-sending with python but i can't get good documentation wit...

 
5:10 AM
0
Q: update record database in CodeIgniter

kputriI already add,view,delete record but I can't update record in database. however when i try update name,alamat,etc is unchanged in database. I have listed my controller , model and view below: model code function update($id,$siswa) { $this->db->where($this->primary_key,$i...

-2
Q: calling php web service from within java application on another computer

user2881444Is it possible to call php web service from java application in another computer which does not include php web service?

0
Q: Upgrading Drupal 6 to Drupal 7, and Login page has disappeared

BrittanyI've just upgraded my Drupal 6 installation to Drupal 7. My site is in maintenance mode, but for some reason when I go to my user login page, it's gone? http://www.stylerepublicmagazine.com/user Does anyone know why? Please help, as right now I'm locked out!

0
Q: How to get the Name value using Post method in php

user2637639How to get the Name value using Post method in php like this <input type="text" name="<?php echo $result['name'];?>" id=""> How to Post the Name value..? <?php $name=$_POST[''] --? here how can i get the value using name. Please help me.Thanks

0
Q: How to set selected value in multiple select attribute

MahanHow to set selected value in multiple select attribute progmatically. I tried this one but it doesn't work for me. http://magento.stackexchange.com/questions/3356/how-to-programmatically-set-a-products-multi-select-attribute-by-labels the code on the link above doesn't stop from loading public...

1
Q: how to get value by jQuery+Codeigniter and show in input field?

petercileeI got some problem about receive value from server , and show the value in input . Sometimes, if I want to show the value in page, I will use the POST method, then set the input'ID in controller and model, and use foreach() in page you want to show , therefore the work is done. But, if I want t...

0
Q: Unable to get form value in controller in yii

Ajeet ManralI am learning Yii and i am stuck with problem.I am trying to make a form but i am unable to get the values from the form in my controller. I dnt understand what i am doing wrong. This is my model *Logindetails.php* class Logindetails extends CActiveRecord { public $pass; //rest of the co...

0
Q: How to show directory listing in alphabets to show directory in its Letter

Jappy GodI have an array that already contains all it's values in alphabetical order: Directory Listing: A ahhaa ah B Blah C Catching etc. Here is code. $alphabets = array('0-9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); $letter = list ...

0
Q: require_once() Permisson Denied even after chmod 777

AlbertSamuelI do Dropbox-API it needs to access the Dropbox-SDK.. Here is the error shown in browser. Warning: require_once(dropbox-sdk/Dropbox/autoload.php): failed to open stream: Permission denied in /home/albert/public_html/test/search.php on line 11 Fatal error: require_once(): Failed openi...

0
Q: Is there a way around the browser jarring because of scroll bar on page load with PHP

GazowI am writing an application in php that reloads the page when thumbnails are clicked to display images. The purpose is for the back/forward buttons being in tact when a new image is displayed using different query strings to reload the page. The problem i have is every time a new page is loaded, ...

0
Q: How to send $_COOKIE or $_SESSION to another server?

user3030093How to send $_COOKIE or $_SESSION to another server ? Please help me I am unable to send COOKIE to another server or any request.

0
Q: How to get user's country and forward to URL?

JaceGHow can I get the user's country and forward them to a URL based on it? I am looking specifically at Australia, New Zealand, USA, UK and Other. Preferably with PHP, but can use Javascript if necessary.

-2
Q: How can I integrate an Image upload option in CK Finder?

SHAIN ANANDI want to integrate an Image upload option for my PHP project. Can someone provide me with some ways? Your help will be highly appreciated. Thank You in advance...

0
Q: Page Redirection. Loss of Session data

PeteI have a sign-in page. Once a user is logged in, I want to use php to redirect to a new page. I am trying to do this by checking if a user id is set or not. One: CONFIG FILE session_start(); Two: MAIN PAGE require ('config.php'); if (isset($_SESSION['user_id'])) { echo' <META http-equiv="...

0
Q: how to post the values dynamically from the following code

user3030105how to post the values dynamically from the following code I am using the following code <?php $epages_sql=mysql_query("select * from epages"); while($epapers=mysql_fetch_array($epapers_sql)) { ?> <table> <tr bgcolor="#FFCCFF"> <td width="40%" height="30"><span class="style9"><...

0
Q: Send xml request using curl using PHP

chaI have used PHP curl to send XML request to webservice and and get response. My code is as follows. $url = "https://path_to_service.asp"; try{ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); cur...

0
Q: How to upload images in backround on tabs using PHP

KutePHPOn some older tablets, we cannot get the image size down to much under 1Mb. These uploads can take upwards of a minute. Is there any way to allow the image upload to take place in the background while allowing the user to move on to next step? Or is there any other way to ensure the upload will ...

-1
Q: calling php code from java code on different server?

user2881444Is it possible to call p hp code from java code on different server? or include p hp page with java application and call p hp service

0
Q: Codeigniter Form to Html

user2991258I have placed the below codeigniter code and i want this code to be written in html .Pls help me to do this. <?php echo form_open('contact/create_member'); echo form_input('name', set_value('name', ' Name')); echo form_input('email_address', set_value('email_address', 'Email Address')); echo f...

0
Q: return json_encode error from php to jquery

deepaki want to display error if username and pass is wrong.i am trying from yesterday. dont know whats wrong.every time controll goes in error and displays error.tried json.but not working.i an new in jquery ajax, <script> $(document).ready(function() { $("#LoginForm").submit(functio...

 
5:58 AM
0
Q: Paypal Adaptive parallel payment sandbox environment

SonaI did PayPal Adaptive Parallel Payment in Sandbox Environment using AngellaEye Lib. in core Php in which I have passed OrderID in IpnNotoficationUrl like this, 'IPNNotificationURL' => ''.$site_url.'notify.php?custom='.$orderId and that of OrderID i needed to update my Database that user did p...

0
Q: Magento installation stuck in a redirect loop

wiseindyI am installing Magento 1.7.0.2 on my GoDaddy Linux Server. My domain example.com is pointing to a folder \magento on my server I uploaded all the magento files to this location: \magento. When I go to my website now, http://www.example.com, I get an error message saying that "This webpage has...

0
Q: How to update sessions

papao surnameI have a table with sessions. I want to see the changes of the table after I edit 1 or more records. But everytime I refresh the page it does not change anything. This is my short code, <?php $mysqli = new mysqli("localhost", "root", "", "app"); ob_start(); session_start(); if (...

0
Q: how to update only one column of mysql table using php query?

user1788736I am trying to update only one column of a mysql table using following code but for some reason it always fails and give me invalid query error! could any one tell me what i am doing wrong here ? $query = "UPDATE dbTester SET username ='$MediaUserName' WHERE ID = '".$row['ID']."'"; $re...

0
Q: Shared image on linked in does not displaying using javascript

Sanjay NakateI am working on one of the wall design tool.Just I have share the image on linked in using a javascript content of code working good nut having issue with the image to share on linked in. Bellow is my javascript code where, I am trying sharing on static imagg. $("#linkedin").click(function() { ...

0
Q: Pagination error for google clone script

Ali MunandarI am currently using greekdevs google clone script, the script normally nothing wrong, but when we click on the pagination, the number of pages displayed increasing multiples. I've tried replacing to $page = $_GET['page'] * 1 + 1; however instead search results in reduced 1 rather than 10. here...

0
Q: GAE, can't get PHP to work

worksAsIntendedI need to set up a simple page on GAE, this is for someone who wants free hosting, basically. The page has a contact form, and I wrote a script in PHP. Ie: index.html, form action calls contact.php. Although placing the code on the index.html and calling that instead produced no results, anyway. ...

0
Q: current view is not rendered by calling another view

user2810175I am calling the index view in my uploadFile view, but only index view is been generated and the uploadfile view is not rendered, please let me know if i am lacking somewhere, in index view i am calling the element sidebar. Below is the uploadfile view code : echo $this->extend('/Modellings/i...

0
Q: MySQL query not working. not giving expected result

user2498559I have a database where there are 4 field to do query. 1) topup 2) totala 3) totalb 4) totalc I am running the below mysql query which is supposed to return 4 rows. but returning nothing. below is my query: $qry=mysql_query("SELECT id FROM ".user." WHERE `topup` >'0' AND `totala`>='9' AND `tot...

0
Q: How to get text from hyperlink?

Renz CorderoHello i'm new in php so i want to know if there's a way to get the text from a hyperlink that has been created by a loop? is there any solution? my problem is that i can't get the name from the hyperlink so that i will pass that name to other page . // i have this code which doesn't work. <head> <

0
Q: How to make a user wish list in PHP

Jake BruntonSo, basically I'm making a little site that has some pages with video game's info and media. I have a user account system setup, but there's something I've been wanting to know how to add. I'm still new to PHP, and I made the user account system only by following a tutorial. Anyways, here's the H...

0
Q: Store the drop down selected value ina SESSION variable

t4thilinaIm getting a set of values from the database to show in a drop down list. Once the user selected an item from the drop down list the selected item should be assigned to a SESSION variable. I tried this but yet it is not working. Please smeone help me to sort it out. <select id="FormNameSelectin...

 
6:28 AM
0
Q: Terminate shell script using PHP

onefourone14I'm trying to terminate a shell script using PHP code. I have created a shell script foo.sh which calls a PHP file #! /bin/bash cd /var/www/html/test php test.php Following is test.php <?php exec('exit 0'); ?> For some reason the shell script is not exiting.

0
Q: Is there anything Ruby on Rails can do, that PHP framework (laravel) CAN’T do?

sriramanI am using PHP framework 'Laravel' in my projects. Some people suggesting me to learn 'Ruby on Rails' to create a scalable web application. I googled about Ruby on Rails. In my point of view Ruby on rails is similar to Laravel framework. Is there anything Ruby on Rails can do, that PHP Framewor...

0
Q: How to Create VSDX file using SVG elements?

user3030233I need to create VSDX file using SVG elements.I read one article VSDX(visio2013) in this article structure and elements only.In my case i have SVG elements and i need to convert the VSDX using programmatically.Please help me on this.

0
Q: add an index file or an .htaccess file for each directory?

DeadpoolOk so my current sites is on the .htaccess method to block user access to the directory e.g. http://www.example/_directory/ via Options All -Indexes Question should I stick with that or is putting an index file e.g. index.php in every directory better? I'm thinking of an index.php that will redi...

0
Q: Is it possible to have two types “<input type=checkbox/datetime-local>” within a single textfield?

SirBTI have a form comprising of a checkbox list. Instead of the values being pre-determined in the code, I would like for the values to be fed in by the end-user. The value content has to be Date and time. Is this something that can be done? If so kindly point out how I can achieve this. Please find...

0
Q: Canvas and PHP - Draw line from MySQL database data

Peter BrowneI am trying to draw connected lines using canvas from data in a MySql table. The table (gene_dna_segments) contains the length of each line segment and the segment name. The desired output is a continuous straight horizontal line comprised of each of the segments. Each segment also needs to ...

0
Q: How do i upload multiple images to remote server in this circumstances?Looping or repeat upload procedure?

ClarklightI am new to php,trying to do a form, which allows me to upload a few text fields and then upload 3 images, the images are then uploaded into a remote server, and the name of the images are saved into database, so then it can be pulled out and displayed later. (p.s. Ignore the SQL injection issue...

0
Q: checking on form validation whether a choice has been clicked (radio button) before allowing user onto the next section

user2873928I have a multiple choice questionnaire with five questions on my html page. Each question uses radio buttons for user to select one of five answers. I want to check that the user has selected one of those five radio buttons before allowing them to go to another page. A PHP page sends the answer t...

 
6:46 AM
-3
Q: Best way to implement chat in php without using dedicated server/vps

Bonnyiam developing a small social networking site in php with backend mysql. Is there any way to implement chat in shared hosting without making huge server load in shared hosting. If we avoid database for chat then is it good idea?. I found a good chat code [here][1] [1]: http://chatjs.net but it i...

0
Q: How to find similar results from all rows in DB with MySQL query

Raviv gI would like to make "Search you'r LOGIN" like in facebook : Eg. searching for "Stock Overflow" would return Stack Overflow SharePoint Overflow Math Overflow Politic Overflow VFX Overflow Eg. searching for "LO" would return: pabLO picasso michelangeLO jackson polLOck Eg. searching for user...

-1
Q: How to use Google adwords in my php site?

Gaurav ParasharCan anyone please tell me steps of integrating google-adwords in PHP site? Thanks in advance, your answers will be appreciated.

 
7:04 AM
0
Q: Php mail $headers break function

Jack SniperI have a function that sends multiple emails out depending on how many products are purchased within oscommerce. It works great until I add in the headers for the php mail() portion of the function. As you can see bellow, my headers read: $headers .= 'MIME-Version: 1.0' . "\r\n"; $head...

0
Q: Redirect a page with PHP and send a JSON string to Javascript

CarterRight now I have a php file that recieves a string from a search bar on page1 of my website. It queries the data bases and creates a JSON string of results. I can then use PHP to redirect my website to page2 (The search results page). How can I receive that JSON string in the Javascript of page2?

1
Q: How to upload more file type in php

nazerolI have some problem regarding to upload the file in PHP. In my coding user can upload only image jpeg/jpg only. I want user also can upload word (.doc , .txt) and image in (.png) When I upload the image, the image not enter the database but enter the folder file name "upload". This is my code. H...

0
Q: Smarty create new array and store the value

AaruKarthigaI'm new to smarty and i have tried to get the name inside an array ie value and display into an string like : Soap,Clothing Soap if it has another array value soap name then it will like : Soap,Clothing Soap,Soap name ... This is my array : stdClass Object ( [product_id] => 3 [taxon...

0
Q: my span tag doesnt work

user2739657i have a span tag . which has to work as a reserve button. it also check whether it is reserved befor or not . to show another image for the span .see the code : <span class="btnrsv" <?php if ($row_Recordset1['status'] == 'Free' || $row_Recordset1['status'] == 'Reserved' ) echo 'st...

0
Q: using wp_cron to send bulk mail with wp_mail

RiotActI have posted this question over at wordpress answers, but after several days have received no response, so I thought I would post it over here. I am working on a custom plugin to send recurring invoices on the 1st of every month. So far, the plugin is working pretty well. It creates new invoi...

0
Q: Complex String Position

kimbarcelonaGiven this string: Project ID|Project|Account Name|Severity|Status>|<406115|United Equipment - Cabling fix|United Equipment Pty Ltd - Kewdale (HO)|Installation|Wait For Response (customer) I want to get the position of Severity and I'm expecting 3 or 4 as the output with Pipe | as sepa...

0
Q: how to remove session variable when loading a different controller

Kanishka PanamaldeniyaHI i am using codeigniter , i have controller settings , there i set some session variables . $this->ci->session->set_userdata('lob_data',$lob_data); i want to set $this->ci->session->set_userdata('lob_data',array()); when i go to any other controller than settings . but i don't want to...

0
Q: Soap request from php cleint to the Android Server..?

user2545522I have tried to set up a Soap connection between a Php client and making the Android app as a server. I tried it by getting the Android device Ip address and setting a request in php client..? I was not successful in doing so. Need some help with this.?

0
Q: PHP like query not find any results when using hebrew

Raviv gI hope its allowed and i am not bothering here every 5 minutes with new questions but i need help at this . I have this code , i got it from my last question before : $string = $purifier->purify(@$_POST['string']); $query = "SELECT * FROM users WHERE user_fname like '%".$s...

-2
Q: Remove array index from json array using PHP

user2981939I need a few help I have json php multidimensional array and i encode in JSON then it's show in this format. "results": { "status": "1" }, "LevelDetails": [ { "0": { "0": { "objective_id": "1", "objective_title": "Objective 1", ...

-3
Q: PHP possible video copyright in php please provide succession

Vinod Kumar TiwariI am working on video web site but I am facing problem with video copyright, please help me if any buddy idea for this functionality.

0
Q: How to create a list that can be sorted by various criteria

Web Dev 80Is there a way I can sort items by different criteria? I'd like to able to sort all the products on my page by price (both ascending and descending), Name (alphabetically) and by a set order I have chosen. How can I do this? If there are ways of doing this outside of the tags I have listed that...

0
Q: Select text nodes with Symfony DomCrawler

DaveIs there any way to select the text nodes of a parent element using Symfony's DomCrawler? In jQuery you could use the contents() methods and check for nodeType == 3

0
Q: PHP Calculating start point of line segments based on previous segment's length

Peter BrowneI have a form that adds records to the following table (gene_dna_segments): +----------------------+--------------------+------------------+--------------------+ | gene_dna_segments_pk | gene_expression_fk | dna_segment_name | dna_segment_length | +----------------------+--------------------+---...

0
Q: Alert each time someone logs into account from a new place in PHP like facebook does?

Nuwan FernandoHow to alert each time someone logs into account from a new place in PHP like facebook does? https://www.facebook.com/help/www/162968940433354 http://www.nuwanblog.com/wp-content/uploads/2013/11/Get-Code.png

0
Q: PayPal Shipping Address Rest API

SukhI'm trying to get the payers shipping address after they come back from paypal. I'm using the PHP Rest API, I see the Json object and in there the shipping_address array is blank. The Shipping Address is part of the payer_info which is apart of the payer. I have the payer method as 'paypal'. D...

0
Q: How to show option to download fonts to view website Fonts Properly

Java Studenti am using some specific font in my website that i want users to download before they view site. i did Google and could find solutions like font-face google fonts etc like this @font-face { font-family: 'Inconsolata'; src: local('Inconsolata'), url('http://themes.googleusercontent.com/f...

0
Q: TimeSheet - track time spent by employee on a project

user3030425I am creating a timesheet in PHP , i accept employee_id and week from user based on that ... i query database and get the table by creating a AJAX call to PHP script that returns a PHP table . What i want is the table returned should have textboxes , which i have done ... suppose there are 6 p...

0
Q: Plotting a ND Bell curve using php

Rohit GuptaI have been trying plotting a normal distribution data using Highcharts but the charts provided does not provide me with the bell curve. Is there any alternative which could help me out.

0
Q: How to list rows data using PHP

user2971509Hi everyone, I've got a HTML form divided into 3 sections (tables). When I submit the form, it has to go through PHP script in gen-czk-pdf.php cause of transfering HTML to PDF. Each table will have undetermined number of rows and I need advice from you, how do I list all these rows from each tab...

0
Q: Unable to execute query in php & mysql

user2961121Given below is my code for a query. I am using PDO. $results = $conn->prepare("SELECT TITLE, A.BRANCH_NAME, A.BRANCH_ID, NO_OF_COPIES, COUNT(BOOK_LOANS.BOOK_ID) AS NUM_OUT, NO_OF_COPIES - COUNT(BOOK_LOANS.BOOK_ID) AS NUM_AVAIL, AUTHOR_NAME FROM ...

0
Q: javascript alert twice issue on IE with PHP

Daniel DzussaIssue on IE, If I run this script in all browsers except IE, It alert form submitted once, but if I try on IE, it alert twice, what could be the reason ? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http:/...

0
Q: Laravel 4 Route Paramater use only some on given links

user2002495I understand that when you do this in Laravel: Route::get('news/read/{year}/{month}/{date}/{title}/{id}', 'PageController@index_page'); We can use all {var} name as parameters in the controller. But how if I only want to use {id} and {title} instead of all of them in the controller? This is cu...

0
Q: Can't upload images in directory with is_uploaded_file() and move_uploaded_file()

NhizI have this form for uploading 2 images <form enctype="multipart/form-data" action = 'upload_photo.php' method = 'post'> Upload your profile picture here<input type = "file" name = "dp"/><br> Upload your about me cover here<input type = "file" name = "cover"/></br> <button id="upload">...

0
Q: how to add rel attribute to menu?

C-LinkHow can I add an attribute to menu? I tried this: default_url.php $class = $item->anchor_css ? 'class="'.$item->anchor_css.'" ' : ''; $title = $item->anchor_title ? 'title="'.$item->anchor_title.'" ' : ''; by changing this: $class = $item->anchor_css ? 'class="'.$item->anchor_css.'" ' : '';...

0
Q: Social network - Suggested friends

PsychoXI have two simple MySQL tables: user & relations. Relations table: user_id int(10) unsigned NO PRI friend_id int(10) unsigned NO PRI (part of) User table: id int(10) unsigned NO PRI username varchar(128) NO I select friend of friends using this query: SELE...

0
Q: Function returning incorrect response

AnthonyI've got an issue with a function where it's returning data from the first if() statement as opposed to the secondary if() statement in a function, please see below. function training($type,$tid) { if($type = "id") { $query = mysql_query("SELECT * FROM trainroster WHERE DATE = CURDATE()")...

0
Q: Want to upload multiple file?

user3025122Trying with php code to upload multiple file which can later downloaded with other xml and xsd files in .zip format, so please help me with setting path to upload and convert to zip format.

-3
Q: Why my code is on public?

D.ShinekhuuI have just saw my code is at Pastebin.com while I am searching my issue from Google. At first, I didn't realised it, but I saw my Tinypass unique resource ID number is on that page and really surprised. I even didn't registered and don't know about Pastebin.com . Here is my unique resource ID ...

0
Q: Issues inserting variables in my database table?

user3030416 <form method="POST" name="signup" action="php/signup_script.php"><label for="first name"></label><input id="first name" name="first_name" placeholder="First Name" type="text" /> <label for="last_name"></label><input id="last name" name="last_name" placeholder="Last Name" type="text" /><br><

0
Q: Integrating Uplodify in CodeIgniter not working

MuhammadHi everyone I am integrating uplodify in codeignitor the submit_article() is a controller function for my form which is multipart form, and function is_image() is used for uplodify script I have called in my view. but when i select file it shows me the flash player but the uploading progress bar ...

0
Q: Image Gallery with Horizontal Scrolling - Scrolling Broken

Etai D KleinI'm using a horizontal scrolling image gallery using this as my base. It was working until recently when I started changing some filepaths so my project can run off of dropbox. I tried reverting to an earlier version of my project and it still didn't work. Any help would be appreciated. CSS ...

0
Q: Open sessions in two project using Yii

Onur GökerI am in a complicated situation. I have two projects. One is designed using Yii Framework, another one includes only pure PHP code (I mean no framework). What I want to do is that, when user logged in the project, he/she should be logged in Yii project either. I tried to set session_id in Yii pro...

0
Q: Get data from file_get_contents and redirect if "Y"

afzulnizamIm still new in PHP. I would like to redirect user if data from http://www.shroomery.org/ythan/proxycheck.php?ip=xxxxxx is Y and do nothing if N. I have this code below. Not sure if correct or not. Then what should i do next? <?PHP // Function to get the client ip address function get_client_ip(...

0
Q: (php) Local mysql DB sync (bi-direcitonal) to many live db

Killerdev89I have a local mysql db and about 7 identical (structure) dbs on different live zones. I have looked at stock standard mysql replication. but that will work 1 on 1. How and what can i use/do to achieve this Bi-Direcitonal sync between one local DB and many External dbs.

0
Q: PHPExcel library splits comma separated values into new columns

HanzoI'm trying to read a Excel spreadsheet with the PHPExcel library (1.7.9) and when the value of the field is comma separated the PHPExcel library puts de comma separated values into new colums instead of the same column. Is this normal? Can I fix it? Thanks

0
Q: Authenticating referer site using HTTP_REFERER and IP address

user2267462I have a webpage which is accessible only to a few "whitelisted" clients. So when a client request comes to the webpage, I would check the $_SERVER['HTTP_REFERER'] field for the whitelisted domain name and the corresponding IP address (which was known to my webpage through a global array). Can th...

0
Q: PHP pass second argument into function

user1995781I have a function like this: function myfunc(arg1=false, arg2=false){ //some code here...... } If I only want to pass arg1 into the function, I can write like this myfunc("arg1 only variable"). But how can I pass only arg2 into the function? Thank you.

0
Q: form is submitting without validation in jquery ajax

deepakwhen i am submitting form without validating it post the form to server how to avoid it.i have method to check with if condition but not working $(document).ready(function() { $("#ajaxform").submit(function(e) { $("#simple-msg").html("<img src='img/loading.gif'/>"); var postData =""; ...

0
Q: Codeigniter UNION query issue

Dimple ThakurI am having problem with UNION query in codeigniter. Its giving output but the name is same for both columns in array. $sql = "SELECT firstname FROM user_profile WHERE user_id ='".$id."' UNION SELECT email FROM user WHERE id='".$id."'"; $data = $this->db->query($sql); print_r($data->result(...

0
Q: Variables outside if ISSET cannot be accessed inside the if ISSET statement

maikelsabidoI have this code: function WriteLog($offer,$values) { $Filename = "./".$offer.date('Ymd').".txt"; $fh = fopen($Filename, 'a') or die("can't open file"); $filecontent = $values; $filecontent .= PHP_EOL; fwrite($fh,$filecontent); fclose($fh); } $aff = "100"; if (isset($HT...

0
Q: PHP authentication bypass fix

user3030473Hi I've implemented the following code for authentication however you can still bypass the login with any password if you know the user. What am I missing? function login($username, $password) { $result = r_salt($username); if (!$result) { return false; } $database_p...

0
Q: Differences between Session Fixation and Session Identifier not Updated

nagaraj ckI am working on a web site and my job is to secure the site from all types of vulnerabilities like XSS and so on. I ran AppScan, a IBM tool to check for vulnerabilities after my code changes and I see an error saying "Session Identifier Not Updated" in the report and saying Threat Classificati...

 
8:17 AM
ping
 
0
Q: Disabling country dropdown in Magento

user1597438Using Magento, I have created 2 online stores. One website is for international customers and another for local customers. Now, under onepage checkout of the store for local customers, I'd like to disable/change the dropdown for countries to a specific country, Japan, to a text since I set only ...

0
Q: Countinf function in Controller or Model ? cakePHP

Malcoolmjust a quick question. I'm developping in cakePHP I'd like to add a reference number to every entry in my Model, and for that i'd like a function, that will be executed in the Model's beforeSave() that will count the number of entries already created this month, and my ref number will then be YY...

-1
Q: Unexpected $end in my forum script

Jake BruntonSo, I'm adding a forum section to my site. So far, everyone thing is good. You can create a topic, view a list of topics, but when you go to view a topic (which is view_topic.php?id=#) this keeps appearing: Parse error: syntax error, unexpected $end in /home/papervip/public_html/forums/questions...

-3
Q: Upload photos to an existing album (PHP)

user3030526How to upload photos to an album https://www.facebook.com/media/set/?set=a.765349256813004.1073741907.228706760477259&type=3 I try with curl 'https://graph.facebook.com/'.$ALBUM_ID.'/photos?access_token='.$access_token; but 765349256813004.1073741907.228706760477259 - but, where is album id? ho...

0
Q: Foreach loop displaying values in a certain format

Code_Ed_StudentI have two foreach loops in which are fetching results from mysql database table. The values are displaying correctly but I am trying to compress the results so it doesn’t repeat values. For example there are two courses and two instructors in the table. That means when I run the loop I expect fo...

-1
Q: new mysqli() and mysqli_connect() syntax error, unexpected T_VARIABLE

BluestrikeI am trying to convert a mysql connect to a mysqli connet but I have this syntax error, unexpected T_VARIABLE when using either version in the code below. Am I doing something wrong? $mysqli = new mysqli($loginURL, $dbusername, $sbpassword, $database); $mysqli = mysqli_connect($loginURL, $dbuser...

0
Q: Wordpress:: Juery does not tecognise in popup first time.. after close of popup it works perfectly

Minhajul IslamI added jquery in wordpress and using thickbox plugins to display a form. Here in button click does not works first time of page load. when close this popup it works fine after that. I found error that It does not recognize control ID and class name ... at first time. But I used text change even...

0
Q: How retrieve specific data from database mysql

MAHESH ...........I have a search.php in this i m searching for three fields Form no. , Name and Telephone no. . but when i select a from no., from select option and enter in input a telephone no and press the search button it serarch for telephone no insted of form no. . I want a search like when i select from no...

0
Q: PHP SimpleXML grab attribute

conmenI using SimpleXML and wanted to get each of different learner and its child rater attributes, how can I parse it into an individual like: Learner: John Rater_1_name: John Rater_1_email: john@domain.com Rater_1_group: Self Rater_2_name: Jane Rater_2_email: jane@domain.com Rater_2_group: Manager...

0
Q: Echo more rows from mysql

KevinKuijerI have a mysql table with the following columns user_id and company_id There are 5 records all the userid's are 5 and all companyid's are different the company_id refers to the companies table in my sql and company_id is id I'm trying to get all the companies in a table in html but it's not disp...

0
Q: csv file upload and read it

Nazar MohammadI want to upload the csv file and read it..but through my source code every time it read file.csv file which is on my plugin directory every time it take the plugin-directory/file.csv path when I checked. I want read only uplod csv file. here is my code please help me $fileCsv = glob(PATH . "/...

0
Q: Using UNIX_TIMESTAMP for a week

user2143527I got the code to display a post by date from monday to friday but I thing the code display tha last post I publish <?php $query = mysqli_query($c, 'SELECT c.chapter, n.name, n.img FROM chapters AS c LEFT JOIN novels AS n ON c.novel = n.id WHERE c.time <= unix_timestamp()'); while($row = mysqli_...

-2
Q: Ajax - create folder

SRC SRCi am using the following php code to create a folder and a sub folder on xampp server... <?php $userFolder = "poop"; mkdir($userFolder); $newfolder = $userFolder . "/bla bla bla"; mkdir($newfolder, 0777); // check to see if it has been created or not using is_dir if (is_dir($newfolder)) { ...

0
Q: Render dojo chart with wkhtmltopdf and KnpSnappyBundle in Symfony2

user3030567I am trying to render a html page with af dojo spider chart. When I am using the html that is rendered from Symfony2.3 and the dojo javascript I have managed to get the page, with the chart showing correctly, using wkhtmltopdf and a php wrapper called WkHtmlToPdf (http://mikehaertl.github.io/php...

0
Q: PHP SQL Update not working

stud91I have a SQL table named emails with fields: emailID, title, sender and mailbox. I want to update the maibox field of emailID=1 from inbox to important. Here is the code that doesn't work. (No problem in connection to the server) <? mysql_connect('server-name','username','password') or die ('Fa...

0
Q: Creating nested mini upload forms in a large form

SebastianI am using a jQuery Form plug in to create a ajax uploader. It works very well in a little stand alone form. I have a very large form with atleast 10 file upload fields. The plugin works with it's own little form. The Question is: Is it possible to nest many little forms inside a larger one with...

0
Q: where the extra parameters of php OAuth fetch method when it is string

complezPHP PECL OAuth code $data = array( 'fileName' => $file_name, 'file' => rawurlencode(base64_encode($file)) ); $data_string = json_encode($data); $oauth_client->fetch( 'http://localhost/post.php', $data_string, OAU...

0
Q: Codeigniter Uri string values getting wrong

RagavThe codeigniter uri string value with hypen was replaced with underscore in query. For example : http://domain.com//demo1/index.php/class/method/test-product The URI : test-product was passed into the query with test_product , so the value is empty in the query result. How to avoid this problem

0
Q: Undefined variable: id PHP

mike jonesCan every explain or show me why i'm getting this Undefined variable: id. The function public function getByEmbedId($id, $lang=null){ $id = mysql_real_escape_string($id); $embed = array(); $e = mysql_query("SELECT * FROM movie_embeds WHERE id='$id'") or die(mysql_error()); if (m...

0
Q: passing variable into class functions and use it

general666i got one class and i'm trying to implement it into my website, but i'm unable to pass variable into it... class Order { var $totalPrice = null; function load() { $this->totalPrice = 123; } function loadByPaymentSessionId($paymentSessionId) { $this->totalPrice = 123; ...

0
Q: Why must json_encode appear in php file and not in an external javascript file?

user3030521I have a php array: $x = array("1","2","3"); I also have javascript code to convert the php array into a javascript array: var x = <?php echo json_encode($x) ?>; It works perfectly when I type this out in the index.php file (ie - I can use that array in any other javascript file): <script ...

0
Q: $Name not sent through HTML mail form

user3004304i found a good html mail webform online thanks to the people at CSS-tricks and everything seems to work fine. The form uses PHP as a module installed on Apache. In the form I ask for the user's name, emailaddress and a comment. Everything but the user's name arrives in my mailbox. I can't seem to...

0
Q: PHP AJAX get session from other sub-domain site

Gia Duong Duc MinhI have 2 site: 1. main.my-site.com 2. sub.my-site.com On sub, I used AJAX to call a login handler on main. Main process and set session for user. I want sub to get session from main. But it was not successful. But, if I login (not AJAX) on main, and refresh sub, sub has the user session. I set ...

0
Q: I want to submit values in database and retrieve these values in table format but not get the proper result. Tell me the correct code

Sunil PachlangaI have a piece of code which have design for submitting and retrieving values from Database in Table Format I have design a page whose validations are working properly but when i write code for submit values in Database it it is not showing any row in Database <head> <title>Sunil1</title> </head>

0
Q: Creating an array dynamically and inserting in MySQL DB through PHP

Nauman TahirI want to create an array which will be passed to the insert query like this: $data=array( 'db_field1'=>$value, 'db_field1'=>$value, 'db_field1'=>$value, and so on ); $this->db->insert('table',$data) //codeigniter syntax But I want to create the array in advance and then keep on passi...

0
Q: javascript image upload not working on tablet and iphone

SherpaoI developed a site where users can upload thier pictures(PHP Mysql).It is working f9 on desktop pc but it is not working on tablets and iphones.Its not uploading images,give ? only.Kindly help me.The javascript Iam using for this is given as; <script type="text/javascript"> (function() { for($i...

0
Q: What password hash being used zencart?

Loren RamlyI want to know what password hash in zencart using? Because I want to migration from zencart to my web app use framework. I want to export all customers which are now widely in my zencart to my new web app. So I want to know what hash which using by zencart in customer users. Thank you.

2
Q: Checking a valid date in php not working

user3026933I have converted one variable into unix timestamp to checl whether it is valid date or not .Format is dd/mm/yy . My code is below <?php $date1='24/11/2013'; $date2='09/11/2013'; if(strtotime($date1)>0){ echo "valid date1"; } if(strtotime($date2)>0){ echo "valid date2"; } ?> but if say...

0
Q: Compare Multi-Dimension Array in PHP

TomPHPI am not able to compare Multi-Dimension Array: Lets Say I have two array as follows! Array 1: Array ( [0] => Array ( [a] => 12XXYYZZ [b] => 30 [c] => 12 ) [1] => Array ( [...

-2
Q: Php sessions and cookies not working on server

user2770857I have a php website that use sessions and cookies. I changed web hosting plan.Now it's not working all sessions data and cookies.I am using IIS8 server.It was worked properly in previous host.It is working locally also. I think it has to change php setting in server.so what can i do? Can I help...

-1
Q: Is CodeIgniter a better choice to use compared to Dreamweaver?

user3016316I am currently using Dreamweaver to run PHP codes.It involves extracting values from the database and most of the time it involves sensitive data. A friend suggested to use CodeIgniter as it has higher levels of security and more layers. What should I do? Should i continue using Dreamweaver or sw...

0
Q: How to validate xml file w/o DTD

CelestialI have an XML file to manipulate and am using a XSLT for processing. I want to validate the XML file initially before the XSLT transform. This is my code : <?php $doc = new DOMDocument(); $doc->load('somefile.xml'); $isValid = $doc->validate(); if(!$isValid) { echo "$doc is INVALID!"; }e...

0
Q: & converted into &amp; when $_POST request is called?

1ns4n3We are working on an application which has 2 modules. Android Application. PHP Application PHP backend application runs on an Apache Server with Centos Server. Android application basically clicks images, send to the server along with gps coordinates etc form information. Now the problem aris...

0
Q: HTACCESS 500 internal server error website gone down

Ramario DepassI made a minor change in my .htaccess file and I'm now receiving a 500 internal server error. I changed it back to how it was before the error but, the error is still there. Here is the file: ErrorDocument 404 /404-error-page.php RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(...

0
Q: Notice: Undefined variable in rttheme17 themplate_functions.php

user2877903I need to sort this out. Notice: Undefined variable: post in /home/qoppacom/public_html/wp-content/themes/rttheme17/rt-framework/functions/theme_functions.php on line 54 Notice: Trying to get property of non-object in /home/qoppacom/public_html/wp-content/themes/rttheme17/rt-framework/f...

 
9:23 AM
-2
Q: Pass more than one variables to functions

user1444027I've created the following function that simply echos 'active' if a chosen day string is passed to it: function active_day($theday) { if (date('D') == $theday) { echo 'active'; } } The function works fine if I pass in one variable e.g. active_day( 'Sun' ); However, I'd like ...

0
Q: how to update form select 2 row value in mysql

user3000993How to update a form select 2 row value in mysql using php i have this link floorsedit.php?id=Building1&floorno=1 when i visit this link it is showing blank please tell me why it is showing blank and why it is not update and i think there is a problem thats why it is not showing nothing $s...

0
Q: Bulk-change of ad prices with Ebay API in PHP

Antonio BonifatiI would like to change prices on many ads on Ebay programmatically, using the Ebay APIs, preferably in PHP. For each item I have a unique code in the item title and its new price. I guess I have to search for this code to get the item ID and then update the price using the item ID as a key. Could...

0
Q: Use HABTM using transactions in empty Database CakePHP

Erik Van de VenI'm trying to store my data in an empty database using Transactions. Now this doesn't work for me. This is my ERD: https://www.dropbox.com/s/pfakd7xplsvr7cc/db_erd.PNG Notice that at first all three tables are empty. And I send the following array to the database: array( 'Product' => ar...

1
Q: Use URL Query String to Authenticate in PHP

George JamesNormally When I design a site that allow users to login, I create session variables of the user info from the database and ensure that at least one of the session variable is available on each page of the site, else the user would be redirected to the login page like this: if(!isset($_SESSION['u...

0
Q: Can't check services module in xampp

Mharveen Biu![xampp v3.2.1 is need to check the service module first so that i can view it on localhost?, because i can see my sample.php in localhost][1] xampp v3.2.1 do i need to check the service module first so that i can view it on localhost?, because i can't see my sample.php in localhost. i n...

0
Q: PHP script which tell exat ranking of a keyword in google search

Muhammad MutahharI want to develop a php script which take a keyword and tell exat ranking of it in google search result. I have been tried many softwares (like "cuterank" etc.) for this but they do not tell exat ranking.

0
Q: I cannot find API for searching blogs

salivanI need an API to search blog posts in the wild. I looked at technorati, and it seems API is depreciated. Everywhere I look there is nothing I can use. But maybe someone knows better.... My current implementation is dirty: $url = "https://api.datamarket.azure.com/Bing/Search/Web?Query=" . rawur...

-1
Q: Netbeans conditional breakpoint while debuging

SangokuHello i am wondering if Netbeans 7.4 can somhow support conditional breakpoints in PHP code? Like described in Can I set a breakpoint on a changing value? like php storm. From the looks of it, it should not be that dificult to implement..

-1
Q: How to asign label name of cbutton to be $data?

abramsenWhen i change label value to: 'label' => $data->user->name in : array( 'class'=>'CButtonColumn', 'template'=>'{Preview}', 'buttons'=>array( 'Preview'=>array( 'label'=>'Details', 'url'=>'Yii::app()->createUrl("/administration/...

0
Q: Count no. of text fields & show the total no in another page

sarmistha search.php <?php $serial_no = 1; $total_seats = $_SESSION['total_seats']; $seats = explode(',', rtrim($total_seats, ",")); foreach ($seats as $seat) { ?> <tr> <td><?php echo $serial_no++; ?></td> <td><?php echo $seat; ?> </td> </tr> view.php <td>Total seats</td> <td> : </td> <td> <

-1
Q: Regular Expression for italian school grades

Emanuele UgoHello i need a javascript or php regular expression for italian grades; the grades go from 0 to 10, here some example: 0 1 2 3 4 5 6 7 8 9 10 and for all grades there are also other possible value: 0 or 0,0 0,25 0,5 or 0,50 0,75 1,0 or 1 1,25 1,5 or 1,50 1,75 2,0 or 2 2,25 2,50 or 2,5 2,75 3 ....

0
Q: Post a note to facebook fan page wall

AdityaGoing crazy over this. I am using the facebook php sdk. What I want is, to post a NOTE(not MESSAGE) to my fan page wall. I have specified the message, subject, access token and also my fan page id. I have added ALL the required permissions which are manage_pages, publish_stream, create_note. I ha...

0
Q: Multi-Site CMS - WordPress vs Drupal vs Custom

TheBlackBenzKidI am currently looking for a CMS software that allows multiple sites, with themes, languages and addon support - booking apps, contact pages, galleries, blogs etc. It is for a SME company that has many brands and sub divisions and they want a network bar on the top of the page which links to and...

0
Q: Pagination with Codeigniter - Not counting or returning records

the_unforgiven_III'm having a problem with pagination not counting the amount of records and not creating links correctly. My code is here -> http://pastie.org/8506894 Everything is within the function. It shows up the links but it's not limiting to the specific $limit I set. Really could do with some help o...

-3
Q: Notice: Undefined index: log in C:\xampp\htdocs\tutorials\home.php on line 20

Sagar09Notice: Undefined index: log in C:\xampp\htdocs\tutorials\home.php on line 20 here is my programming of PHP. when i try to do log in it get this error......i am so confused please help me out. <?php include("session/DBConnection.php"); $user = $_SESSION['log']['username']; $query = mysql_query(...

0
Q: Loading a PHP file to a div with the same submit button click while submitting data

t4thilinaHelo.... I need to submit a form. In the same time with the same submit button I need to load the relevant php file in to a target div. This is an dummy question that I have tried. <form id='A' method="POST" action="CreateTheForm.php"> <input id="B" name="R"></input> <input id="C" name="Submi...

1
Q: IntlDateFormatter always en_US output for month/day names

DanielI'm trying to implement locale support using the Intl package. The NumberFormatter works and changes the output style when the Locale is changed, but IntlDateFormatter does not seem to detect the locale change. I'm setting the locale using this piece of code, switching between "en_US" and "sv_SV...

0
Q: How to create an inner array inside parent array in following scenario?

PHPLoverI'm a newbie to the complicated arrays in PHP. I'm having an associative array named $questions as follows(For your reference I'm printing only first two elements of this associative array, the actual array is too large): Array ( [0] => Array ( [question_id] => 33185 ...

0
Q: how to display products in ascending order on oscommerce version2.3.3

Dam ForumsIn my Shopping cart, there is a product listing page. I need to display the Last entered products first on that page (LIFO). but currently page is displaying the first entered product first (FIFO). i think that can be done changing sort field into Last entered product id. Can anyone help on that...

0
Q: "How do I use jQuery's form.serialize but exclude empty fields" doe not work (with php)

molotowI'd like to use How do I use jQuery's form.serialize but exclude empty fields but it does not work. I used a minimal example that redirects to a php script: <html><head> <script src="jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#myForm').submit(fu...

0
Q: 'JsonSerializable' not found issue in ZendFramework 2 application

BlueBirdI have a Doctrine entity in my Zend 2 Project as follows. namespace Application\Entity; use Doctrine\ORM\Mapping as ORM; use JsonSerializable; /** * @ORM\Entity * @author SWISS BUREAU * */ class ProductVersion implements JsonSerializable { /** * @var $id * @ORM\Id * @ORM...

0
Q: Soapheader Xml wrong

user2447487I'm using soap for a project, and I need to set attributes in the soap header, but im not getting the data I'm expecting. I've seen that when a soap header is defined, if you add it as an array you should be able to set data as well as attributes, and by using this code : $auth = array( ...

0
Q: saving data of people who likes a facebook page into a database

Fabio RossiI would provide a newsletter for my website and to do that i would know who likes a particular article on my page (even because i'm interested in this). How could i do it? I know that i have to ask some kind of permission of some way about the user_likes table (i think it's a table) but i know...

0
Q: Facebook login redirect issue

Dan GreenI have a site with a working Facebook login. The problem is happens when the user comes to the site for the first time (or after clearing cookies). The user flow is the following: User clicks "Sign Up with Facebook" User is redirected to Facebook authentication If User accepts, he/she is redi...

0
Q: Updating SQL using PHP - Error

HaroonRight so i have php code to update a SQL table. If i replace $_GET['emailID'] with a number say 1 the database IS updated. But otherwise no update. What seems to be wrong here Table: emails Fields: mailbox, emailID $query = 'UPDATE `emails` SET `mailbox`=\'trash\' WHERE `emailID`='.(int)$_GET[...

0
Q: Malicious code getting added recurringly to index.php files on my server

user3030789I have couple of sites on my server and i've observed some sort of malicious code being added to all my sites index files and some other important files but not all.And i tried to reinstall the wordpress installations freshly.But even after a fresh reinstall this code is coming back.And now the p...

 
10:17 AM
0
Q: Magento One page checkout not working after upgrade to 1.8

user3030829I have upgraded my site to Magento 1.8. I didnt upgraded the magento using magento downloader. I have used fresh magento 1.8 and moved my skin to this version. Now everything working fine Except the one page checkout page. The checkout progress bar is updating as i complete steps and also the pay...

-2
Q: How can i open and close an image in php GD library

user3030837I am using php GD library for image processing like matlab. I have done image restoration using filters.But i do not know how to do image closing and opeining in GD like(imopen and imclose in matlab).can anyone help?

1
Q: How to use cron to run a php file?

alnassreI'm using the cron job to run a php file that will update a text file. the cron.php file contain <?php echo date('l jS \of F Y h:i:s A'); $content = "some text here ".date('l jS \of F Y h:i:s A')."\n"; $fp = fopen("myText.txt","wb"); fwrite($fp,$content); fclose($fp); I receive email ev...

-1
Q: Blank columns after each filled column in csv

user2031456I am getting blank column after each filled column in openoffice 3.3. In my PHP code I have provided ~~ as the seperator and \n as the delimiter I am using this PHP code header("Content-type: application/csv"); header("Content-Disposition: attachment; filename="dsds.csv"); ...

1
Q: how to store input fields with sub input fields value in to database using JQuery with PHP?

bhaveshI done something like bellow code and i want to store input fields value based on parent and child in MySQL database using JQuery PHP`. Basically i was done with single value but in my current task that look like tree with multiple Parent and it's Multiple child key Vlaue. I am using this code: ...

0
Q: In php, how to include the exact content (not string form) from another file?

Marius MariusLet be an annex file named annex.txt , whose content is: "text1","text2","text3" Now, I have a php file which contains this line: $alfa = array ("text1","text2","text3"); How can I include the array elements using the external file annex.txt ? Something like this: $alfa = array ( file_get_c...

0
Q: How can I use method aliasing with PhpDocumentor?

aimfeldI'm documenting my Zend Framework view helpers and controller plugins using phpdoc @method tags to get better code assist in my IDE (PHPStorm). View helpers and controller plugins are called via __invoke() magic methods. For example, I have a DateTime view helper: class DateTime extends Abstra...

0
Q: Route regex Zend

user3025149I need some help about my routes in Zend ... This is what I did $route = new Zend_Controller_Router_Route_Regex('myfolder/([^/]+)/([^/]+)/?([^/]+)?/?([0-9]+)?', array('controller' => 'myfolder','action' => 'search'), array(1 => 'region',2 => 'job', 3 => 'add', 4 => 'page')...

0
Q: PHP strtotime conversion

MikkoH85I have problem where strtotime doesn't work as it is supposed to. I have no clue what causes it. Everything is right: variable is in string format, and time format is correct. It works fine on another method, but not on this. // seuraava metodi //YHTEENLASKUMETODI: function yhteenlaskumetodi($co...

0
Q: how to do sort-able div using jquery

user3030853I am doing drag-drop with sort-able using J-Query. I have one main div(#Days-Div) and in this div create table. in one row I have put many(30) div in many table data(30). so I want to sort these many div with drag-drop using j-query. Thanks in Advanced. Code is - <div id="Days-Div" style="overf...

0
Q: MSSQL xml path() query not working in PHP

CoddedThe following query works fine when executed in Microsoft SQL Server Management Studio but when I run the query through php I get no output (nothing past the mssql_query() gets rendered). If i remove for xml path('') from the SQL query and again run in php, now everything past the mssql_query() ...

0
Q: How to get time from datetime

snehalI have datetime 30-12-1899 9:25:52 AM here needed only time that is 9:25:52 AM .this time i wanted to insert in mysql database and this field has data type time. my code is : <?php $date = "30-12-1899 9:25:52 AM"; $date = strtotime($date); echo date('H:i:s', $date); ?> when execute it return...

0
Q: PHPPowerpoint and setColspan issue

asprinI'm trying to create a table using PHPPowerpoint. I'm facing a problem while dealing with merging of table cells which is as follows: $arr = array('TNS', 'Hard Reserach', 'Kadence', 'RSMRS', 'Sharp', 'Hansa', 'Market Excel'); $shape = $currentSlide->createTableShape(26); $row = $shape->createRo...

-2
Q: Ajax/PHP/MySQL CRUD with login security?

John GreenIs there an Ajax/PHP/MySQL CRUD (create, read, update and delete) with a login security system? I would like to list all my records, build a search form and a new entry input form. Users must be logged in.

1
Q: Fastest and most scalable way of searching a combination of three MySQL textfields

Andy PlattI have three fields in a MySQL table - Brand, Range and Model and approx 8,000 models each with a brand and a range. I am creating a jquery autocomplete search which uses a json response to return the 10 most likely matches to the users input. The json query will match the user input against the...

0
Q: Upload two files in codeIgniter showing error

Muhammadmy View form multipart <h3>Upload Submission File(doc,docx,pdf,cda,rtf,txt)</h3> <?php echo form_error('fileToUpload'); ?> <p> <input type="file" name="fileToUpload" id="fileToUpload" title="Upload Submission File" accept="application/pdf, .doc, .docx, .txt, applicat...

0
Q: Anyway to cache "reference" of variable?

kedoffI have string "template" as 'abc/{name}/def/{node}/ghi' and I want to get 3 lines abc/name1/def/node1_title.1/ghi abc/name2/def/node2_title .2/ghi abc/name3/def/node3_title.3/ghi My script: $url = 'abc/{name}/def/{node}/ghi'; $dataArray = array( array('name'=>'name1', 'node'=>

0
Q: PHP RegEx replace

Kevin GimbelI'm trying to write a PHP Script that replaces auto-generated Content from a WordPress Plugin. The Plugin isn't able to provide a WYSIWYG Editor for special fields but it can recognize new lines. My Output would look like this: Some Text that has to go over a view lines of code because it's actu...

0
Q: Uploading video to Youtube using Youtube Data API V3 and Google API Client PHP -- getting 401 (unauthorized) message

justine1234I have to implement a way to upload video from our site to youtube. I already registered the app in Google Cloud and got all the necessary client ID, client secret code, browser key, redirect uri and server key. I also did turn ON the Youtube Data API V3, Google+ API, Freebase API and YouTube Ana...

0
Q: How to delete ttf file using php?

Simranjeet KaurI m facing a problem while deleting my plugin...The ttf(true-type-fonts) file which i m using, not deletes when i uninstall the plugin.. i tried many things for deleting it but nothing works.. i got this error when i uninstall the plugin: Plugin could not be deleted due to an error: Could not f...

0
Q: c client with php monitoring server

Ff VoteI'm trying to make a simple project. first i will make a simple c++ client, it function is generate a random string and ID. Then if I run the c++ client, and if I look in the php server, it will just show this ID is online, then the php server will send request to c++ client to get the random str...

0
Q: header('Access-Control-Allow-Origin: *'); Not allowing CORS request

LukeI have a PHP file which generates a JSON document. I've set the header as follows but am still getting an error. header('Access-Control-Allow-Origin: *'); header('Content-Type: application/json'); Error message: No 'Access-Control-Allow-Origin' header is present on the requested resource. Or...

0
Q: error while creating thumbnails in php

TejThis is my code for creating thumbnails. Here I'm attempting to check if the thumbnail already exists. If it does it's displayed directly. Else the thumbnail is created and then displayed. <a class="adiimage" rel="colorbox" title=" " href="new/artists/data/single_image.php?imageid=<?php echo $ro...

0
Q: Storing image in Database and retrieving it

Sunil PachlangaIn php if i have a image uploading option in my form then how can i store that image in Database and as per need how can i retrieve it.I have a form with some fields like Name Age Email etc. and one field is about user's image. So tell me how can i upload a picture and store it and retrieve it ag...

0
Q: SQL Help - Newbie

Daz wildeI'm picking up the pieces for a friend. His website used to work and pull featured products from his database, but it doesn't seem to be working. Its just showing the Error!! Any help would be appreciated.... I'm not really up to date with SQL. Here's the code: <?php require_once('const.php');...

-1
Q: How to remove few strings from each associative array element containing a string in following situation?

PHPGeekI'm having an associative array named $questions. For your reference I'm printing out first four elements from this array. The actual array is quite large but all the array elements are similar as the elements printed below: Array ( [0] => Array ( [question_id] => 33185 ...

0
Q: how to fetch data from Sage ERP Accpac

dipanshuHow we can fetch data from Sage ERP Accpac installed in windows.We want to fetch Sage ERP Accpac database data from tables and fed it to zoho.Can we get small php code example to fetch data

0
Q: Codeigniter redirect() function behaves wrong

user88731I developed a basic application using codeigniter framework on wampserver on windows. After I uploaded the application on the remote server which is a linux machine, I had to change many configurations to make the application work on the server. Most of them was due to wrong routing rules conside...

0
Q: SMS Gateway API for WOOCOMMERCE

Sahil GabaI am a beginner and i need to make a plugin for sending SMS notifications to Customers and i need to integrate that plugin with woocommerce. i am using api of http://www.sms19info.com . i am totally confused where to start from? please help me! ###################################################...

0
Q: Selecting rows with max value in range

Vitaly MirskyI have the followng data: +----+---------+---------------------+-------+ | id | site_id | datetime | views | +----+---------+---------------------+-------+ | 1 | 1 | 2013-11-01 23:59:59 | 12 | | 2 | 1 | 2013-11-02 23:59:59 | 15 | | 3 | 1 | 2013-11-03 23:59:5...

0
Q: PHP regexp - put every word into the brackets

Koralek M.I need to transform some string from: big red car to: (big) (red) (car) I know that I can do this with explode and implode function or foreach cycle but I'm interested in regular expression solution. Thanks to all.

-1
Q: post ajax request, how to read?

user2999787i wanted to show you the "post" from my jquery.ajax: because of: $.ajax({ url: "checkAvailability.php", type: 'POST', dataType: "json", data: {username:data}, // this is important success: function(data) { if (data.result == 1) { $("#select-err...

0
Q: aggregate array base on object paramter

user2706762I have an array of objects, each object hold two parameters, like so: Array ( [0] => stdClass Object ( [title] => 'games' [transaction_id] => 102 ) [1] => stdClass Object ( [title] => 'media' [transaction_id] => 95 ) [2] => stdClas...

0
Q: Special character issues reading csv. ASCII with UTF-8 fgetcsv not working. Better Solution?

user3030876I'm reading in a csv which has both ascii and UTF-8 characters and putting in into an associative array to be stored in mongo. I looked everywhere for an answer and finally came up with one. fgetcsv has issues with special characters as has been noted many times in many other posts. For example...

0
Q: How to get the value from textbox & dropdown without submit

user3024288I want to pass the value of product id, product name, textbox & drop down to 'addtocart.php' page. Only values I managed to get are id & name. If I use form for these then values of product id & name are not submitting. Can anyone help sending values of textbox & dropdown as well? while ($row = ...

1
Q: PHP foreach loop JSON

p4b4I know there are like hundreds similar questions on this site, but I just can't get my code working... I have this JSON { "version":"1.0.0", "buildDate":20131029, "buildTime":165127, "lockPath":"..\\var\\lock", "scriptPath":"..\\var\\lock", "connections": [ { "name":"o016561", "bez":"G...

0
Q: Pass the "name" text in option to php form

IsuruIs there a way to pass the text in the name of the to a php from? <form action="process.php" method="post"> <select name="select1"> <option value="1" name="apple">APPLE</option> <option value="2" name="lemon">LEMON</option> <option value="3" name="grapes">GRAPES</option> </select> <input ...

0
Q: FOSUserBundle - login route "hidden" for user that are logged

GiuffreIs it possible to hide the /login route for users that are AUTHENTICATED in symfony but keep visible to ANONYMOUS? and How? I'm using FOSUserBundle.

0
Q: Using variables from the model in the controller - CodeIgniter

SupSon ツSo I'm playing around with CodeIgniter for a bit. Right now I'm trying to build a "page overview" page. I got another page where i can create pages, and i want to display those pages in an overview. Right now i my model i got the following: public function page_list(){ $query = $this->db->g...

-2
Q: live search with auto complete

user3021734<TD> <HTML> <head> <meta HTTP-equiv="Content-Type" content="text/HTML; char set=iso-8859-1" /> <title>Untitled Document</title> <script language="JavaScript" type="text/java script" src="search.js"></script> </head> <body> <div id="main"> Search Here:<Br /> <input type="text" id="amots" nam...

0
Q: Symfony2: Access encoded password from existing user

XoverI want to access the encoded password in a controller or a service. I can access it using Twig: {{ app.user.password }} /* prints the encoded password. */ But when I am trying it from a controller, I'll get a null result: $user = $this->get('security.context')->getToken()->getUser(); $user->...

0
Q: Can I trigger a javascript function from a php function?

Sathya RajI am getting html data through js ajax function like this function getData(dataSource,datasend) { var XMLHttpRequestObject = false; if (window.XMLHttpRequest) { XMLHttpRequestObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { XMLHttpRequestObject = new ActiveXObject("Microsof...

0
Q: Screenscraping for download links

user2987033Basically, i am trying to create a screen scraping PHP script that will step through each web page on a website and pull a download link and some information related to the link from the webpage html. The issue i'm having is the way the download link is returned. The download button does not hav...

-2
Q: How to Change Array Format in PHP

Jassi OberoiI want to change my array format from Array ( [profileImg] => Array ( [name] => Array ( [0] => index.jpg [1] => index1.jpg ) [type] => Array ( [0] => i...

0
Q: Display parent page only on sub-page wordpress

BigTechI want to display parent page only on sub-pages. I am using this code but it display parent page on every page. <?php $parent_title = get_the_title($post->post_parent); echo $parent_title; ?>

0
Q: Using different templates for different nodes in Drupal 7

vigneshmohaI am using Drupal 7. I want to add a template for a group of nodes. For example, If i have three nodes node/3, node/4, and node/5, I want to use a particular template. Is there a way to do that? If it is, How can i do that? Or What is the best alternate method? Now I am using page.tpl.php templa...

0
Q: Memcached data disables zend layout

Mayank AwasthiI am using memcache extension in zend framwork 1. When i try to save the memcache data, it saves it perfectly, also the page displays perfectly. but when i try to load the data using memcache, the layout of page gets disabled each and every time, I am getting data though. The code for saving an...

0
Q: String while passing via Ajax Post gets truncated before saving into Database

George Joffin JoyI have a problem with saving a description from youtube into my database. The content i get via page crawling is say LIKE: The following is a guest post by David Clark.I think David’s new Sass library “Scut” is pretty interesting.It’s like a design utility library, which is distinct from a desi...

0
Q: The send email to the facebook user does not arrive

larssy1For some reason I was not able to find a solution for this on Google nor Stackoverflow. I am currently working on a project which merges my own 'contacts' with my 'facebook contacts'. To send an email to those contacts I have selected, I am using the PHPMailer framework. This works perfectly fo...

0
Q: Extract ip addresses from specific strings in PHP

nutella_eaterI have such output string: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8415 ;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;legallabel.biz. IN ANY ;; ANSWER SECTION: legallabel.biz. 8449 IN SOA n...

0
Q: PHP not parsing with 'real' in comments

dotancohenI have a PHP script phpfile which does not have a filename extension. http://somesite.com/phpfile/argument.html This works fine so long as Apache is configured to parse documents as PHP by default: DefaultType application/x-httpd-php However, if any of the file's comments have the word 'rea...

-8
Q: Php help me plz with query?

Thander Kageid_answer id_friend id_user id_post id_post_from 302 0 74 1952 1951 301 0 1 1951 1950 300 0 74 1950 1949 229 0 1 1949 1820 etc... Pleas...

0
Q: How to save Multiple selected value from dropdown list

KreyaI m trying to save dropdown's multiple value in database.e.g There is two table site and sitecontact.Here between tables there are one to many relationship.Now I want to save multiple contacts for one site in database.For this In UI there is dropdown list from where user can select multiple value...

0
Q: Dependant Drop Down List using Ajax,PHP,MySQL

SreepatiI asked this question below. Now i have modified my program by adding some ajax codes. but still i'm facing errors as the data in the second drop down list shows all values from database. Can anyone point me where i'm going wrong? Question(dependent drop down list values from database). Revised C...

0
Q: PHP preg_replace : matching words containing a dash

zadavI am facing a problem searching words in a string and converting them into links. How to make a search that considers words containing a "-" as whole word and not as 2 words separated by "-" ? Here is an example, if I search for the word "exhaustive", my search function will also match the part ...

0
Q: Error: Illegal String Offset in PHP

Blank EDjoki have been steadily developing my website until i got this error: Warning: Illegal string offset 'user_post' in C:\xampp\xxxxxx\xxxx.php on line 15 I have been at it for three days now i still don't know what is causing this, this is the first time i have encountered this error so i do not re...

0
Q: Should start_session() be always placed at the beginning of the page and not inside an if/else clause?

tas9This is the index.php file of my website. <?php $jump=false; if (isset($_GET['pg'])) $jump=true; if (!$jump) { session_start(); //Has the session been started? If not, if ( $_SESSION['myusername']) ) { include 'main.php'; } else { include 'login.php'; ...

-1
Q: Scan from php application

user3017329Am creating an application for warehouse management.Client need to scan and upload document from the browser directly to the system. I have seen Dynamsoft application which is exactly what I need,but its very costly . How can i make something like that or is their any cheaper solution.What I n...

0
Q: how to get rid of the attached code in the url in facebook login

Subhod30I have used facebook sdk php for my facebook. All the login process is working fine. but the only problem is I am getting the code after login in the browser url like: http://www.xyz.com/home?code=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX I just want to get rid of this code. Can any body help me on this...

0
Q: How to use Apache Lucence in php

U123i want to index search in my project. So i want to use Apache Lucence in php. Tell me some php plugin that help me to implement Lucence. I dont want to use Apache Solaris. please help. Thanking You

-1
Q: mysql_query not reciveing full value

FoxWizzy$list = array("Apple", "Orange", "Popcorn", "Lemon", "Cola", "Water"); for($i = 0; $i <= 5; $i++) { if(isset($_POST[$list[$i]])) { $int = $list[$i] . ":"; echo $int; }//the echo here shows all the selected items } $u = mysql_query("UPDATE performer_info SET int='$int' WHERE id='$id'"); //the quer...

0
Q: Event on multiple google charts

DavidI have a problem, when using the select event for google charts, it only uses one chart for the event (the last chart in the for loop). Is there a way to bind the same event on multiple charts? This is part of my code : var <?php echo $res->jscript; ?> = new google.visualization.PieChart(docum...

0
Q: PHP: A neater way to prepare PDO database statement?

jamescridlandI'm relatively new to PDO prepared statements. I can't help but feel that there must be an easier and neater way to do the following: I load everything into an array anyway, and then have to rewrite the entire thing into a set of ':blah'=>$found['blah'] nonsense. What's a neater way of doing th...

0
Q: Integrating Stripe with a contact form

ElendilTheTallI am putting together a site, part of which allows customers to book events. This is done with a straightforward form. The customer can pay for the event by invoice, in which case the form just needs to be a straightforward PHP mailer, or by credit card, in which case I'd like for the customer to...

0
Q: Prepared statements for zend

Mayank AwasthiI am using zf1. The query in modal is: $select = $postTable->select() ->setIntegrityCheck(false) ->from('posts') ->joinLeft('users', 'users.id = posts.user_id', array('post_first_name' => 'first_name')) ->where('posts.property_id = ?', $id); $postTable->fetchAll(...

0
Q: MYSQL - Calculate associative return from mysql result in php

Ahmed Ezzi have result value return from mysql Query like this: array(5){["Job Title"]=>A, ["Tot.Number"]=>12, ["Interview 1"]=>5, ["Interview 2"]=>5, ["Passed"]=>3, ["Hired"]=>1} array(5){["Job Title"]=>B, ["Tot.Number"]=>16, ["Interview 1"]=>9, ["Interview 2"]=>9, ["Passed"]=>5, ["Hired"]=>2} array(5){...

0
Q: Website fit on screen for tablets, viewport not working?

user2704687I've built a webshop with opencart, with a theme that was originally responsive. However, the owner wanted exactly the same website on all platforms, so I simply removed a seperate responsive.css file and fixed the issue. However, I would like the website to fit on screen when I open it on my tab...

0
Q: Doctrine many to many select

zimmiI have two entities, Group and User: class Group { /** * @ORM\ManyToMany(targetEntity="Group", inversedBy="groups") * @ORM\JoinTable(name="admin_group_user", * joinColumns={@ORM\JoinColumn(name="fk_group", referencedColumnName="id")}, * inverseJoinColumns={@ORM\JoinColumn(name=...

0
Q: PHP arrays. Read post data in dot notation

CosLuMaybe it's a silly question, but how can i read this data i'm getting on my page via post? This are the variables as they appear on firebug under POST. list[0].firstName =test 1 list[0].name =test list[1].name =test I know that php replaces dots with underscores so i can access somethi...

0
Q: How Wordpress serves efficiently

Peterson AndrewAs per my knowledge I know that PHP file can not serve two clients at same time, so in Wordpress index.php will be the file handling all requests, so how it is all the way efficient and faster? is there any logical clustering? or any programming techniques in PHP that Wordpress follows? I have a ...

0
Q: Http request is sending 2 times through AJAX

Muneem HabibMy AJAX code is as follows: data = new FormData(); // data=""; paths = ""; // Create a new HTTP requests, Form data item (data we will send to the server) and an empty string for the file paths. xhr = new XMLHttpRequest(); // Set how to handle the response text from the s...

0
Q: Foreach? Please help me about PHP

user2971509Hi guys, I've got a <table> in a <form>. There's one row with input, textarea and select tags. <form action="pdf/gen-czk-pdf.php" method="get" id="data" name="data"> <table> <tr> <td><textarea name="item[][materialItemName]"></textarea></td> <td><input type="text" name="item[][materialUnitPrice...

0
Q: GROUP BY and ORDER BY on JOINed table - complex and slow

Vlad KucherovThe story is like this... I have users and they have children. I want to send every day using a CRON JOB cupons to users that have children between child birth dates interval. I want to know who will be the user to get the cupon and for which child. also i want to send only one cupon for each chi...

0
Q: how do I call a variable in a controler from a model?

Ralph SchipperI have a model that must gather information from a table with company info. data like company name, adress etc. so I can use for example the company name to put in a footer an to put that name in invoices. this is my model: <?php class Company extends CI_Model { public $name = ''; public $adre...

0
Q: Use google spreadsheet as database

Bujanca MihaiMy task is to get information from an excel spreadsheet on google with php and display data from it on a website. I will need to do this on a site that already has wordpress on it, and I am not very good with wordpress. Any idea? I found google spreadsheet API, but I don't find anything php-rela...

0
Q: Disable sort pagination in view CakePHP

Michał K.I sort my data in controller: $this->paginate = array( 'limit' => 40, 'page' => $this->request->params['page'], 'group' => 'movie_id', 'order' => array('start_year' => 'desc', 'votes_count' => 'asc', 'premiere' => 'desc'), ); And when I print pagination in a view I have urls: ...

1
Q: PHP Translations

Karina McGourtyI have been making some translations in my php files, using php echo method and the following method: In PHP file $body = __('email - contact email', array(':username' =>$contact['username'], ':email' =>$contact ['email'], ':subject' =>$contact['subject'], ':message' =>$contact['message'])); ...

0
Q: Why I'm not getting the updated array in following scenario?

PHPGeekI'm having an array named $questions as follows: Array ( [0] => Array ( [question_id] => 33185 [question_parent_id] => 0 [question_subject_id] => 4 [question_topic_id] => 503 [question_directions] => [question_t...

-3
Q: How to extract html tags from string?

JohnHow to extract all html tags to one string searched with stripos(). Need to know XPath to this string. For example <html><body><div>mystring

0
Q: nusoap with pfx certificate

isaacscI need to consume a webService soap with a certificate. I have a .pfx file and a password. My code is the next one require_once('lib/nusoap.php'); $endpoint = "https://interno.vuds-omc.es:9000/WSRegistroMedico"; $localCert = "cert.pfx"; $options = array( 'local_cert' => $localC...

0
Q: How to hide javascript from page source using PHP

Nitin Mahetamy question is that how i can hide JavaScript code from page source using PHP. i searched on Google and asked to many web developer for this but nobody knows that how it is possible. actually , i want to create a generator same as like this : http://www.way2blogging.org/widget-generators/nivo-s...

0
Q: Wordpress Get Multiple Posts from Multiple Categories with one query

Robin KnightUsing wordpress for a client (I wouldn't over wise). On their home page I want to get the latest 4 posts for each of 4 different categories, I then want to get 3 additional posts that are latest from any category and not currently used above, followed by 5 with the greatest number of page views ...

0
Q: Codeigniter access emails with Image as attachments (pop3 imap)

Syed SajidI want to download to get the following information from my emails sender sender_email_address subject Message attachments = array( all attachments ) any library? suggestions? links?

-1
Q: HTML Button to edit Label which already exist in php page

Mahmoud Ali KassemIf you can help me to get this done, here is an example in VB for what I want, Button 1 command click {//form1.text1.text="Something" form1(php page).text1.text(php lable.text)="Something" php pgae.label1.text = "something"/} can someone help me how to do this code in html+php witho...

0
Q: Form processing in MVC Design Pattern in PHP

user3030676Currently i have a form that allows me to add vehicle to MySQL database when user clicks on submit button (form processing). The form includes below fields. Make Model Year Body Type Transmission Fuel Type I need to do the same thing using MVC design pattern. how can i do this in MVC design p...

0
Q: How do I get the data sent with ajax, on php?

user1047069I have in my .js file: $.ajax({ dataType: "json", //set to JSON url: getUrl('/GetPeriodicStats/'), data: {stats_chat_0: '0', stats_chat_1: '1'}, success: function(c) { .... } in my php file I have my GetPeriodicStats() function. I need the data {stats_chat_0: '...

0
Q: List XML children elements names without their content using XPATH

LifeQueryConsider this simple XML schema: <products> <category name="furniture"> <item name="chair"> <size> <small>10</small> ...and many more <large>20</large> ...

0
Q: can i open php tag in javascript and javascript tag in php tag

user3024503I am making the scripts of my site sign up page so i want to know can i open a php tag in a script i am doing this for more security.. here the code <script> //java script here <?php /php goes here ?> </script> and the script in php here's the code <?php //php goes here <script> //ja...

0
Q: Social - two-way friendship relation

PsychoXI have two simple MySQL tables: user & relations. Relations table: user_id int(10) unsigned NO PRI friend_id int(10) unsigned NO PRI (part of) User table: id int(10) unsigned NO PRI username varchar(128) NO I select friend of friends using this query: SELE...

0
Q: Output distinct values in SQL column with PHP

user2870053I have a table with two collumns (shortened), NAME and CATEGORY. I want to output the number of distinct categorys. For an examle: Sport : 5 , Houses : 10. I use this one: $test = mysqli_query($con,"SELECT category, COUNT(category) as count FROM tablename GROUP BY category ORDER BY count DES...

0
Q: Auto increment job number that resets at the start of each month InnoDB locking tables

Stefanos VakirtzisI have made a similar question 2 days ago but although i accepted a solution, it involved using MyISAM engine.After some researching i found out that i really shouldn't use MyISAM, for many reasons.So i decided to achieve the following result in an InnoDB engine where i was told i would need to u...

0
Q: PHP - IF-statement false, still runs

Carl Bear StefanssonThe last hour I've been sitting with this problem. I have two if-statements (for testing purposes they are both IF-statements, and not IF- and ELSE IF-statements. The code runs the false IF-statement as if it is true. The code: <?php $sth = $pdo->query("SELECT * FROM myDBTable WHERE alien1='$idk...

0
Q: Changing the location of the php error log file

user2767700I use PHP Version 5.3.19, Windows Server 2008 R2 Standard SP 1 and Internet Information Services 7.5.7600.16385. My Problem: I can't change the php error log file location. When I try that and restart the iis service my web app cannot be opened. Browser says 500 - Internal server error. I tried...

0
Q: Remove specific session variable

RobbertI save some session variables in my website by a form submit. With this form the customer can add multiple dimensions to his product. for Each submit the website displays the chosen dimensions. So there a sometimes multiple configurations visible. The customer must be able to remove such config...

0
Q: jquery post returns the script as well including click functions, causes multiple posts

user3032260I have a frustrating problem where I am posting data from a form via ajax, and the script is being returned as well as the data i need, therefore when it appends it to the div I end up with multiple click functions firing $(document).ready(function(){ function submitData(){ var a...

0
Q: how to interchange position of two nodes in xml file using php

Anurag Pareekthere are two scene node and i want to interchange change the position of them my object get render according to this scene position and i want to change the render order thanks in advance . <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="14...

0
Q: prepared querry is not returning expected result trying to find user

BluestrikeI have one result when I do this in phpadmin: SELECT password, block FROM jml_users WHERE username = "user01" However in my php code the scipt does not find my user: Am I doing something wrong with $stmt->bind_param("s", $unsafe_user); I also tried $stmt->bind_param("s", "user01"); with no l...

-1
Q: Report generation using PHP and MySQL

krishnahow to report generation multiple input values from mysql database district and customer type and profession is there example: chose district and customertype and profession have to choose any one from these values

0
Q: Set images to PHP/HTML buttons

Rimantė BaltiejūtėI need to set images to PHP buttons. Here is code of my buttons (at all 30 buttons). You can test It: here $info = getdate(); $date = $info['mday']; for($i=1;$i<=30;$i++) { if($i==$date) { Echo "<input type='button' onclick='popUp();' value='".$i."' />"; } else { Echo "<input typ...

0
Q: Print & Submit to insert into databse in same page in same submit button

sarmistha My Form <form method="post" action="" enctype="multipart/form-data"> <div id="mydiv"> <tr> <td>Service Provider & Type</td> <td><?php echo $row['cab_name'];?></td> <td>Name</td> <td><?php echo $_SESSION['name'];?></td> </tr> <input type="submit" value="Print" onClick="PrintElem('#mydiv')...

0
Q: wget to facebook api returns unsupported browser

AramI have written a code which is connecting to facebook api through oauth ( http://www.phpclasses.org/package/7700-PHP-Authorize-and-access-APIs-using-OAuth.html ) and receive some results. The task is to download all people profiles by name, that could be separated on different pages, so I organiz...

0
Q: How to play dynamic consecutive audio files?

user3032272Basically, I'd like to play multiple audio files consecutively but not simultaneously. By 'dynamic', I mean the files are not specified. Instead I use PHP to load a random entry from a JSON database. The problem is there isn't a fixed number of files to play consecutively (some entries only have ...

0
Q: Secure MySQL Connection in Python

user3012765I have a MYSQL database with users table, and I want to make a python application which allows me to login to that database with the IP, pass, username and everything hidden. The thing is, the only IP which is allowed to connect to that mysql database, is the server itself (localhost). How do I ...

posted on November 25, 2013 by g Void

I've been learning PHP and mySQL with some HTML/CSS and since then created a CMS with CRUD from scratch, added a forum to the system. What else could I do to improve on my coding?

0
Q: recursive folder delete with RecursiveIteratorIterator: skipping files and subfolders when checking for file date

CinoThanks to http://stackoverflow.com/a/15111679/1845386 I found a great solution for recursive deleting subfolders and files in a folder (not the folder itself!). It works perfectly. I needed to extend the function, so only files and folders that are older than 5 minutes are deleted and therefor i...

0
Q: How does facebook server validation work?

frisco_1989Considering a simple example: Login to your fb account Post a status Click on the status dropdrown(top-right corner) Open developer tools in your browser and find the html for the "delete" option edit a parameter which looks like story_fbid=10202782137141336 Since the wall consists of seve...

0
Q: Select2 using AJAX, PHP, MySQL and JSON not populating

JustJasperI'm still a bit of a beginner when it comes to php, ajax and mySQL (started learning it back in September). I'm having some issues populating a Select2 dropdown using a AJAX request to a PHP script that queries my MySQL server, but when I click on the Select2 dropdown it hangs in a perpetual sta...

-1
Q: To insert value of all selected Check Boxes in database in php

Sunil PachlangaI have a form and have some fields in it. Check box is also fields for hobbies and when i submit that form then values are inserted in database and it redirect to another form and show the values from database in table format.But I have a problem when showing the result in table manner is it is n...

0
Q: Echo a variable defined in a PHP script using AS2

user2917204let's say I have a variable in PHP and I need to echo it in AS2, how to do that? <?php $var = "variable"; ?> I need the ActionScript 2 code to connect to that PHP file, take the var $var and echo it. Thanks!

0
Q: How to assign textbox content to a variable and put it to a temp file then read that file and save the content to the server

user3032299How to take the html text area content (description with images) and put it to a temporary file on the server and then retrieve that info and write it to the database. We will also need a hidden var that will be the temporary file name so we know what to retrieve. Let say we have a html editor.....

0
Q: Need htaccess rule to differentiate directories and query strings

Alauddin AnsariI've an url like below mentioned. abc.com/test/abc/hello/?hello=world&foo=bar I've to differentiate directories and query string separate using htaccess I need to have result like: Array ( [data] => test/abc/hello/ [hello] => world [foo] => bar ) I've tried many htaccess method...

0
Q: How might I share an existing user database with Wordpress?

Tom GeocoI have an existing PHP / MySQL web application that allows user authentication. On the same server, I've installed Wordpress in a sub-directory. I would like those users to be able to leave comments on Wordpress posts using their existing names and profile images. A couple scenarios I'm pushing...

0
Q: PHP Form doesn't send data to database

user2043134I'm struggling for two days with this form issue. The form does everything that it has to, except for putting the data in mysql database. I'm working in a Wordpress installation with Twitter Bootstrap. Here's the form page: <form class="form-inline" role="form" action="../process.php" method="...

0
Q: how to reply special character string using PHP without getting blank reply

GuestofHonori'm having a problem with some code. i'm having some kind of a chat bot that reply to the $name who chatted. preg_match('%<b class="(.*)">(.*)</b>%U', $mess, $mem); $name = $mem[2]; if (strpos($chat, 'alt="thanks"/>') != 0 && strpos($chat, 'Bot') != 0 || strpos($chat, 'alt="thanks"/>') != 0 && ...

0
Q: PHP SimpleXML objects with ":"

Flash ThunderThis is first time I tried to use SimpleXML... normally I was parsing xml files with regexp, but time to learn something new... I got XML that contains: <resData> <something:infData xmlns:something="<censored>" xsi:schemaLocation="<censored>"> ...

0
Q: Fetch json data using PHP

sHAms uL aRiFeEnI have a json file and I want to display it data using PHP. My below code gives me error, $json = file_get_contents('data.json'); $data = json_decode($json,true); $users = $data['devices']; foreach($users as $user) { echo $user['id']; echo $user['user']; } When I replace the 3rd LOC with $use...

0
Q: Adobe Reader XI search fail when pdf fileIdentifier (/ID) is set

Ole KI am part of the R&OS pdf class for php developer team and noticed some strange behavior in Adobe Reader XI (11.0.5) When a pdf file includes the fileIdentifier (/ID entry in trailer part) Adobe Reader failed to search for the text content. Once I remove the /ID entry search is fully functionin...

 

« first day (279 days earlier)      last day (31 days later) »