« first day (258 days earlier)      last day (52 days later) » 
00:00 - 15:0015:00 - 00:00

12:03 AM
0
Q: Fatal error: Call to a member function execute() on a non-objec

tonjaggartI am new to PDO and keep getting a Fatal error. I am trying to first check for empty fields, then check for duplicate emails and then if that passes insert the user data into the database. After searching and searching I am absolutely lost as to where I am going wrong. Here is my code: <?php ses...

-2
Q: PHP in HTML(accessing $_POST data)

Armido Maamägikalkulaator.php <form method="post" action="arvutus.php"> <input type="text" name="value"> <input type="submit"> </form> arvutus.php $value = $value-($value*0,04-($value*0,04-144)*0,21); echo "Result is " . $_POST["value"] . ""; How can I make these calculation with value ?

0
Q: Kohana add function return province name

KevinHI'm back again for another question, i'm trying and trying. But i can't get it fixed. This is my issue; I have a database table, with a ProvinceID this can alter from 1 to 12. But it's an ID of the province. The provinces are stored with the value pName in the table Provinces I have the follow...

0
Q: PHP headers putting everything that was output to screen into downloaded file

VereonixI have the following PHP code using headers to download a file from the server: $file = 'Order.txt'; header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=$file"); header("Content-Type: application/zip"); header("Content-...

0
Q: Getting PHPQuery results as DOMDocument objects?

LinkskuRight now, I'm getting results from PHPQuery as strings and then using DOMDocument to parse the string. Since PHPQuery uses DOMDocument, can I get results from PHPQuery as DOMDocument objects? How do I do this?

0
Q: Yii CActiveDataProvider different _item view based on item attributes

user1489878I'm using CActiveDataProvider to populate a webpage showing messages between users. I have an _item.php view file to render each individual message. The thing is currently each message renders with solid line above each message, per specified by the _item.php file. <hr style="border-bottom:soli...

0
Q: .htaccess Redirect Endless Loop

user2908769I have a site with a long path of /academic-solutions/resources/title-of-content/ that I would like to redirect to /title-of-content/. I'm using the following code in my .htaccess file, which appears to actually be performing the correct redirect, but it results in an infinite loop for some reaso...

 
12:33 AM
0
Q: Remove value from array if value is a substring of another value

user2856585Array ( [0] => tt0087523 [1] => cehennem melekleri [3] => euer weg führt durch die hölle [5] => guerreiros selvagens [7] => jungel krigerne [9] => jungle fever [11] => jungle warriors [17] => jungle warriors euer weg führt durch die hölle [19] => la guerra de l...

0
Q: how to save remote image to a file using php curl?

user1788736i am trying to save a remote image to a file using php curl but the file never get saved! could any one help me how to troublshoot this problem ? the image file never get created and but echo $returned_content has the data! <? $returned_content = get_data('http://somesite.com/43534545345dfs...

0
Q: PHP: Dumb URL down to its directory

BetaBlazeI see questions asking how to get the current directory and such, but I want to take an absolute URL and strip the file out of it (IF there is a file -- I must be able to accept URLs without them too). So, for example. Original: http://www.example.com/index.html New: http://www.example.com/ Ori...

 
12:45 AM
0
Q: Fatal error: Call to a member function bind_param() on a non-object for query

BurrowsI have the following code: /* Select the latest 10 posts from users this person's following */ $stmt = $cxn->prepare('SELECT * FROM posts WHERE user_id IN (SELECT following_id FROM follows WHERE user_id = ?) ORDER BY datetime DESC LIMIT 15'); $stmt->bind_param('i', $user_id); $stmt->execute(); $...

0
Q: Executing code once inside a foreach

TheEnvironmentalistI'm trying to execute a PDO bindParam once that relies upon a variable local to a foreach, from within a class constructor function: $this->STH = $this->DB->prepare('SELECT column_name FROM columns WHERE table_schema = "Application" AND table_name = :table'); $this->STH->bindParam(':table', $tab...

 
12:57 AM
0
Q: go to a page with specified dynamic div content

Lake ChenIn a website, A page A.php contains dynamic generated content of B.php or C.php in a div using javascript. The default content is B.php. So, if a user clicks a button to swap content to C.php in the div and click a form submit button, which triggers D.php. How can I return to the page showing B.p...

 
1:09 AM
0
Q: Optimizing php sorting function

heronI got json response (posted below) from server. To compare durations of videos with given time value, currently I'm analyzing every object->duration of results array with foreach loop. I have 2 questions: Is there any fast way to count objects with duration > 3600 for example (rather than forea...

0
Q: Posting link to Facebook using PHP SDK not working properly

Jben Kayeplease be patient with me this is my first time to use FB API. so please consider not to put my question on hold. i'm trying to make a simple fb app which: gets the input from user(text and image-upload) -- index.php process all input using imagecreatefromjpeg and save to dbase & server ---pro...

 
1:27 AM
0
Q: How to SUM, SUM of Total from three table

HaikaSorry I would like to repeat the question since I think was not clear to you, Im doing this b'cose is difficult to me to get what I expect. I want to get SUM of Total which i get from three table from single query, Here my tables!! 1: payment id | school_fee | trans_fee 1 20000 3000 ...

0
Q: Error in XML parsing PHP

monamonaI am processing XML file and constantly getting blow error. [03-Nov-2013 19:00:27 UTC] PHP Warning: SimpleXMLElement::__construct(): Entity: line 83: parser error : Opening and ending tag mismatch: a line 79 and h1 in /home/igp/public_html/portal/xml_igoogle_theme.php on line 98 [03-Nov-2013 19...

-1
Q: Load PHP in javascript

PeterI've got some PHP code where it says the time you signed up, and gives an approximation of how long ago it was. I've been looking into trying to refresh it with javascript, but I'm struggling to find exactly what I'm after, and as my knowledge of it isn't good I'm a bit stuck on getting it workin...

0
Q: How do I use $_GET / $_POST in a jscript/jquery function

Jie HartI have spent all morning chasing leads but although there are answers I do not understand how to implement them. I have found I need to use JSON and use php echo to populate the array but it seems I have to use an object not an array because I need to extract the key and the value but for the lif...

0
Q: Login and Stay Logged in

bloodstorm17Hey so I have a website which asks the user to input their username and password and then it checks with my MySQL database to see if the credentials are correct. Now if it is, I want it so that the user then has access to other parts of the website but without having them to contently re-enter th...

0
Q: Executing two PDO statements in one loop

Oliver BurdekinI have a for loop for a PDO statement and I'd like it to do two things. Data is received from the user device in an array of arrays called $data. I'd like to insert each row into a table called 'theJack'. This part works fine. I then would like another statement to check the [userName] and ...

0
Q: Where should I place the application logic for login functionality?

AgmLauncherI have a question regarding the best place to store fairly complicated application logic. Say I want to allow a user to log into the site. The process of logging in should entail the following steps: From the form field, hash the user's email Look up the user's email hash in the auth table to ...

0
Q: JSON data as string >> MAKE object to access data?

David McClaveI have a form that gets a data stream back from an outside server. The result returns as text that LOOKS like JSON, but it isn;t an object - is there an easy way to turn the string below into an object so I can access the info in it? Or am I just missing something REALLY simple? Here's what I ...

0
Q: Hide column when the statement is TRUE

gerXpaul LlamesGoodDay Mastes!, Theirs anyone who can help me on how to hide this column if this variable $status is equal 'Delivered'?? <?php if ($status == 'Delivered') { ?> <tr> <td class="normalfont" STYLE=...

0
Q: PHP - Find a string in file then show it's line number

xZeroI have an application which needs to open the file, then find string in it, and print a line number where is string found. For example, file example.txt contains few hashes: APLF2J51 1a79a4d60de6718e8e5b326e338ae533 EEQJE2YX 66b375b08fc869632935c9e6a9c7f8da O87IGF8R c458fb5edb84c54f4dc42804622a...

0
Q: stop jquery to run server side code on validation fail

Raheel ExileSorry for the very basic question but i am asking here after trying to search alot. Basically i am doing client side validation its running the half code but it is running the php code also even if it fails. <script type="text/javascript"> function formValidation(){ if($("#inputCnam...

0
Q: Tell a user whether they have already viewed something. How?

user2738308It is pretty common for a web application to display a list of items and for each item to indicate to the current user whether they have already viewed it. Most of the ways that I can think of do something so simple seem extremely "expensive" in terms of the queries required. I can think of a co...

0
Q: Adding Constraints to Nested Eloquent Relationships in Laravel 4

paul-s-I have 3 related tables as follows Sections --> AgeGroups --> Teams. I am able to get a list of sections and list all the agegroups and teams within each section. Currently that lists all Sections and Agegroups regardless of whether any teams exist in an agegroup. I am looking to add constra...

0
Q: Trying to order a 3 table JOIN by date desc, How to sort correctly?

user2925403Have 3 different mysql tables, my script queries the DB using JOINS to output the most recent results from each of the 3 tables. All works like it is supposed to but the way mysql databases allow for JOINS, the ORDER BY will order the results as you list the tables, resulting in the finished outp...

0
Q: WordPress Custom Post Type Template + Conditional Statements: Any Way to Simplify

ConnieSo I'm still getting the hang of WordPress Custom Post Types and how to integrate them into an existing template, but I have a quick question about whether the code I've come up with can be simplified? I have multiple pages I need to call from one particular template, and I've added conditional ...

0
Q: Laravel + AngularJS CORS not working

user1748902I'm making an AngularJS project, right now at http://localhost with a laravel backend at http://api.localhost, both served by an nginx server. when making an $http.post request, angular first makes the CORS OPTIONS call, and I've configured my nginx server to respond with the proper headers: ...

-1
Q: Return Date Value convert PHP

노종협I hope return value convert. use php date() function. PHP Date Vlaue hope YmdHis i don't no... $bbb = "/Date(1381826879853+0900)/" $aaa = date("YmdHis", $bbb);

0
Q: Issue to install xampp in iis runing windows xp system

AnithaIn windows xp system already php and mysql runing using IIS. I need to install xampp also. I am try to install xampp by changing the apache port number as 8080 and mysql port number as 3307 follow all the instruction by these links http://blog.wolffmyren.com/2008/07/30/making-xampp-apache-work-wi...

0
Q: Infinite Scrolling Kohana

KevinHOnce again, a new topic. Trying to fix some things. This time. I'm trying to implement the Scrollpagination function of http://andersonferminiano.com/jqueryscrollpagination/ I already searched the forums, and had some help here and there to get this far. I have this function implemented from: h...

0
Q: Looping through PHP array in foreach and give each $value a new variable name

RunnerI want to take an array, loop it with a foreach loop, and have each array value be sent through a class to get data from a database. This is the code I am currently using: foreach ($unique_category as $key => $value) { $category = $value; $value = new database; $value->SetMysqli($my...

0
Q: Client supplied XML issues with SimpleXML?

Harry GlinosI'm looking to do a project using PHP and SimpleXML. I want to have a client app to send a XML message to a web server and then have the PHP script parse out the values that are needed with SimpleXML. In general, from a security standpoint, I would always do validation against any client input be...

0
Q: Yii access previous data item from within a CListView partial

user1489878I'm using CActiveDataProvider and CListView to output a list of names. I want to bold the name using html only when the name is the same as the name directly previous to it. These are not identical rows in the database, only the 'name' attribute is the same. For example, I want the following: Bo...

0
Q: NOW() doesn't save accurate time in DB: off by 2 hours

Ch HrThe timestamp saved in my mysql DB is off by 2 hours. Query to save event : $sql=query("INSERT INTO events (id, sender, time) VALUES ('','$id',NOW())"); Here's the table events in my DB: id sender time 23 4 2013-11-03 18:57:47 The issue is that when the event occure...

0
Q: get coordinates with php

Szabó TamásThe following code should return with the coordinates of the place, but it returns with a comma only.... <?php function getCoordinates($address){ $address = str_replace(" ", "+", $address); $url = "http://maps.google.com/maps/api/geocode/json?sensor=false&address=$address"; $response = file_get...

0
Q: Update textarea with reading file every second

AlanLet's say that I have a text file that has data added to it frequently. How could I get javascript/Ajax or JQuery to retrieve the contents of the file and post them in a textarea every second?

0
Q: html file open&save jquery tag replace

Kim  SungsuTo change the tag specified arbitrarily open the file, I'm trying to save the file again. Sorry I used a translator How can a jquery tag replace...? test.html ↓ <banner_0101> <div class="banner"><a href="#" rel="external"><img src="test.jpg" ></a></div> </banner_0101> <banner_0127> ...

0
Q: can anyone help me to modify my javascript code?

user2738520I'm new to javascript. Now i want to get value from html tag (value get from database). If there is only one record that fetch from database, my code is work. But if there is more than one record, there is not work, only first record that work. Here is code *PHP* $sql = mysql_query("SELECT * FR...

0
Q: MySQL -- Updating the login time in my data base

BuddhistBeastI am currently working on a project where I need to store information in a database for member login page. Currently, I am working on storing the time the user enters their credentials. It keeps popping up with "Duplicate entry '0000-00-00 00:00:00' for key 'PRIMARY'", which I understand everythi...

0
Q: Passing variable between class methods

Yamaha32088I am trying to pass variables from a while loop into another method from a different class. I am new to OOP so I am unsure how to do this I have been googling for a while now with no luck. My code is below: class ImageRenderer extends CommentReplyRenderer { function __construct() { ...

-1
Q: Select Box Design help for training web application

AkshatI am trying to make a training app for PHP and Python. Where PHP and Python are tracks and one trainee may have multiple tracks. Now each track has_many exercises. Now i want admin to add exercises from a collection as and when he or she wants. Now whats would be the best way to do it. Using sel...

0
Q: PHP Script Running Twice

craigbettOk so I have a weird problem. I have a local XAMPP running and running Acrylic DNS Proxy as well. While I was testing some code I noticed that it was running the script twice. Here's what I got. index.php <?php $myFile = "test.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringDa...

0
Q: Date Creation using PHP to suit HTML-input type date

John CargoI am storing date in coupon table of mysql which is of datetime type. My dates are stored in mysql table as :- 2013-11-04 00:00:00 And while editing via HTML form. I am fetching value and putting value in HTML form as below :- <input id="unlisted" type="date" name="coupon" class="input-large"...

-1
Q: How can I work on a PHP website that only I can access?

JohnI would like to start a website on a production server and am clueless on how to make sure people can't access it while it's being designed. How could I capture emails/display a coming-soon page while I still work on the site live? Also where could I find resources to learn about creating devel...

0
Q: Regular expression find word Hebrew

Nguyễn CầnI'm looking for a pattern to find exactly word Hebrew on Article content. Example: $word = 'דף הבית'; please help me!

0
Q: Simple PHP database abstraction layer

Jeroen De DauwI have some software using an interface provided by a component it depends upon. The interface is named QueryInterface. See the code or these examples. At present the only implementation of this interface is a thin adepter around the MediaWiki database abstraction layer, which is similar when it...

0
Q: header() in php is not redirecting

ghostriderI am having a login page which has a form. The login data are send into a php script to check whether the user exists in the DB. If successful, it should redirect. Here is my code: <?php $host="localhost:8889"; // Host name $username="root"; // Mysql username $password="root"; // Mysql passwor...

0
Q: javascript dropdown options is not in order

user2935177i have a javascript it dropdown the year when i select a year and it dropdown the remaining year but it is not in a appropriate order.so please any one help to rectify the problem.eg. if there is 3 years 2013,2014,2015 i selected 2015 it drops 2015,2013,2014 i want to display like 2013 2014 2015

0
Q: Renaming a file for upload

user2432677I have been using a script for many years now for uploading photos to mysql. This has been verry useful for some time now, however it seems with ipads etc images uploaded all seem to be labelled with the same name "image". So when someone uploads 4 photos from their iphone it just gets overwritte...

-1
Q: php three-dimensional array

user2951338I have 3 tables to query out the data (company, project, phase). They are all related to each other as 1tomany. i.e: 1 company can have multi project and each project can have multi phase. Lets assume the query part is done, I just want to know how do I construct an array in php to have a result ...

0
Q: mysql connect error issue

AlexI've php page which update Mysql Db. I don't understand why my following php code is saying that "Could not update marker. No database selected". Strange!! can you please tell me why it's showing error message. Thanks. Php code: <?php // database settings $db_username = 'root'; $db_password...

0
Q: Create json with same name elements?

MikeWe offer an API for our website with both XML and JSON as returned formats. Both are coming from a PHP Array. My JSON return is what's causing me problems. How do I have same name elements returned instead of [0], 1, etc? Right now, my returned looks like: { "rate": { "rate_span": "1 Min...

0
Q: sytax error php code I cant echo a varibale

user2765552im having some problems with this code in PHP echo, i want if variable if empty then show somethin like "not selected" <?php echo $fax ?: "not selected"; ?> any help appreciated the error: Parse error: syntax error, unexpected ':' in /Republica-Dominicana/negocios.php on line 199 <img src="....

0
Q: Adding to database. No repeat on refresh

kevstarliveI have this code: Episode.php <?$feedback = new feedback; $articles = $feedback->fetch_all(); if (isset($_POST['name'], $_POST['post'])) { $cast = $_GET['id']; $name = $_POST['name']; $email = $_POST['email']; $post = nl2br ($_POST[...

0
Q: need help converting cURL command line to php 10

Al Amini need to convert following command line curl to php curl: curl -H "Accept: application/xml" "https://{id}:{api_key}@api.example.com/orders?limit=1&offset=0" please help me in this issue. thanks

-2
Q: How to figure out this kind map

HaikaI dont know! is this such kind of task can be asked in Stackover. Can any one show me how to configure this kind of map, as I need to use to provide information in different pleases. thank u so much. [http://96.0.255.157/~pfvcmap/]

0
Q: Setting up php , but i already have Apache and MySql

Somjit NagI want to start php but i'm not sure what to install. Most of the sites i visited had instructions on how too install all three( php , Apache , MySql) as a package. They also mentioned phpMyAdmin. Note that amongst these four technologies , I only know MySql . And there are so many options on the...

0
Q: How to rewrite and submit form at same time

BurhanThere is a form that i want to submit and url rewrite at the same time. I can change url by adding onsubmit="rewrite_form(event);" option in form : function rewrite_form(e) { var form = document.forms[0]; // .getElementById("form1"); window.location = '/search/' + form.f.value + '_' + ...

0
Q: How to delete entries when updating table in cakephp?

Theepan K.I have Invoice Model and InvoiceCharge Model. InvoiceCharge is belongsTo Invoice & Invoice hasMany InvoiceCharge. Invoice charges are like products and services those are listed in an invoice. I am using jQuery to add more lines to add more charges. Saving invoice and invoice_table work as it s...

0
Q: How to make the Wordpress Editor not accept HTML?

fizzixSo basically, I am using the Wordpress editor on my site and I do not want my users posting ANY HTML in it at all since it can cause some problems. My Wordpress Editor is currently like this: <?php wp_editor( get_the_content() , 'post_content'); ?> In simple terms, I would basically like it t...

0
Q: CSS: Center Align Form on Page

bloodstorm17So here is my HTML Code <!DOCTYPE html> <html> <head> ... <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript"> ... </script> <style> div {display: none;} </style> </head> <body> <input type = "button" onclick = "insert()" value = "Sign-Up" id="b1" name="b1">...

0
Q: Difficulty Echoing JPEG Images

WhoppaI'm having some difficulties echoing images to the browser. I'm quite new to PHP and I've been searching around the web for the past hour without finding a solution. I have tried adding header('Content-Type: image/jpeg'); to the document but it does nothing. I want my code to scan the directory ...

0
Q: PHP array refactoring

OliverSamson43I'm banging my head against what I am sure is a simple fix to re-structure an array. I don't have any choice over how the array is given to me: Array ( [author] => Array ( [0] => John Doe ) [journal] => Array ( [0] => Biology ) ) ...

-1
Q: I am trying to get my PHP and form working correctly

user2951388Hey I have a simple coding issue and I am hoping someone can spot the error of my ways. I have a contact page http://mattmcdougall.ca/contact this page has a form that is connected to a form PHP. it is half working, I receive the email with ONLY the name subject and recipient (me). I do not g...

0
Q: Array push is replacing the variables instead of adding them to the end, PHP

user2943358array_push($info["First_Names"], "$fname"); array_push($info["Last_Names"], "$lname"); array_push($info["Gender"], "$gender"); Does anyone see an issue? Array push is just replacing variables instead of adding them. The variables of $fname, $lname, and $gender are defined by the user in a form....

 
4:42 AM
1
Q: Having trouble converting a UTF-16 String into something readable by web browser

MichaelMitchellEssentially I have a string of UTF-16 characters that I am getting from a game and it is in UTF-16 and has characters that sometimes just show up as question marks in the browser (Generally non English characters; Japanese/Chinese). What I want to happen is I get the string then I convert the ch...

0
Q: check if url points to a web page and not something else as a file php

lbennetI am using curl to check whether an url is online: $url='http://www.gooogle.com'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_exec($ch); $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($retcode==200) {...

0
Q: How to fetch field type and value?

AlvaroFGI am currently trying to build a form using mysql/php, below is part of the code I have so far $proceso = mysqli_fetch_assoc($result); // my query returns only one row ... <form action='actualizar.php' method='Post'> <?php foreach(array_keys($proceso) as $key){ echo "<label for='$key'>$key: <...

0
Q: adLDAP: Bind to Active Directory failed. Either the LDAPs connection failed or

miCRoSCoPiC_eaRthLinGI'm trying to write a PHP app that authenticates against AD. The app is hosted on a LAMP stack (CentOS) while the AD server is on Windows Server 2008 Enterprise. My app uses the adLDAP library. I'm able to connect / bind to AD if I use non-SSL mode (port 389) but trying to do so using SSL fails....

0
Q: get_class() expects parameter 1 to be object, array given in Yii

Asamoai'm just research about Yii for 2 weeks but i have a project . the mission is use Yii Cactiveform . But I get this error : get_class() expects parameter 1 to be object, array given. This is my Controller: public function actionPersonal() { // Layout $this->layout = '../layouts/news_sty...

0
Q: How to echo date in php

user2938105this code is doing Zip & Download perfect but i want to change a time to date how can i do this when i save a folder its save with time i want to save with date how can i do this this is time script how can i change in to date when i change Y-m-d but this is not working its showing this error ...

0
Q: Using accept() in Filter Iterator in PHP to get values from an array

Watchful ProtectorI have just started working with Filter Iterators in PHP and must admit they are pretty nice to work with. But, not the task I have at hand. I have an array like: $parseArray = [id,"public",..,field6]; I am supposed to do different things like check the length of one field,find a particular s...

0
Q: x_line_item with multiple items in one liner

VincentThis one works with one item: $authorize_args = array( 'x_city' => ......................., 'x_zip' => ......................., 'x_line_item' => "0<|>Coffe<|>lorem ipsum<|>1<|>23<|>N", ); Error with two items: (270) Line item 1 is invalid. $authorize_args = array( ...

0
Q: Post without form submit and GET

KarimkhanI was redirecting to new page start.php and passing variable in this way: window.location.href = 'start.php?&userid=+ userid;` Can I do it in this way: $.post('start.php',{userid: userid}); window.location.href = 'start.php'; I dont want to use GET and Form submit. Because on same page ther...

0
Q: Auto-increment in sql (php)

imrezratinHow I can make a field auto-increment in sql(php)?

 
5:24 AM
0
Q: Check in array if only one specific entry is present PHP

DenoteoneI am trying to check if there is only one value in an array and if that specific value is "Home" then do something. Is the method below the best way to accomplish this or can I do it in one step? Like: // My array mymenu $mymenu if (count($mymenu) < 2 && in_array('Home', $mymenu)){ Do somethi...

0
Q: PHP : preg_replace() with foreign characters not working correctly

SamuraisoulificationI have an array of strings in Korean similar to 사람 [saram] where they all consist of the Hangeul(Korean alphabet) and then the English pronunciation in brackets. The preg_replace I have is: preg_replace("/\[.*\]/u","","사람 [saram]"); But the output is always: 사람 or some similar gibberis...

0
Q: jQuery pagination with dynamic <li>

King GoeksI use this plugin to paginate my <li> : http://www.jquery4u.com/tutorials/jquery-quick-pagination-list-items/ The list derived from select option with onchange method. If I change the option, it will generate a list based on it's value. Here is the jquery code i use to generate the list : jQue...

0
Q: Using JOIN to get deeper level of sub items

RedI have 2 tables Product & Product_BOM () where Product is the master table and Product_BOM contains the parts ( bill of materials ) of the products. Please note that a PART (BOM) is another Product. Table Product Product_id,Product_name,Product_type .. Table Product_BOM Product_Bom_ID, Produc...

0
Q: Why is mysql_num_rows() returning 0?

infectionslaughI have read in another threads that pasting the query in phpMyAdmin returns the amount of rows that you have, but in my case it doesn't even returns a value in phpMyAdmin, it's always 0! Here is the query: $query = "SELECT nom_usu FROM usuarios WHERE nom_usu = '$usu' AND pass = '$pass';"; I op...

0
Q: is there another way to do this without php? - android

user2128405I used to do something with HTML5/canvas. I created three number inputs then after submitting those three numbers will draw a canvas pie chart with whatever angle was inputted. With this, I used form with post method and php with json. I am trying to do this again but into android but what I re...

0
Q: Header location to remain the same.

kevstarliveI am currently creating a podcast website where I have a form for my users to enter a comment on the current episode they are listening to. All my content is stored in mysql and data on my episode page is displayed like so http://www.mysite.com/episode.php?id=1 With separate content for the ...

0
Q: Regular expression Word Boundaries Hebrew

Nguyễn CầnI write pattern match 'abc' on Article content: $pattern = '\b(abc)\b\'. It's worked. But I want match a Hebrew word. $pattern = '\b(דף הבית)\b\'. It's not worked. Please help me!

0
Q: Unable to count database users

rhymizI can't count my users in the database with my current configurations, any advice? (I'm a noob) <?php require_once 'scripts/app_config.php'; mysqli_connect(DATABASE_HOST,DATABASE_USER,DATABASE_PASS,DATABASE_NAME); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to M...

0
Q: Can't use FTP to update plugin/upgrade wordpress

aditI've been struggling with this wordpress FTP issue for the past 3 hour. When trying to update a plugin or wordpress it self it always gives me an error: ERROR: There was an error connecting to the server, Please verify the settings are correct. Things that I've done so far: 1. I've sudo chmod...

0
Q: Is there a way to work on Ratchet with procedural programming?

Pablo J. MartínezIs there a way to work on Ratchet with procedural programming? I mean, there is a necessity in using OOP or I could port all to procedural programming? Sorry if this is a stupid question, but I had to ask because I never used OOP and procedural programming together in the same file, and my PHP co...

0
Q: Codeigniter query php login

gabrielhy all, please help me , i have code public function getLoginData($usr,$psw) { $u = mysql_real_escape_string($usr); $p = md5(mysql_real_escape_string($psw)); $q_cek_login = $this->db->get_where('tbl_karyawan', array('username' => $u, 'password' => $p)); if(cou...

0
Q: How do I put an if statement inside the echoed html of another if statement?

SherwoodProI'm building a menu and I want it to be controlled by user level. I have an if statement that echoes the link to show. However, instead of showing the entire sub-menu, I want to break it down into more if statements. How do I do this? Here is my code if I don't make any sense: <?php if ...

0
Q: Lost mysql connection after form submitt

Navaneetha NairI am using vtiger crm.The crm contains a module 'Products' , and the module provides to take duplicate of products.If we create a duplicate product , it lost mysql connection.I shows an error "Lost connection to MySQL server at 'reading initial communication packet', system error: 111" Also I...

0
Q: authenticate user using docusign

user1285659I have 2 types of users in my system , lets say its A and B. A has an account with docusign and sends a document through email to B. B (who does not have an account on docusign) signs it using docusign. Now for making the api call (https://demo.docusign.net/restapi/v2/login_information), i need t...

0
Q: If statement checking array value not getting expected results PHP

DenoteoneNot sure why I am still seeing the output since my if statement should not send it to the screen based on the results of the data echoed to the screen: echo count($breadcrumb); print_r($breadcrumb); if(count($breadcrumb) === 1 && $breadcrumb[0] === 'Home'){ echo "Is not showing"; }el...

1
Q: How to get these values and send email from the json I am sending from my js

Lisbeth SalanderI m sending a value to php from my javascript. My Firebug is showing the request as Parametersapplication/x-www-form-urlencoded email ga@fds.lo type email This is my code postMessage = {type:"email",email:emailID}; $.post( "email.php", postMess...

0
Q: codeigniter acsess data with query

gabrielhy all, i have error in my project, can you help me ??? thx u all this my code : $q_cek_login = $this->db->get_where('tbl_karyawan', array('username' => $u, 'password' => $p)); if(count($q_cek_login->result())>0) { foreach($q_cek_login->result() as $qck) { i...

0
Q: JQuery Ajax post html data to php and get a reply

user2944805I want to post data from a span like the following, but on click nothing happens. i'm posting '4' in the following span. I don't how to post this or the syntax. Span. <span style="color:#B00" id="PidClick">4</span> Using this. $('#PidClick').click(function() { console.log('PidClick event:') ...

0
Q: Uncaught Syntax Error. Unexpexcted end of input

CarterI have this javascript file that is calling a php file to return a JSON string. Chrome dev tools is throwing the error at line 10 in the javascript code. I know the error relates to a missing bracket but for the life of my and 3 other people who have looked at it the syntax is correct. var reque...

1
Q: Zip file add and rename with php

ubercoolukI have this piece of code..,everything works fine ,but an issue with renaming $zip = new ZipArchive(); $zipPath = 'images/userfiles/'.$company_details->company_name.'_products.zip'; $emptydir = $company_details->company_name.'_product_logos'; if ($zip->open...

0
Q: How to take a photo and send to HTTP POST request with Android?

Cengiz FrostclawI know this has answers here and there, but I couldn't make any of them work. Does anybody know a good reference, or a tutorial, maybe also post here ? What I (my application) needs to do is : 1) provide a button, that opens the camera application. I have done this by a startResultActivity() 2...

-3
Q: PHP file_get_contents() returning enable cookies?

John SmithI'm trying to do a file_get_contents() on https://satoshidice.com/api/status and it's returning this - http://puu.sh/58lCb print file_get_contents($this->base . 'status'); $this->base is satoshidice.com/api (with the http). Why would it return what it is in the image posted above..?

0
Q: authError is shown always irrespecive of the privilege assigned

user2575428In my cakephp 2.3.9 application i have implemented Acl component . It is working fine , but the problem is authError is shown always if the user have the privilege to access some location.

0
Q: Website creation for a client

Saravanan GanesanGood morning friends.. my name is saravanan i am creating a website for my client regard real estate . I done my work 50 % now my client wants to update his website by entering a text regarding his business in excel sheet and wants to import it to the website but he doesn't want to touch the code...

0
Q: Mysqli count returning incorrect number

Roy D. Porterso i have this $countsql = <<<SQL SELECT COUNT(*) FROM `deathnote` SQL; if ($stmt = mysqli_prepare($db, $countsql)) { /* execute query */ mysqli_stmt_execute($stmt); /* store result */ mysqli_stmt_store_result($stmt); printf("Number of rows: %d.\n", mysqli_stmt_num_rows($stmt)); } The output ...

 
6:42 AM
-1
Q: decode a json array object

ghostriderI am having a php function that returns a JSON object. Running this code: $obj = json_decode($result); print_r($obj); where $result is the output of the function. The $result is: {"result":[{"name":"name1","title":"title1","type":"1","place":"place1"}, {"name":"name2","title":"title2","ty...

0
Q: how to add Dynamic Product Title in product page in codeigniter

Selim RezaI have a product table with product data with product_id, product_name, I want to show title in title bar the product name when I can view product details with product_id. But I failed to do that. Please help me with details. Controller::: public function product_details($product_id) { ...

0
Q: peticion POST y guardar html de respuesta del servidor con CURL, PHP

user2951529Necesito iniciar sesión con Curl en una web pero al parecer las cookies no me dejan. Lo hago por POST pero parece que inicia sesión valida el usuario y la contraseña y se cierra la conexión. como manejar las cookies ?

0
Q: Access localhost on a PC from mobile connected using bluetooth/wifi

sanesh pI want my localhost folder on my pc to be accessible by mobile phone connected using bluetooth/wifi. I am using WAMP. How do I do this?

0
Q: htaccess RewriteCond how to not work in a folder and other files of that that

Abdus SalamMy htaccess file is. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f [OR] RewriteCond %{REQUEST_FILENAME} \.php$ RewriteRule ^(.*)$ first.php Now i want this rule not work in my admin folder like my admin folder are admin so when my url is admin/logou...

0
Q: Magento custom ACL return TRUE by default

Deependra SinghI have defined an acl for a tab in Manage Customer <acl> <resources> <all> <title>Allow Everything</title> </all> <admin> <children> <customer> <children> ...

0
Q: Redirecting to a dynamic page

binarydevI have a page displaying blog posts [latest_posts.php] and another page that display single blog posts [blog.php] . I intend to link the image title in latest_posts.php so that it redirects to blog.php where it would display the particular post that was clicked. I guess this should be done by li...

0
Q: Posting data using hidden form

KarimkhanI gont some help from SO previously. But there is some issue here. var userid="12"; var $form = $("<form id='form1' method='post' action='start.php'></form>"); form.append('<input type="hidden" name="userid" value="'+userid+'" />...

0
Q: Does Java Messaging Service (JMS) has a look alike or same structure on PHP?

Shudmeyer Is there a look a like structure of JMS on PHP which can be implemented? JMS can run only on ApacheMq which I have developed a system on PHP that runs on Apache which if I run both only one is running. I dont have to have another server to run JMS? Is there look alike which can be run to Apache...

-3
Q: Ecommerces page with page for products, sign in, registration of new user, and reciept.

user2926903I have a project to create this list of pages, any helps, pointers, codes ^^ would be helpful. Basically a product page, when button is clicked it goes to a login in screen, if the user doesnt have an account they have to created one, then proceeds to check out. writing to a file i think would ...

 
7:12 AM
0
Q: how do you escape a dot?

user962449I'm trying to replace the .pdf extension in a string with /id.jpg preg_replace('/.pdf/', '/id.jpg', $url); when I output the $url nothing is changed. I think I need to escape the dot in .pdf or maybe escape in the / in /id.jpg

0
Q: after validating data from a registration form, redirect to another page to log in

user2951671i am new to php and mysql. I am trying to create a user registration form, validate the data, and then redirect to a login page, where they can enter their username and password to sign in. i have written the codes, but for some reason i'm not able to use the header() properly. Here is my code so...

0
Q: Facebook connect giving Redirecting Loop

Volatil3I am getting Redirecting loop and I am yet unable to figure out where am I doing wrong. Below are my App Settings: config.php session_start(); //Facebook App Id and Secret $appID='xxx'; $appSecret='xxxxxxx'; $base_url = "http://localhost/xxx/fbsource/Source3/facebook/"; index.php <!DOCTYP...

0
Q: href pop up javascript isn't popping up

Christian Burgosthis code isn't working. <script> // Popup window function function basicPopup(url) { popupWindow = window.open(url,'popUpWindow','height=500,width=500,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes'); } </s...

0
Q: How to store images in databases like mysql or oracle?

VijayPandeyI want to store images in a database. How this can be done using a Php page.

0
Q: How to use php variable in smysql for result

mubeen$`min_range=$_GET['min_range']; $max_range=$_GET['max_range']; $brand_name=$_GET['brand']; $result=mysql_query("SELECT brand,image,price FROM mobile WHERE brand='"$brand_name " 'price =3000");` I want ues php variable for database . What is wrong...

0
Q: docusign send on behalf functionality

user1285659i am a newbie to docusign and api's in general. i have created a master account manually on docusign and now i want to create new users using this account and use the send on behalf functionality. I have already gone through this pdf (http://www.docusign.com/sites/default/files/REST_API_Guide_v2...

0
Q: I cannot connect to the apple push notification server and keep getting error 13

Alvin Adamsi am trying to connect to the APNS in order to send a push notification to the devices that i have a device tokens from. My php file is outputting "Failed to connect 13 #errstrn" when i submit the text i am trying to push. Any suggestions on how to fix this? <?php $message = $_POST["push"]; echo...

-1
Q: Am I getting an SQL syntax error

DriudasCREATE TABLE IF NOT EXISTS `contracts` ( `contractId` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT, `title` varchar(20) CHARACTER SET utf8 NOT NULL, `contractText` text CHARACTER SET utf8 NOT NULL, `date` datetime NOT NULL, `contractState...

0
Q: PHP MySQL Negative Value (Balance) Issue

user1544570I am developing a desktop software where it charge user per execution the main action. For example say it will charge user 0.1$ for per PDF print. and my software provide multithreading. . so, if it run single thread it works fine :) but the problem is if user run multiple thread at one (say ...

0
Q: Fat Free Framework (F3): custom 404 page (and others errors)

sineverbaHow I can handle my 404 custom page (and possibly other errors)? I just tried in routing part to add GET /@codes /WebController->error Where my Class WebController handles error, and for 404 i solved (partially). In effect it works for http://mydomain.ext/itdoesntexists but if i recall a ...

-1
Q: Should I be using brackets when 'echo'ing with PHP?

JacobLukeWoodI can't seem to find a straight up answer on this… Lets say I want to echo "Stack Overflow FTW" to the screen. Should I use echo ('Stack Overflow FTW'); or echo 'Stack Overflow FTW'; If it doesn't really matter, which one would be the best one to get into the habit of using?

0
Q: php json_encode UTF-8

iacnatsphp maual of json_encode() http://php.net/manual/en/function.json-encode.php says: All string data of the first input parameter value must be UTF-8 encoded. Does it really mean that the string data MUST NOT contain any 0x00 byte(in unicode it may appear)?

0
Q: why PHP stack (that i build) didnt work?

Doron Levii try to build stack in PHP, but its didnt work. why? this is the problem that i see: Warning: Missing argument 1 for object::object(), called in C:\Program Files (x86)\EasyPHP-12.1\www\tb\index.php on line 152 and defined in C:\Program Files (x86)\EasyPHP-12.1\www\tb\index.php on line 126 Not...

0
Q: PHP match an array into itself randomatically

Lawrence Boadillasample array: $player = array("lawrence","joey","jason","joel","bianca","paulo","albert"); i want to match an array to itself so that it gets a value from itself without getting a duplicated value: "lawrence" => "lawrence"; //must not contain itself "joey" => "lawrence"; //must not assign val...

 
8:12 AM
2
Q: Insert JSON decoded data into mysql with PDO

ImtiazDatabase Structure: Encoding into JSON: I have some JSON encoded anime info stored on a text file using this code: $info = array( 'mal_id' => $id, 'image' => $src, 'title' => $title, 'alt_title_eng' => $alt_eng, 'alt_title_s...

0
Q: hook for new page in wordpress?

user1452376I want to add a new page by my plugin.I tried a lot but failed. What is the hook for creating a new page?Please help. function add_new_page(){ ..... } action('init','add_new_page');

0
Q: Upload large file to google drive (php google drive api)

user2511140I can upload files to google drive with this code that( size < 100 mb) but for larger files show this error: Fatal error: Out of memory (allocated 2359296) (tried to allocate 300457543 bytes) in /home/bahmanx2/public_html/gd/index.php on line 40 my code is <?php ini_set('memory_limit', '-1'...

0
Q: Adding a comment with SimpleDOM using xpath

Leo PflugI'm trying to add a comment in a xml file to a specific element, every element has it's unique names. My file is a translation file so it only contains string-elements and plurals etc. Here's the snippet I use for my first attempt to add a comment: <?xml version="1.0" encoding="utf-8"?> <resources

1
Q: Find all <pre> tags in PHP (with attributes)

senseiwaI was following this question on how to retrieve all tags in PHP. Specifically (under wordpress), I'd like to find all <pre> tags, with all the available information (attributes and text). However, it seems that I'm not that skilled in preg_match, so I'm turning to you. My text does contain v...

0
Q: Set default timezone in Yii

AwanI am using following config for timezone in config.php 'timeZone' => 'UTC', It is working fine and all dates are stored in database according to UTC. Now each user has its own timezone in his/her profile like UTC+5, UTC-5, UTC+0, etc. Now how can I show dates in reports according to user time...

0
Q: Line plot is not plotting data on yaxis jpgraph

keycodeI am parsing sar output and storing values of %idle field in an array. When I am supplying this array to jpgraph Lineplot, it just showing the graph with labels, y - axis data is not getting plotted. I checked array contains an array of numbers. I am pasting my code - $cpucommand= "sar -u"; $...

0
Q: Page forwarding with transfer of parameters called in URLs from one folder to another

The Quantum PhysicistIn my wordpress page, links are addressed in the way: www.mywebsite.com/blog/?page_id=1234 And each number gives a different page. I would like to have a forwarding mechanism that would forward a page in the form www.mywebsite.com/mypage/?page_id=1234 when done in the folder "mypage", to the ...

0
Q: How to use both GIT and FTP for deployment

Mohamed SaidI'd like to deploy using git, but some members in the team doesn't prefer git and they would like to be able to use ftp, I want us all to be able to access the files and make change. Is there anyway this can happen?

0
Q: take data from database with foreach codeigniter

gabrielI have an error in my project, can you please help me? Here's my code : $q_cek_login = $this->db->get_where('tbl_karyawan', array('username' => $u, 'password' => $p)); if(count($q_cek_login->result())>0) { foreach($q_cek_login->result() as $qck) { if($qck->id_jabatan==1) ...

3
Q: Delivery receipts in PHPMailer

charlieI have added this code to my PHPMailer function: $email->ConfirmReadingTo = "sender@domain.com"; which sends a Read Reciept to the sender i have tried using the below code to send a Delivery Receipt but it doesn't work - i think it is meant for sending *Read Receipts * Disposition-Notificati...

0
Q: How to post Jquery ajax Datatype: 'html' and return Datatype: 'json'

user2944805I'm using the following to post html data to php. works, but doesn't work if Datatype is json, and i want to return json_encoded data. Please check the code blocks below. Ajax:- $('#ClickPid').click(function() { var Pid = $('#Pid').html(); console.log('List Click event:') $.ajax({ ...

0
Q: Xcode PHP Login

Daniel WinterI am stuck with this in Xcode, The code below i am aiming to perform a login. My server outputs the data correctly but nothing will happen in the app. It is working on GET variables, but even if i make my PHP script echo "No_Match" it still doesn't work. Please help! - (IBAction)login:(UIButton...

0
Q: Auto fill country and city from zip code, and the oposite

green_leafI am trying to make a simple form that requires address and zip code, so I was wondering if there is a way to auto populate those fields based on what the user has already typed. So for example if he decides to enter only the zip code the city and country fields will be filled automatically and ...

0
Q: How To Append php file to form element

Umit TASI have Form.php there are some input elements inside, I need to add more inputs with ADD button to the form, but that elements needs to come from php file for example: comboboxes\combo1.php "database related combobox. forms.php "inside that I have element & I need to append combo1.php inside ...

 
9:13 AM
-2
Q: State by state IP lookups coding?

ibaadnaqviHello I am in search of State by state IP lookups? The process is like if a person is from a state ip address should change according to .If the ip is out of the country, then it should just say: Tailored to the requirements of your state Does anyone have any idea how this can be d...

-1
Q: How to prevent an administrator from logging in twice?

user2946964I don't want to show the administrator the login page if they're already logged in. What should I do if I want to redirect the administrator to the homepage when they go to the administrator login page. For your information, I have included the header.php into every administrator pages after the ...

0
Q: Symfony2 new bundle

RicardusI recently started my journey to Symfony2 world. The archive I downloaded (Standard edition) comes with a demo bundle the AcmeDemoBundle. I tried to code along with the Symfony2 book provided by the official site. So I created a bundle of my own(EXPHelloBundle) through the Symfony2 console. The...

0
Q: PHP if/else shorthand multiple executions

Nguyen ThanhIn Javascript we can do this by following code: function test(a) { a && (console.log("first"), console.log("second")); } this code above is shorthand of: function test(a){ if(a){ console.log('first'); console.log('second'); } } Is possible to get this working for PHP? Thank...

0
Q: compare $_GET with a value from Database

hagaycan someone please explain how to compare between a value entered in a TEXT INPUT to a value that is stored in a database table ?? i mean , when i'm searching for a name that is stored in my database through a TEXT INPUT i want to check if the name exist.. if it's exist i want to show it and if n...

0
Q: Parse json to android applcation from data in mongodb by php web service

peterodoherty92I am looking to pull data from by mongodb by the use of php, then convert it to a json object which i can parse to my android applcation. I can do this for mysql without any problems, but i am finding it hard to get the right format to be able to read to android. If anyone has any advice tips...

0
Q: Get variables from child PHP class

Amy NevilleI am currently passing variabes to the parent controller_base using parent:: Ideally though I'd like to put a statement into the controller_base to grab these variables from the child. So that I don't have to repeat this statement in every controller that I make. How would I do this? class cont...

0
Q: PHP - iPad or iPhone detection not working with strstr and $_SERVER['HTTP_USER_AGENT']

Lauren ReynoldsI have an app which posts a status update with a link onto a users facebook wall. If anyone then clicks on the link in the status they need to be redirected to the relevant page based on whether they are viewing on an iPhone, ipod, iPad or PC/Mac So my php code in my link page is: <?php if(strs...

0
Q: php selenium test find value of third div from table

Anil DhimanHello Friends i am try to use selenium in YII which is PHP framework. i am trying to do selenium testing on my dynamic data but when i am trying to access specific TD data then i am not able to do that can i use like this "//table/tbody/tr[1]/td[3][.='V. LØWENERS FOND'] for my selenium test as...

0
Q: Php - Secure File Download Facility

VeerI want to make a website, which only allows authentic users to download files from the browser. And any one else cannot download the file. I have uplaoded the files with 000 access, which will restrict the users, but how to give permissions only to authentic users.? Can anyone help me with it?

0
Q: A random function is not working in php mysql

Rahi M.I have to generate a random number which will be unique from the numbers stored in the mysql database. I have written the following function to generate . But But it is not working. function random(){ $invoice = rand(0,9999); $check = mysql_que...

0
Q: file_put_contents on binary data not working properly

user237408i'm trying to read a zip file and its working properly.now i want to get the contents(images) of the zip file.but the images are distorted..here's my code snippet: while ($zip_entry = zip_read($zip)) { echo "<p>"; echo "Name: " . zip_entry_name($zip_entry) . "<br />"; if (zip_entry_...

0
Q: PHP array_push error

IrawanaMy code is as below, $products = array(); for($i=0; $i < sizeof($sales); $i++){ if(!in_array($sales[$i]['Product']['product'], (array)$products)){ $products = array_push((array)$products, $sales[$i]['Product']['product']); } } I'm getting an error called Fatal error:...

0
Q: Split function, how to change?

user2951984if ($file) { while (!feof($file)) { $line = fgets($file); $line = trim($line); list ($date, $name, $email, $comment, $id) = split("\t", $line, 5); if (!strlen($date)) { break; } I keep getting error for split code, but when I chan...

0
Q: MS SQL Query failed in PHP but not in MS SQL Server Management Studio

Alexander HaaseI execute this query with php and odbc driver DECLARE @Auftrag int; DECLARE @date_now datetime = getdate(); EXEC @Auftrag=EHS.dbo.SP_ANZEIGE @Tablet=1, @Status=0, @KuNr='K015538'; SELECT 'generatedID'=@Auftrag; It returns a resource(13) of type (odbc result). If i do odbc_fetch_array the...

0
Q: Trim characters from RSS feed

egr103I'm calling in a RSS feed to my website using PHP. Currently my code below is calling in the entire contents for pubDate: <pubDate>Thu, 12 Sep 2013 07:23:59 +0000</pubDate> How do I just display the day and month from the above example i.e. 12 Sep? <?php $counter = 0; $xml=simplexml_load_file...

0
Q: HTML textbox which takes multiple values by autofill like Facebook, Google+ etc

Mohd MuddserI need help on creating a text box as it is in the Facebook send new message feature. I mean in the To field of this message box, we can add as many people as we want and all these people are suggested from our friend list and we can add as many people as we want. I want to create same feature f...

0
Q: Fancybox links only opening first Wordpress post - need to open different posts each time its clicked

user2705547I'm working on a site that has a buy now option on a book catalog page (each book is a custom posts). The books are added as custom posts by an admin in addition to custom fields with links, etc. When the user clicks a buy it now button, Fancybox pops up a window that has different places where o...

0
Q: Cacti - overwite login page through my plugin

PirabaI have created one plugin , & enable it in the Cacti . Its ok, working fine. I want to overwrite login page without change Cacti auth_login.php , i need to overwite my page. How can I implement this functionality... Thanks in advance..

-1
Q: How to change default home page in opencart

Editme HereI am new to opencart. I just want two main pages, one will be listing all the products(by default in opencart) and the other will describes about the company. So how can i change the default home page. These two pages should have different headers. How can i set the route for this kind of pages.

0
Q: Security of data in database

JayasankarI am making a web application and i want it to be secure, so i ll be using SSL and, will hash passwords. But my server is managed by a different company and it's a shared hosting server, they have direct access to database. I want to prevent any possible loss of sensitive information so i am thin...

0
Q: Nivoslider, wordpress custom widget. / Half Working

SamI am making a website in wordpress and I could get the nivo slider plugin and I have done and it worked but I have to make the website simple for the end user to use and also output slider captions in a bit of a uniquely styled way. Anyway the code for my widget is as follows: /* * ***********...

-1
Q: How to make a picture quiz using PHP and AJAX

user2586455I hope this question isn't overly broad... basically I have built this front-end for a picture quiz (below) and now I need to make it function: It's built using PHP and I want it to function in real-time using AJAX. So to be specific, the following is what I need to know: 1) Should the answer...

0
Q: Continuous Deployment with Jenkins & PHP

fatlogI'm sure there are answers for this all over stackoverflow but I was unable to find anything specific. I have a PHP project which I am revisiting. Its running on a RHEL5 box. I have SVN on the same box. Out of curiosity I recently added Jenkins to the machine and have the jenkins php template a...

0
Q: Expedia EAN / TravelNow API search with city name doesn't list hotels

techyteeI have asked this question some time back but haven't received the answer yet. Can anybody refer the original link and answer it? Thanks Expedia EAN / TravelNow search using city name issue

0
Q: PHP Locale get country code

user2036031I am currently getting a user's country in PHP using the following method; Locale::getDisplayRegion($_SERVER[HTTP_ACCEPT_LANGUAGE],'en') This returns the countries name in text e.g. United States. However, I want to return the abbreviated country code from the $_SERVER[HTTP_ACCEPT_LANGUAGE] r...

0
Q: Optional parameter GET - query [Yii]

Michel Phelpsmain.php 'admin/<alias>/<munu>' => 'mycontroller/pd' Mycontroller public function actionPd($alias,$munu) { var_dump($alias); var_dump($munu); } Parameter $munu can not be Set in URI-query. How to fix the line 'admin/<alias>/<munu>' when prompted to localhost/...

0
Q: Echo Nothing when Query is Empty

McGingerI am trying to check if the user input $entry is empty, and if it is, to echo nothing. I don't want it to do anything. There are no results, it shouldn't display anything. However, I keep getting an empty query error. Here is my php: $link = fConnectToDatabase(); //Retrieve parameters from que...

0
Q: How send orderid/itemno to paypal and get back in PayPal Express Checkout API

user2617449How send orderid/itemno to paypal and get back to my site. I want to update that orderid is purchased What is the purpose of Token ID or CORRELATION ID or TRANSACTIONID? API works fine Got back result Array ( [TOKEN] => EC-2R626219M62454427 [SUCCESSPAGEREDIRECTREQUESTED] => false ...

0
Q: DirectAdmin with two apaches

user2799976Is it possible to run two seperate httpds (apacher servers) on one machine managed by directadmin? What i want to do is I have few scripts/engines running on my server, some of them need PHP with TS (thread safety) and some need non-TS and I'm searching for way of running this all together

0
Q: Loading an article into a components template in Joomla

Dalam Hensii would like to load an article into a components templates php code within the Joomla framework. I can load modules in php, modules in articles, components in articles and and..but i never wanted to load an article into a components php. Does anybody know of a code snippet for that? Appreciat...

0
Q: wordpress upload cv file in a registration form

Mohamed Husseini made a registration form in my website and i need to make the one who register to upload his CV <input type="file" id="file" name="file_cv" /> i need when he uploads it send the file to the server and returns a link so it can be put in the database as a string

0
Q: Html/css/php selected navigation

DunkeyI'm new to this so I need your help, I have a navigation menu in my header. When a page is active, its tab has a special id named menu_active. I'm including this header.php in my pages to reduce redundancy. This is what I've tried so far: <nav> <ul id="menu"> <?php ...

0
Q: Setting default Datepicker date using PHP session variable date

PaulieI'm setting the date in the Datepicker by using PHP. The date is set using $_REQUEST and I store this in a session variable. $date = $_REQUEST['date']; $_SESSION['date']=$date; The session variable and date is getting set as required. I set the default datepicker value by using the follow...

0
Q: What is the best way to make client-server WebSocket applications?

fenixI look through the stuff available on the net, there are a lot of suggestions. So, I can't make the decision what to use and what would be most suitable for the task I have. I decided to ask the community to help. The project is the small server based multiplayer game with "real" time interactio...

0
Q: How do I turn json.stringified array back into a PHP array?

Kiran RSvar array = []; array.push( { "title":"title1", "desc":"desc1" } ); Am I missing something here? I json.stringify the above array and POST it to PHP using: var sendit = Ti.Network.createHTTPClient(); and then in PHP I say: $received_list = json_decode( $_POST['array'] ); The stringified ...

0
Q: radius from a certain amount of km from a postal code

LokoI am making a website where people can place their products on the website and people should be able to find the products and make an offer etc... Now I want to search like this: First you insert your postal code, then you give a dropdown menu with some distances.So you can choose how far away y...

0
Q: Right Align with multiple line in php with imagettftext

MelkiThe title is clear enough. I need a right align text in an image with multiple line text. I know how to do it for one line. (The text is in Arabic. ) Here is my code. header('Content-Type: image/png'); include('persian_log2vis.php'); //font $font = 'arial.ttf'; //font size $font_...

0
Q: Escaping PHP in functions printing HTML pages

MichaelPCurrently can't figure out how to properly escape a php function in my printing functions that output my HTML pages. For example, I have a page called removeClient, where I want to remove a client according to it's ID. A drop down box should supply the user with the current client ID's available...

0
Q: pirobox jquery script does not support html5 doctype

aleraskoI have a problem with pirobox jquery, that script can not work in <!DOCTYPE HTML>, on .php page, in all leading browsers, while works excellent in this doctype mark up: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="htt...

0
Q: How to send Delivery Receipts using PHPMailer

charlieI am using PHPMailer to send emails and i want to be able to send Delivery Receipts to the sender I have tried: $email->ConfirmReadingTo = "sender@domain.com"; which sends a Read Reciept to the sender i have tried using the below code to send a Delivery Receipt but it doesn't work - i think ...

0
Q: Automatic facebook login

Marc BöhmerI manage 4 Facebook fan pages. Whenever users make a news on his website, I post it on Facebook. Now I have made it that I only have to press a button and the news were posted. I would like to automate this. How can I do this? My problem is that it is associated with my Facebook account and then...

0
Q: Check for correct answer (quiz) using PHP and AJAX

user2586455I have a picture quiz with a single input field for each image. I need a way to check if the value entered into the input field matches the correct answer and if it does, perform a few operations like add/remove a few CSS classes and increase the score count. And I need this to be done in real ti...

0
Q: Google Charts not displaying values correctly

MarkPI'm having trouble displaying Google Charts correctly. I'm trying to do this with Ajax and PHP. This is the code that is loaded on the page: <script type='text/javascript'> // Dummy Array for now <?php $php_array = array( array('Terms', 'Visits'), array('test'...

0
Q: Passing Stylesheet to View from Controller

James JefferyIs it possible to pass a Stylesheet to a view from a controller? I have a master.layout file. This master layout is used for every page on the site. On the site the user can change colors and properties of their user profile, so on the profile pages I need to pass in either a custom user stylesh...

0
Q: Javascript link won't work

Troy4344Please help here. I have a javascript Ahref that I want to be clickable to open on menu item in wordpress. It doesnt seem to work. How to make a proper clickable link. Here's the code: <?php $pp_display_hide_homepage = get_option('pp_display_hide_homepage'); ?> <a href="javascript:;" data-...

0
Q: php multiple file uploads not processing

danyoI have the following which uploads a single file and works fine: <form enctype="multipart/form-data" action="" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="512000" /> <input name="userfile" type="file" /> <input type="submit" value="Upload" /> </form> <?php $uploa...

0
Q: foreach object in array won't work while for loop working

nimiI have an php parameter of an XML feed I get using simplexml_load_file. Here is the var_dump for some of my parameter so you will see the structure. object(SimpleXMLElement)#1 (2) { ["@attributes"]=> array(1) { ["version"]=> string(3) "2.0" } ["channel"]=> object(SimpleXMLElement)#2 (5) { ["t...

0
Q: mod rewrite htaccess file does not work properly by removing .php extention in lamp server

user2211477php file in my webpage extenstion so i used .htaccess with mod_rewrite enable in wamp server .. It worked fine the url of the webpage will be localhost/test/about instead of localhost/test/about.php With the same code i just tested my website in lamp server(ubuntu host) but it does not worked....

0
Q: how to check codeigniter old password?

AbhijitI am new in codeigniter. I want to change password and match it with old password. If it gets matched then user can enter new password. my view file is <div class="modal-body"> <?php echo form_open('textarea/changePass')?> <input class="span5" type="password" name="oldPass" placeholder="Old Pass...

0
Q: Magento customer/invoice/order id format

Janny BomansIs there anybody who is able to tell me how to change the format of id's in Magento? I would like this format for invoice ID's: E-YYMM-#ID Example: E-1310-028 Where: E- = standart prefix 1310 = year + month 028 = invoice id Same for customers: E-005 E-006 E-...

0
Q: jquery array does return all keys in each function

Stanislas PiotrowskiI met some trouble, I have a ajax query that does return array from database like that $objet['name'] $objet['date'] $objet['amount'] When I do an each function it does an iteration for each rows annd keys, I would like to make one iteration for each rows and to display data in table row. b...

0
Q: Laravel 4: Many to Many with extra relationship

Claudio Ludovico PanettaI've got a problem with Laravel 4 and "many to many" query relationship. I've got four tables: users needs currency user_needs User_Needs contains the "many to many" relationships between Users and Needs. describe as follow id - user_id - need_id - currency_id - price ID is an Autoincreme...

0
Q: php to remove image from pages in wordpress

user2952123I am having an issue with my website and am not having any luck with the themes developer. I am looking to remove the Christmas tree image in the corner as seen here (http://www.christmas-songwriters.com/?page_id=46) although I want it to be left on the homepage (http://www.christmas-songwriters....

0
Q: Moodle timer html chnage

Sujith WayanadI am very new to moodle I am trying to find out the timer html, I need to change the markup of timer for customized style like I need to split hours, minutes and second. anyone have an idea please share. I have checked module.js, renderer.php, custom.js, these file I fount out related css cla...

0
Q: Joomla Re-direct Error

user2765211We have a link to a page on google showing as "domain.com/index.php?Itemid=221" this should be linking to the SEF version of that page which is "domain.com/index.php/product-category/product-name". How would I set up a redirect without using apache rewriting (as we still have index.php in our url...

0
Q: How can a make a PHP script run without redirecting to it?

James TrotterIm making a simple web-based control panel, and i figured the easiest way for me to accomplish it would be to have PHP on the 2 machines (one being the web facing machine, the other being behind a VPN), basically I need it so when I press a button on the site on the externally facing IP of machin...

0
Q: docusign api create new account

user1285659i have created a master account manually on docusign and now i want to create new users using this account. This is my code: $integratorKey = 'XXXX-XXXXX-XXXX-XXXX-XXXX-XXXXXXXX'; $email = 'my-email'; $password = 'XXXX'; $name = 'User'; $header = "<DocuSignCredentials><Username>" . $email . "</...

0
Q: Integrating slider in wordpress custom theme

AdrianI am using the following tutorial for doing so http://wp.tutsplus.com/tutorials/theme-development/adding-a-responsive-jquery-slider-to-your-wordpress-theme/ but i am stuck at step 2. After i have pasted the code from step 2 in the slider_post_type.php and i go to my dashboard and select Add New, ...

0
Q: Regular expression match Hebrew

Nguyễn CầnI have a pattern match word in my post content: $pattern = '/\b(word)\b/'; It's worked. But when i replace word by: $pattern = '/\b(דף הבית)\b/'; It's not match word דף הבית in my post. How i use preg_match() match word with Hebrew language? Sorry for my lousy english.

0
Q: how to get key-value in associative array?

salivanI've an associative array: Array ( [1] => 1 [2] => 0 ) array will always contain only two. The key is user_id and value is status. I applied ksort() to the array, because I wanted lower user_id first in the array. Now I want to grab key and value for each, (but I never know what key=user_id...

0
Q: Multiple variables + static value, inserting as one in database

user2022298In my database I have the following date field, 2013-12-25, now I want to fill that with 2 variables and 1 static value something like this: "'2013-".$month."-".$day."' But this won't work. also I need the "-" spacing the items.

-2
Q: Can I detect the php code is debugging

Yuan ChenI want to do some special code when I'm debugging my code with xdebug. Is it possible to know that? Is there any parameter or something to detect this.

0
Q: Grunt - running php and watch SCSS/CSS

Adam JohnsonI'm trying to use Grunt view run a php web server with the SCSS/CSS changes being watched and recompiled as they're changed and live reloaded into the web server. At the moment it is running up the web service and showing the requests, however when I modify and save an SCSS file it's not recompil...

0
Q: JQuery/Ajax accepting True/False from PHP function

Farid Siddiquifunction check_jobref_availability(){ if ($job_reference_already_exists == 0) { $output = TRUE; } else { $output = FALSE; } echo $output; } This is my PHP Code (rest of the code actually queries the DB) and returns 0 or 1. Based on which i need to return true or...

0
Q: How to get a response from a database accessed via cURL?

aspiring_programmerI am creating an iPhone app to allow the user to input information into a form and then submit that form. The form is a replica of that found on an existing website and we used cURL to populate the fields on the website and automatically submit the information, which gets added to the database (...

0
Q: php mysql conditional query AND OR

T_5I have a code like this and variables which are selected by user in check-able form SELECT FROM WHERE product = 'Super Model' AND Model = 'Model1' OR Model = 'Model2' OR Model = 'Model3' OR Model = 'Model4' GROUP BY And check list look like: Choose Models: Model1 Model2 Model3 Model4...

0
Q: using PHP to connect to a Network drive remotely using authentication

DavidI am trying to connect to a Network drive remotely using authentication data(\drive_name)(T:). I will need to upload and download documents. If possible can you give me some pointers. If you require any additional information please let me know Thanks in advance David

1
Q: Read webpage content from URL

VeerI need am making a website in which the user will provide with URL of some other page and the code will read (not open) it and extract a part of the page. Say, I provide URL for this page, and I get the question header of the page. How can I do that.? I tried using AJAX, creating object of HTT...

0
Q: Simple website redirect from www.example.com to www.example.com/mine

George KourouleasSo, I am working on ubuntu server for a php website. I read a lot inside here, but most of them were a bit confusing and others did not work. I want that redirection to be happening for a certain reason. I need the user to be redirected(or to be forwarded if you want) from www.example.com to www...

-2
Q: Check form fields for link or url and then reject if positive

DunxmaxI want to check a field in an html form for spam links and then stop the form being sent if the field does contain a link. From my research I think I need to use preg_match to check the field, but although I have read a lot around it on this site and the regular-expressions site I am struggling ...

0
Q: php generates an empty string while received encoded string via ajax post method?

Parveez AhmedAlthough it is heard in the forums that PHP automatically converts encoded strings sent via AJAX GET or POST method. I have sent data by using ajax post method which is encoded using encodeURIComponent() function. My code segment is: var name = document.getElementById("name").value; var url =...

1
Q: Best approach to user activity wall

NoorUser activity wall I have different post types, like status updates, projects, donation etc. Each type of post has its one or more tables in databse. A user can create all post types. User has a wall like Facebook where he can see different post types which he created in chronological order (any...

0
Q: How to create SOAP service for .NET application?

KamilI need PHP SOAP service for .NET desktop application. I want to add WebReference in VS like this: I know, that I have to use PHP SoapServer in WSDL mode. I saw PHP manual (link) but I don't understand it, there are no comments in (terrible) example code, i don't know what is "classmap", where...

0
Q: GCM (Google Cloud Messaging) CCS (Cloud Connection Server) with JAXL

user1948888I have seen that people succeeded to connect to GCM CCS in this post: unable to connect to Google Cloud Connection Server but I do not know how to receive and send messages. Have you succeeded to do all the process? Any help will be appreciated (docs, or a link, or examples of source code will...

-2
Q: Form for website

TonyLook at this website page as an example of what I'm trying to get on my page to function like: http://livinghopesav.org/about-us/commitment/giving-opportunity/ This is the code I came up with so far, I'm stuck. Can someone help me? <td content csheight="276" width="266" height="399" colspan="6"...

0
Q: jqzoom with bootstrap not working

user2947950I am using Bootstrap v3 and i just cant seem to get jqzoom to work. Did i miss out anything? No animated zoom seems to be appearing.. I am sure the scripts belongs to the head tag...... and the class =jqzoom is correct <? require("config.php"); ?> <!DOCTYPE html> <html lang="en"> <head> <...

0
Q: php switch case error

anders_reimerI was following Luke Welling and Laura thompson's book on PHP-MYSQL web development I have the following code in html: <form action="processorder.php" method=post> <table border=0> <tr bgcolor=#cccccc> <td width=150>Item</td> <td width=15>Quantity</td> </tr> <tr> <td>Tires</td> <td align="center"

0
Q: Selenium Server | IDEServer unable to test InternetExplorer

user2834440Hey i have got the following issue, i program some SeleniumTestCases and now i want to run multiple Test(Browser=Firefox,Ie,Chrome,Opera). But after the Firefox Session the test abort. It look likes the Driver is no correctly embedded. Additinatly the default driver is set on Iphonedriver ?! Bu...

0
Q: Trying to add 'the_category' to posts metatag in WordPress

JPateSpacing on this and I'm not the php expert enough to analyze this theme. In the posts metatag, I'd like to add "post category" to post date, post author, which are presently displaying. Ideally, I'd love to have the heirchagy, e.g., blog/chocolate-candy, etc... Here's the entire single-post.php...

0
Q: fatfree framework: set variables on ONERROR

sineverbaHow i can set variables in error function? $f3->set('ONERROR',function($f3){ echo \Template::instance()->render('layout.htm'); }); This is my code, and i need to add a similar thing $f3->set('ONERROR',function($f3){ $f3->set('page_title','Error on page'); $f3->set('page_de...

-1
Q: Get images from external page using PHP

PixarkI want to get the URLs of all images of a given external page using PHP. Is this possible? And if so, how is it done?

0
Q: Can't Open my Downloaded PDF

Algie RosarioI have a Code Below in which it Successfully downloading a .pdf file but when i open the file it always shows an error message. This is my Code: include("MPDF57/mpdf.php"); $mpdf=new mPDF('c','A4','','',32,25,27,25,16,13); $mpdf->SetDisplayMode('fullpage'); $mpdf->showImageErrors = true; $...

0
Q: PHP Scapring Alexa info

subruiI'm trying to receive information about Alexa Top Sites from a Contrie, and i would like to receive: Website Position; Website URL; For the URL i'm getting already, but when i add tag for website position something isnt working, here's my code: <?php for ($z=0;$z<2;$z++) { $html=file_get_co...

0
Q: Shared Access Signatures function for PHP / AuthenticationFailed

user2952042As noticed here, the shared access signature is not supported in the Azure SDK for PHP. So I developed my own function to generate the signed-url using the Miscrosoft Azure documentation (here) and the PHPAzure Codeplex project and source code (here) I want to generate an signed-url that may be ...

0
Q: Use MongoDB, MaxMind database and PHP

Marc WitteveenI've imported http://www.maxmind.com/en/city (GeoIP City) into MongoDB. There are two collections: blocks and location. Blocks have start of ip range and end of an ip range and an integer (will make this a MongoID later) indicating a document in the location collection. ip addresses in are stor...

0
Q: Links and Images Embedding Regexes

namikiriSO Community! I am new to regular expressions and I have a trouble with them. I have a chat script with simple parser of user data. There is an ability to embed an image with BBCode tag, like this: [img]http://example.com/image.png[/img]. I also want to do automatic link transformation to valid ...

1
Q: Why custom post is not displaying according to template?

Tasawer KhanI am using crowdfunding by astoundify to ceate custom post type download(which is campaign actually). I have created a signle-download.php page as a template but post pages do not seem to use this template. Is there anything else I have to do? code for single-download.php <?php global $wp...

0
Q: jquery and ajax, how to return an array and display it

Stanislas PiotrowskiI met some trouble in my ajax request. In fact I do not know how to ou many records. I've tried this : $rqt = "SELECT a,b,c from table"; $res = mysql_query($rqt); while ($data = mysql_fetch_assoc($res)): $objet = $data; endwhile; //requettage return $objet; but it out ...

0
Q: Show blog post excerpt with Laravel 4 framework

303KI'm trying te show the excerpts from blog posts. I am able to do this with php and mysql. However, i am wondering if there is a more 'friendly' way of doing this within the Laravel framework. Thanks!

0
Q: call function before start other function codeigniter

fabrizioI recently red the documentation about laravel, "i think is a good framewrok but in my project i'm using codeigniter", there is Request Lifecycle that how i understood it allow a call before start any other action, example is useful for check if the user is logged. My question is there is somethi...

0
Q: Ajax, call multiple PHP function from a single js

almali have a trouble with my project. In my site i have a page html with a single button and at onclick() eventa js function call intro.js, trough a XmlHttpRequestObject have to do many calls at many php function, in detail: in js i call scan() function function scan() { if (xmlHttp) { // try ...

0
Q: php file upload to the server

DanielWriting a secure file upload PHP Script from the bottom sounds like hell to me. The basic rules to uploading a file in no particular order: 1) Create a new file, something random, and give the new uploaded file that name 2) Check the extension 3) Check for the exif trick 4) Store all uploade...

0
Q: Apache PHP/OSX Mavericks: - failed to open stream: Too many open files

Code PoetI've recently upgraded to OSX Mavericks and since then, I've started getting the aforementioned error on my development machine. There is no obvious problem in the code (it's an auto generated Yii sample application). What has happened as part of upgrade to Mavericks is: PHP was upgraded from 5...

-1
Q: MySQL User Profile Table

Yax MokwaI am working on a project that requires building a profile(table) for students in the university. I have created a departments table thus: CREATE TABLE IF NOT EXISTS `departments` ( `dept_id` int(11) NOT NULL AUTO_INCREMENT, `dept_name` varchar(255) NOT NULL, PRIMARY KEY (`dept_id`) ...

0
Q: Multiple UPdate with PDO does not work correctly

RiKoI am trying update a couple of values in Pdo, but updating process ends without error. But updating does not completed. Here are my codes. I have checked every POST, all posts were accepted correctly. try { $db = new PDO("mysql:host=$host;dbname=$db", $user, $password); $db-> setAt...

0
Q: How to posted content as root content when posting to blogger by php

Trần ĐấtI have a piece of code .This Php code create new post to blogger .But content of post is different . Ex : # root content $entry = "<entry xmlns='http://www.w3.org/2005/Atom'><title type='text'>My post</title<content type='xhtml'><iframe width='100%' height='100%' src='http://www.mywebsit...

0
Q: PHP is it possible to extend a namespace to natively use functions outside of class

user787301Okay here is the scenario: Here are two example classes. The first one defines some functions outside the class name. I would like the second class to be able to implement it as if it was defined natively. There are a couple of functions I use a lot. I thus need them to be as short as poss...

0
Q: How to build zend php filestructure with one core application?

piotrFor quite some time I've been building zendphp application with file structure as simple as this: .. application library public Recently I ran into some configuration problems where I have to use different controllers/models for different setups. It is not possible to use one application to ...

0
Q: How to show a day and date in timestamp data (PHP MYSQL)

user2924643i have a field with timestamp datatype in my database, this is the format when i added some record example: this is chapter field of chapter table in database book id chapter title timepost 1 1 ..... 2013-10-30 23:33:14 i want that format change in my web s...

-1
Q: PHP Pagination with 5 pages

Kapil Vermaif( isset($_GET['page'] ) ){$page = $_GET['page']-1;$offset = $recLimit * $page;$page = $_GET['page']+1;}else{$page=2;$offset = 0;}$phpself = $_SERVER['PHP_SELF'];if( $totalPages <= $noofpages ){echo "Pages if less than or equal 5 : ";for($i=1; $i <= $totalPages; $i++) {echo "$i |";}}else{$i=1;f...

0
Q: Including an image in PHP

MichaelPI have the following code to cycle through a dataset retrieved from a query. while ($cdata = pg_fetch_array($q_clients)) { echo "<tr><td>$cdata[clientid]</td><td>$cdata[firstname]</td><td>$cdata[lastname]</td><td>$cdata[ip]</td><td>$cdata[status]</td><td><img style=\"cursor: crosshair;\"...

0
Q: Flash getting data from a remote server with PHP and MySQL

JasonI'm currently trying to load a bunch of rows of highscores from my website's database to my flash application. I'm using PHP to retrieve the data from MySQL database and return it back to flash. Everything works fine and the data is returned when I'm debugging my application in my Flash Pro. How...

-2
Q: Select muti statement with one query

Mulham Aryani'm trying to select multiply statement in one query like this i have 3 columnsplace_work,work,national i want to select 1 user i have already try his but doesn't work SELECT * FROM users where place_work='".$variable1."' AND work='".$variable2."' AND national='1' it's return with 0 when i tr...

0
Q: SQL selecting from two tables

user2894116What is the difference between ? SELECT u.id,u.name,u.email,d.city,d.state from users u, userdetails d where u.id=d.uid SELECT u.id,u.name,u.email,d.city,d.state from users u join userdetails d on u.id=d.uid Are they both different style of writing join ? which one is faster ?

0
Q: how to add rel attribute to tr of table

HungryDBI need to add 'rel' attribute to the row of this table for some reason. i did this but it doesnt work. how should i do it? <?php $query = $con->prepare("query"); $query->execute(); while($result = $query->fetch(PDO::FETCH_ASSOC)) ...

0
Q: Silex: routing variable assignment issue

Tom SchuermansI recently wrote a post about request forwarding in Silex, which used a blog example to explain sub requests in Silex. I use a slightly modified version of this example for a domain controller. The path to the domain endpoint = /product/domain A domain can also have a webhosting package attache...

0
Q: Using php to show a file on ftp server

Guus van WalstijunI got a ftp server with a file called "file.txt". On my website, i would like to show what this file contains using php. what i got: <?php session_start(); $_SESSION["ftp_pass"] = $_POST["pass"]; $_SESSION["ftp_user"] = $_POST["user"]; $ftp_pass = $_POST["pass"]; $ftp_server = "ftp.guusvanwals...

0
Q: Change class and text in html because of php result

user2877744In my html i want to call a php script (which calls a python script and check if my nas is online or offline - this works fine) and returns me either "online" or "offline". Depending on the result the class ("label label-success" to "label label-danger") and text ("Online" to "Offline") of my onl...

0
Q: There is no header still session_start() sending it

MariaI checked topics related session_start(); sry couldnt find what can help me session_start(); include "databaseregistration.php"; include "check_function.php"; session_check(); check_function.php contain (simplified code to check where i went wrong) <?php function session_chec...

0
Q: Using Grep to create two files

user1132726I have two massive text files with millions of rows, I want to compare them and output two new files. 1) The first output file shows all the lines which need to be deleted from file-1 to create file two 2) the second output file shows all the lines which need to be added to create file two exa...

0
Q: jQuery ajax dialog keeps sending same values

PeterIt seems i'm having a problem with a jQuery ajax form, it keeps sending the same value although the form fields appear to be empty. Therefore i assume jQuery is "caching" or not overwriting the vars i defined. function payment(projectID, billID) { $.ajax ({ url: 'modules/projects...

0
Q: Payway IP Address - Unknown customer IP Address

user2952288I am using payway payment gateway and westpac banking services for our Australian client. It was working fine but I moved the site in another sever and added SSL. I added the server IP how we did for earlier server. Now payment gateway is not working. It is showing the following error message. E...

 
12:07 PM
0
Q: Php Curl a language site and diplay it's content

KindoprecyI wanna ask If it's possible to curl a language website and display it's content like this: Word: Love Definition: To have affection for someone... The form sent to me by the webmaster is this: <TD align=center> <form action="http://www.thewebsite.com/all_word.php?lang_id=68&word=love" metho...

0
Q: Redirecting using php doesn't work

JoetjahI have a page in which the user can fill in his email adress. When the user clicks on 'Send', a .php script is called. In this script, a POST is made to an external webservice and an answer is received containing an URL. The .php then navigates to that URL. It looks like this: <!DOCTYPE html> <...

0
Q: How to update the value of array in Yii session

StreetCoderI am using "ajaxSubmitButton" to send some values of 3 fields: registrant, product id and quantity to controller (controller name: actionCart). After submitting the button I receive those values in session array what I did successfully. At this point, if I submit same product id but different qua...

0
Q: url param not getting properly

NaeemI have a two server.I am passing 4 variable in url ssid(36),rawstring(1024),sample_id,user_id. I simplely want to get parameter passed in url.When I hit my first server I am getting param,but same url(Only change server name),I get 3 parameters(not getting raw string). In my controller I am testi...

0
Q: Yii checkBoxList() validation with options

ScowenI am unable to correctly validate a checkBoxList using options: This is the element in the form config 'benefits' => array( 'type' => 'checkboxlist', 'items' => \application\models\db\Option::items('application.benefits'), ), This pulls in the options from the options table and popula...

2
Q: MySQL IF Statemtent Tally

MaxI have a table in MySQL that has the following fields: an id field a picture field that is either 0 or 1 for yes or no and the same type of field for a telephone number. I want to run an if statemtent that checks if the row has an image and telephone number A yes to either would add one to...

0
Q: Transfer EventID from 1 file to another file

user2022298Currently I am making an event calendar something I want the user to edit there event: EXAMPLE: events.php http://i42.tinypic.com/sgsvth.png The edit button action goes to edit.php edit.php http://i41.tinypic.com/2wrl26s.png How can I include EventID from events.php into edit.php so I can UP...

0
Q: jQuery input value not updating with form submission

Aditya BhattBefore my HTML form submission, I am putting some values in my hidden input element, which is not submitted with my form, any error or something? For ex: Below is my form function: <form id="clientForm" name="clientForm" method="post" enctype="multipart/form-data" action="clients.php" onClick=...

0
Q: express checkout integration step 3 - http redirect

Fabio Rossihere's my question. I've made a request to the PayPal server to obtain a token but now i don't know how to use it to pass it to the url in which i have to be redirected, and i don't understood in the documentation how this process works. <form method="post" action="https://api-3t.sandbox.paypa...

0
Q: What's the best way to develop a library using composer?

Denis LinsWe're starting a new project, and we're managing dependencies with Composer. We'll probably build our app on top of Laravel 4. But we'll also create our own library, which we will use for all our next projects, not just this one. So, we have this terrible doubt: what's the best way to develop a ...

0
Q: Shopping Cart doesnt display TOTAL amount correctly

user2946964"Total" and "Cart Total" doesnt display correct. Note the "Total" has value "1" i believe this is because of [1 * AMOUNT] ; the amount variable is unable to call thus being left out. You can refer to the image here for better idea: http://i42.tinypic.com/2uh465k.jpg Am i missing out anything? Wr...

0
Q: Create KML file from MySQL DB and parse it by geoxml3

user2866324i wan't to create a KML file from a mysql query and parse it by geoxml3 parser i used this manual to create kml: https://developers.google.com/kml/articles/phpmysqlkml (Using PHP's echo to output KML) query is working well, tested it in command line but i do not know where the file is saved to...

0
Q: scroll down load more content with jquery wookmark how?

user2951112i ma using wookmark jquery plugin am getting problem how to do this when i scroll down content load more i try many thing but not work jquery didnot show any result when scroll down. but i saw in console scroll down script work fine bellow my scripts. /*! jQuery Wookmark plugin @name jquery.woo...

0
Q: Multi select dropdown using jquery JTable library

PrasenjitI am using jquery JTable library to create a form in php. Now I want to create a dynamic dropdown with multiple select options.How I will do ?

-1
Q: Getting a list item based on 3 condition

TariqI want to show listing based on three condition 1. Total no of reviews(Comments) by specific Company. (company_id=5) 2. Total no of ratings(5 Stars) by the specific Company. (company_id=5) 3. Health of the user who commented on the above company post (health will be taken by the total no of revi...

0
Q: Regex - How to find category-name in http://domain.com/post-type/category/category-name/anything/else/after

wafflI have an URL formatted like so: http://domain.com/post-type/category/category-name/anything/else/follows And need to extract only category-name no matter what follows. For example, in the url: http://domain.com/projects/category/print/page/2 I only want the word print I am trying this reg...

1
Q: Set proper endpoint in for S3 Client in Amazon AWS PHP SDK

MarliesI'm trying to use the AWS SDK for PHP to programatically upload a file to a bucket that's set to be a static website in the S3 Console. The bucket is named foo.ourdomain.com and is hosted in eu-west. I'm using the following code to try and test if I can upload a file: $client = \Aws\S3\S3Clie...

-1
Q: Create URL Shortcut icon with permanent icon image

Pavan KumarHello In my Web application I should provide the URL Shortcut with my own image so that if the user clicks on that shortcut icon he can use my application. I created the shortcut icon by as follows "Right click on desktop"->"New"->"shortcut"->"Giving Location as www.mysite.com"->"Name of short...

0
Q: PHP, foreach mailing twice

user1456158I was wondering if you guys could help me out with something that seems really simple but I somehow dont get it to work how I want it to work. The code below is something I made to send emails to people. But every emailadres in $allEmails is receiving 2 emails and the database is filled twice as...

0
Q: PHP Simple HTML DOM Parser file edit

Kim  SungsuPHP Simple HTML DOM Parser [ before server file ] ImgRollingfile.html <cate_0101> <div class="cate_banner"><a href="#" rel="external"><img src="1111.jpg" ></a></div> </cate_0101> <cate_0127> <div class="cate_banner"><img src="asdd445.jpg" ></div> </cate_0127> edit.php <pre> Cate number [ in...

-2
Q: Warning "Do not Access Superglobal $_POST Array Directly" on Netbeans 7.4 for PHP

KannikaI've got this message warning on Netbeans 7.4 for PHP while I'm using $_POST, $_GET, $_SERVER, .... Do not Access Superglobal $_POST Array Directly What does it mean? What can I do to correct this warning?

-2
Q: Which Markdown implementation for PHP 5.1.6?

enridagaThere are implementations of a parser for Markdown written in PHP, some of them explicitly require PHP > 5.3 while some others do not specify it. Which is the implementation of Markdown for PHP that would work with PHP version 5.1.6?

-1
Q: Deleting data from two tables using one query php

kateWeirdoI am supposed to delete data from two tables named tbl_stdinfo and tbl_schinfo having the same fieldname std_id which is related to both tables $delete = mysql_query(" DELETE tbl_schinfo, tbl_stdinfo FROM tbl_schinfo, tbl_stdinfo WHERE tbl_schinfo.std_id= '$std_id' AND tbl_schinfo....

0
Q: Javascript PHP/MySQL - Insert row value from database into textfield

SiZaPossibly very easy to do but I cannot work it out! I'm trying to make a button which inserts row value pulled out from the database into a textfield. <?php while ($row = mysql_fetch_array($query)) { ?> <tr> <td><?php echo $row['mobile_number']; ?></td> <td><input type="button" value="select" o...

1
Q: Doctrine batch insert with data from other table

Nelson TeixeiraI'm doing an import module that bulk inserts 90000+ registers with symfony/doctrine. In order to insert each object I must read a field from other table. So, for each register I first obtain the relevant object from the other table, like this: $this->doctrine->getRepository('table1') put it i...

1
Q: How can I get user's country flag on my site

Johny PieI wanna display user's/visitor's country flag on my site. I am using different technologies like php,jsp and simple html. So I want a code which by placing on my site, visitors can see and it should run in all platform. In short I want country detection API. If anybody can help me, I'll be ver...

-3
Q: how to create and write on a matrix of 16 bits

user2952553Explain through a small code mapping of a 4x4 array * (16 positions) that accept only values ​​0 or 1's. How to assemble an array is relatively simple, the challenge is to generate * This mapping using the least amount of bytes possible in any programming language the challenge and create ...

-1
Q: Active Menu Include php

DragonChaserFirst of all, i would like to mention that i know that there are multiple topics on this matter. yet i decided to make my own version as a form of learning and there are several reasons i need to learn it this way. The error i recieve is this one: Parse error: syntax error, unexpected ''.php''...

0
Q: Submit post with ajax inside wordpress

JuanmiThis is my first question on Stackoverflow, thanks in advance for all people for making our life easier. Sorry for my English, it's not very good. I have this code in my server: <html> <head> <title></title> <meta content=""> <style></style> </head> <body> <script src="http:/...

0
Q: PHP - Fatal error: Cannot redeclare class Config in /path/to/Config.php on line 44

Jon CrowellThis is a wordpress local installation that I am trying to work with. I don't understand what this error means. Line 44 reads as follows: class Config { My guess is that a Config class has either already been declared elsewhere, or that this file is being executed for the second time. I'm n...

0
Q: split text by words and punctuation marks

MaximusI have this text: A man’s jacket is of green color. He – the biggest star in modern history – rides bikes very fast (230 km per hour). How is it possible?! What kind of bike is he using? The semi-automatic gear of his bike, which is quite expensive, significantly helps to reach that speed. Some ...

 
1:25 PM
0
Q: Zend, organization and MVC

user2614506I'm a beginner, and I have a question concerning the organization in Zend (with the Model View Controller architecture). Already, the explanation ... Let's say I have an object "$subject" (Zend_Db_Table_Row_Abstract) on which the objects "$member" (Zend_Db_Table_Row_Abstract) could subscribe. If...

 
1:49 PM
-2
Q: $_GET value is equal to database value?

hagaythe form is actually a search engine where i enter "values" that are stored in my data base. till that position everything works perfect ! i get the values from my database the way i want ! what i'm asking is to "check" if the value entered in the text input exist i my data base table , if yes ke...

0
Q: showing selected option from mysql in dropdown

MsKazzaI have a dropdown showing options from mysql, no problem there. The problem is on the update page when i want to show the option already selected previously. The dropdown selects options from the margins table and puts the value into a field in the products table. This is the query that select...

-1
Q: PHP: Array output from terminal to array or csv

demtI have a text file that looks like this: array(7) { ["followers"] int(24581) ["following"] int(384) ["statuses"] int(7260) ["friends"] int(3) ["friendratio"] int(128) ["followspeed"] float(0.00021009170010307) ["tweetspeed"] float(0.0039720462050737) } array(7) { ["...

1
Q: fetching data from the Database, not working correctly

Axel Vondelingim wondering if someone can help me, cuz im stuck:) the script does not work correcly:/ the records in "Naam" are fetched, looped and the table is displayed: But the data from "product" doesn't show. So my point is: Can some one help me get the products data from the DB, thanks in advance ...

-1
Q: Minimalistic, customizable and "blank" PHP/MySQL CMS

alberto2000I am looking for a lean, minimalistic, lightweight and very customizable CMS, which does not come with bloated featureset, styling, etc. but offers a lot of freedom to the developer. Would be great if it was actively maintained.

0
Q: Integrate Disqus comments system into Android application?

ZookeyI need to implement Disqus comments system into my Android application. I tried with this tutorial below, but I have some problem. http://globeotter.com/blog/disqus-android-code/ I didn't understand well part about disqus_identifier. As you can see from the code below I use this code to acc...

0
Q: Recieving json with html tags fails in PHP

Robbie VercammenI have a website that sends and receives string in JSON format from my Java REST server with jersey. Everything works fine until I'm trying to receive a json object with html tags. A println on my java server tells me that this data has ben sent: data sent: {"text": "Wij zijn Pixel Apps, ook we...

0
Q: PHP registration not creating data in tables

user2844931I have linked my PHP with my database via "include.php" and it is connecting to the database. however it isn't creating the data in the tables with the following registration PHP. <?php if(isset($_POST['doRegister'])){ $username = $_POST['username']; $password = $_POST['p...

0
Q: How to configure PHP coding rules in netbeans 7.4

stevenI recognized that there are new hints in Netbeans 7.4 for PHP coding. For example there is a "Too Many Lines" hint which says: Method Length is 115 Lines (10 allowed) Another hint is: Too Many Nested Blocks in Function Declaration. I found out that I can disable each Hint under: Tools >

0
Q: Trying to fetch the distint result but it does not work using mysqli statement query

Hunza AliI want to fetch the data from three tables which have many to many relationship. Here is the table structure of my database. users uid[pk] fname lname username 1 John smith johnsmith activity act_id[pk] title log Account Login reg Account Registration user_activity se...

0
Q: Zend Caching of images gives problems once the site goes down for a while?

Stevie GHi I have a site which makes use of Zend Cache to keep a directory of cached files on the server. It is setup as follows: method to call an image: function getFile($id) ---pseudocode--- * Check if ($file = zend_cache_upload_info_ . $id ) is in the cache folder If not: * return to $file : the d...

0
Q: retrieved html and php code from database is not updating

Facula Farhadi created a menu which have HTML and PHP code, and I insert both code to database, retrieve the code from database using php and display it through code mirror, but when I try to update my HTML and PHP code, retrieved from database, it's not updating, its remain as it before and then I removed PH...

1
Q: Storing and recalling timestamps (or general data) from a single column

AkyriI'm quite new to programming in general, so I expect this question to have an easy solution. I searched for an answer before posting, but I'm not really sure what I'm looking for. Basically, I have a database with the following structure: Table: things Column 1- ID Column 2- Name Column 3- Year...

0
Q: Retrieving extra variables from php function

CataneoI am trying to return three arguments from the expense table I have in my database. This is my function which is located in users.php public function expense($username, $i) { $query = $this->db->prepare("SELECT * FROM `expenses` WHERE `username`= ?"); $query->bindValue(1, $username); ...

0
Q: Trouble Taking a company name from one table an inserting it to another

Sam WilliamsHi I have a table full of company names, the problem I am having is that it is full of duplicates. To resolve this I am using the following piece of code to remove the data from one table and then insert it in to another using DISTINCT. When i run the code, i keep getting the following error, ...

0
Q: create download link for php created image

gurungI am working on a little resize and download image kind of php script wherein the events must happen in the following fashion : A visitor uploads an image file. The image is resized by the script. A download link to the resized image appears in the front-end. My resizing code is ready and wor...

0
Q: Image upload to other server

Jan De LaetHaving this problem: $connection = ssh2_connect('ftp.example.com', 22); ssh2_auth_password($connection, username, password); ssh2_scp_send($connection, $_FILES['userfile']['tmp_name'], '/path/to/dir/1.jpg', 0644); The dir chmod is set on 0777 but no image is uploaded. Am I doing something wro...

0
Q: Mongo PHP extension on Windows getting error

NarendarHere are the details of my PHP installation: PHP Version: 5.3.8 Apache Version: 2.2.21 PHP Extension Build: API20090626,TS,VC9 XAMPP location: C:\xampp. File name: php_mongo.dll. (downloaded file for mongodb extension for php "php_mongo-1.3.1-5.4-vc9") I moved php_mongo.dll file to C:\xampp\p...

-2
Q: how do i set the value of a <select> tag from the database?

Christian Burgosi am selecting an entry from the database to be edited on html/php. the code i wrote(from what i've learned) isn't working. i need a better and working one. i've searched google but all i see is only putting the default value for tag. $civil_status = $row[8]; //value from selecting the data...

0
Q: Swiftmailer connection timeout

Roel VeldhuizenGot two instances of Symfony (both same source code) and on the same server but on a different subdomain. One of the instances throws the following error while the other is sending the e-mails correctly. Connection could not be established with host smtp.bla.info [Connection timed out #110] H...

-2
Q: How to parse information within HTML <code> tag using php

LaraI am using a PHP script to crawl data from HTML and struggling to parse the data within HTML <code> tag. For instance, in the following code, I would like to parse the content such as name, location, position and company name. <code id="content" style="display:none;"> <!--{"required content":{"...

1
Q: rewrite the "?" and "=" into a forward slash /

SethCodesI want to rewrite the ? and = into a forward slash without have to rewrite the entire URL. I have a lot of trouble getting my head around .htaccess but is it possible to simply convert the ? and = into / - this seems to me like a much more simple option. I have tried various methods but it ruins ...

0
Q: Cave-at when stripping HTML tags from strings?

Prof. FalkenI want to clean away the < and > characters from an input string, so as to make it "web safe" and avoid script injection mischief. I know strip_tags() can be used for this, but this will result in a string such as this: We are looking at counts < 5000 for this test run to be truncated to: We a...

0
Q: How to work with cron job in zendframework 2?

raghuveer999I have two functions in zend framework 2, which fetch me the details of apartments from another site and save them in my data base. (BUT THEY DO SO ONLY WHEN I RUN THE FUNCTIONS). say the controller name is 'FetchFromSourceController' and the functions are 'index' and 'ical'. those are the names...

-6
Q: How to create e-commerce website

user2952634I really don't know how to make this question clear. I am new into web design and programming as well. I realise e-commerce and blog websites are quit different from basic websites. Now, I wanna know how to proceed on my project, cos am creating an e-commerce site from scratch, using HTML and ...

0
Q: textarea val() edit and remove string with jquery

Mario Rossii'm creating a link sharing that on bind() events of a specific textarea ( where i paste links ) it does an $.post ajax callback with a preview (in case of youtube or vimeo link). Basically, i would remove link into textarea each times that link is detected and preview is gotten. this is the fun...

0
Q: why do I need mb_convert_encoding to show the correct characters

ZhenyuHej, I hope someone could help me with some php / mysql encoding issues. my website have charset=UTF-8, and mysql DATABASE is also set to be UTF-8 encoding. my problem is that when I retrieve text from mysql to the website, i need to use php function mb_convert_encoding(@db_field,'utf-8','iso-...

1
Q: How to add my own image to URL Shortcut permanently

Pavan KumarHow can I add my own ico to my url shortcut. So that even tough i move my shortcut to another system that won't effect. I tried in conventional way of adding the ico image to url shortcut. when when i move that shortcut to another system that shortcut lost its image

0
Q: php - Turning raw 8 and 16 bit data into an image

EdwardI'm trying to load a file and turn it into an image. The file format is called an Infernal Machine MAT and is used for textures in the game Star Wars Jedi Knight Dark Forces 2. The file comes in 2 color depths, 8-bit and 16-bit. They are pretty much Bitmap images except that they lack various hea...

0
Q: FFMPEG Invalid value '1' for option 'loop'

helloworldI am trying to run this code (It did work on my previously server, but now i keep getting this annoying error): ffmpeg -loop 1 -r 25 -t 322 -i /home/kampmann/public_html/m/xxx/movie_10262.jpg -q:v 1 -an /home/kampmann/public_html/m/xxxs/573240.mp4 2>&1 Error: Invalid value '1' for option 'loop'...

0
Q: About CakePHP and google chart

user2952750i tried to use http://bakery.cakephp.org/articles/ixu38/2010/04/30/googlechart-api-helper, but I have not managed to make it work. 1.- I created the helper GoogleChartHelper on app-->View-->Helper with the code. 2.- I created this function on my controller: public function chart(){ $color...

-3
Q: learn web scraping with php and save the information in database

fahimehI want to scrap a web page is it hard to learn? I need to get words and their meanings from a website and save them in my database Is there any software for this?

0
Q: Some Session variables being lost between pages

AnchovyLegendSomething odd is going on. I have been testing a web application on my local machine and it works perfectly fine. Session's are being handled perfectly. Recently, when I promoted the application to production, everything works well except the some of the session variables not being saved betwee...

0
Q: Class included correctly not found

VanDirIt works with Dreamweaver but not in my site. I have this hierarchy: / phpfiles/ best/ tile.php bestcartile.php templates/ leftcolumn.php tile.php and bestcartile.php define the classes Tile and BestCarTile(a subclass of Tile). Some code,...

0
Q: Overwriting a function in a class in PHP

Andrew AlexanderSo I have a function in a PHP class, and I would like to have a modified version of that function for another class (an extended class). Would I just recreate the class with my modifications inside the extended class? How would I go about having a function that acts differently in my extended cl...

0
Q: php resize image on upload precess

AndrewSI know this question was asked before here, but i really need some one to explain me how can i use this in my situation. This is my simple php script tha uploads the image: <?php if(isset($_POST['submit'])){ $ipad=$_SERVER['REMOTE_ADDR']; ...

-5
Q: How can i achieve the following output without using more for loops in PHP?

ShanmugamLet us consider i have three letters A, B, C Now I want to print these three letters in this way. A B C AA AB AC BA BB BC CA CB CC AAA AAB AAC ABA ABB ABC ACA ACB ACC BAA BAB BAC BBA BBB BBC BCA BCB BCC CAA CAB CAC CBA CBB CBC CCA CCB CCC Please help me to achieve this. Thanks in a...

0
Q: How to add two column names in form validation codeigniter rule

Moeed FarooquiI am using codeigniter. Below is the form validation set rule unique[bf_product.product_order,bf_product.id] bf_product = table name product_order = column name I want to add another column i.e: product_category names to unique rule in form validation. So that the product can be fetch on t...

0
Q: Mailing a form with dynamic number of entries

ElendilTheTallI have a form that dynamically adds inputs depending on a user-supplied number. The form is used for booking courses, and the user selects the number of attendees, with the form adding in inputs to read in their details. The inputs are generated and named simply by inserting the count of a FOR l...

0
Q: cURL and PHP issue

Ahmed MagdySo far I want a curl command to download a file into a specific directory , So I have done this system('curl -o hi.txt www.site.com/hi.html'); It doesn't work because my directory isn't writable , I need to find a way to set curl to download that file to a writable directory of mine .

-7
Q: Loop for date('w')

Thiago Masano Cavaloti for ($i=1; $i<= intval(date('t', $month)); $i++){//echo date('w', $month) //if($x == 0){ $tempDate = '"'.date('Y', $month).'-'.intval(date('n', $month)-1).'-'.$i.'"'; echo $tempDate."<br/>"; echo "wday => " .date('w',...

0
Q: Link to dom page and load a certain div via ajax

user2688810I have a page with a DOM that has various links in the menu. Every menu link loads the content of a div from an external site via ajax. (and in my case a little animation). But what if I come from an external page and want to directly open one of the menu links (contact.php or blog.php etc.) in m...

0
Q: how to insert only one word from a string into mysql database

Michael Bulumahow can i post only one word into the database. code as below: $write=mysql_query("INSERT INTO `staff_description` (`id`, `staff_name`, `description`, `description2`,`writer`, `date_stamp`) VALUES ('$id', '$staff_name', '$description', '$description2', '$user', '$date_stamp');") or die(mysql_err...

0
Q: Updating MySQL fields in a PHP FOR loop

ChrisI have a a series of columns in a MySQL table (check1, check2, check3, etc.) that are set to either 0 or 1, depending on whether their corresponding fields in a PHP form are empty (sig1, sig2, sig3, etc). For example, if a field (sig1) is NOT empty, then its corresponding column (check1) is set t...

0
Q: How to update Quantity of cart in Woocommerce with select box

DerekI am developing a custom "mini-cart" to extend my woocommerce install. Currently when someone adds an item to cart it will display their cart in a pop up with detailed info. I would like to replace the default quantity section with a select box which I have here: $defaults = array( 'input_nam...

0
Q: Sending string containing spaces causes SQL syntax error

Sameh KaddouraI have a select list that contains strings fetched from my database, multiple strings contain spaces and are causing error, at first PHP was not reading the space. I fixed that using quotations but the error is still there. This is my php code in one file: $AllDepartements = $db->getAllDepartem...

0
Q: Calculate Netmask/Gateway from IP Blocks

Brett PowellOur Datacenter has given us a JSON dump from all of our machines to import into our own inventory management system. This supplies the IP Blocks such as (192.168.1.1/26) but as I am importing hundreds of blocks, I would like to also calculate the Netmask and Gateway. I looked over the networking...

-6
Q: How to merge two arrays

user2757460I have to merge two arrays. Those arrays are: Array ( [1] => Array ( [job_id] => 84 [name] => Test 444 [Notification] => Reminder [color] => #FAF8F0 ) [2] => Array ( [job_id] => 86 [name] => ...

0
Q: Zend Framework Gmail Imap Threaded Emails

Eniyan RI am Zend Framework 1.11 to read gmail. I am able to establish connection with gmail and read messages. But I am struggling and not able to find any article on how to achieve threaded view Using the X-GM-THRID Extension provided by Google. Please somebody tell me how to house the gamil extensio...

-2
Q: only one if case is working i want to run if and elseif both case

Bilal Ahmad$compsksql = "SELECT elmSK FROM tablename"; $compsksql_RS = mysql_query($compsksql) or die (mysql_error()); while ($row_compsksql_RS = mysql_fetch_assoc($compsksql_RS)) { $elmSK = $row_compsksql_RS['elmSK']; if ($elmSK = 'K')...

0
Q: htaccess - How to rewrite all resquests to a sub directory file

Frank6I need some help to have my .htaccess to rewrite all request to a subdirectory file. I've search over stackoverflow but all examplex are to rewrite to a subdirectory only... -app -src -vendors -web -img -css -js -index.php I tought this would have done the job but it seems not : Rewri...

0
Q: Form post on same page without refreshing

Zohiab AhmadHow can i submit form on same page without refreshing page.I know that is possible with ajax but i am not perfect in ajax my native programming language PHP. HTML <input type="submit" class="topopup1" value="Preview" onclick="capture();" > <form method="POST" enctype="multipart/form-data" id...

0
Q: Select the entries that has at least one parameter different passing an array

JuanitoI've been developing a web application using zend framework 1.2, MySql and google maps to create some markers dynamically. For that I've have a table that has this structure: id lat long name ---------------------------------------------------- 1 12.4 20.5 myHotSpot...

0
Q: Regex: Replace any non-alphanumeric string except space

Chud37My Apologies, I have never gotten to grips with regex expressions. I need to remove anything (from a product name, some of them have ampersands in them) that isnt alphanumeric from a string, excluding the spaces. So far I have this (found from another stackoverflow post): $productname = preg_r...

0
Q: adding new user to mysql through php

SevarHave problem with adding new user using mysql and php. Trying to find out how to done my problem probably all day, but I didn't this. So I connect my db in connect.php <?php $db = mysql_connect("localhost","root","") or die("MySQL are not launched? Could not connect to DB"); if(!$db) { die(...

0
Q: How to randomly generate a product from Amazon to use on website

user2952906How would i go about generating a random product from Amazon which matches the budget set by the user. I'm learning to build websites and would like to challenge myself to have a field where i could enter a price and it would randomly find a product from Amazon and display all its product infor...

-2
Q: Add more functionality not working when am using it with nested fields

kapurHi i am using the following jquery to generate few fields as repeatedly as 'add more' and one of the fields has another 'add more' functionality. But it's now working.. $(document).ready(function(){ $("#addField").click( function() { $("#nameFields").append('<table width="100%" borde...

0
Q: What does a slash do to a string with a dot in php?

Kristoffer NolgrenIf $GLOBALS['filefolder'] = 13.pressrum How come $filefolder = '/'+$GLOBALS['filefolder']; echo $filefolder output 13 When $filefolder = $GLOBALS['filefolder']; echo $filfolder outputs 13.pressrum

0
Q: Stripping variable suffix off Wordpress title

S3nd41I'm trying to strip a variable suffix off my Wordpress titles, basically a bunch of hastags from posts imported from Instagram that are preceeded by an hyphen and I've come up with something like this: <?php $titleoutput = get_the_title($ID); $titleoutputstrip = preg_replace("/\-/", "", $titleou...

-1
Q: Why "Max made me put this here"

PiTheNumberEvery MediaWiki has a load.php. If called without parameters it returns: /* No modules requested. Max made me put this here */ As a curious programmer I wonder: Who is Max and why did he do this?

0
Q: Submitting radio button values without page refresh

Jim Sundqvist I'm currently having radio buttons to choose which payment the user want on the website, they can choose between (invoice, card, part payment(?)). I'm using scripting to submit the radio buttons so no button is needed, however the page reloads every time they choose a different payment option, ...

0
Q: Jquery post works while form submit does not

BinaryrespawnI am using the jquery redirect plugin found here http://www.avramovic.info/razno/jquery/redirect/ The reason is I need to call a url without using ajax in order to load up a new page. I would have simply do the ajax and append to the dom but that has other implications based on my set up. See the...

0
Q: Validate 'select option' values serverside

JorenWould it be a good idea to check serverside whether the option values submitted from html are valid? Or am I over-engineering here? HTML <select name="options"> <option value="foo">Foo</option> <option value="bar">Bar</option> <option value="baz">Baz</option> </select> PHP $allow...

0
Q: Mysql NOW() is not updating the db

AlexI've following query which updated the db table parkings to column name : latitude, longitude, parking_time and let_parked. So It's update all the column but it's not updating the parking_time column with NOW(). Do you know why ? if(isset($_POST["update"]) && $_POST["update"]==true) { if($u...

0
Q: How to get the number of likes of a facebook link post using POST_ID/OBJECT_ID

Jben Kayei have an app that process input to jpeg and then post the link of the generated image to the user's timeline. now i want to get the number of likes of each post and echo it in a with another like button(linked with the same post). how can i do that? i used 'PHP SDK' when i post the image link(i...

0
Q: function with pass by reference argument doesn't assign value

SyspectThe function: protected function _setProductStoreView(&$product) { $storeView = (string)$this->_xml->Katalognummer; if ($storeView == 'UK') { $product['_product_websites'] = 'english'; } else if ($storeView == 'SW' || $storeView == 'DE') { $product['_pro...

0
Q: htaccess subdomain rewrite all urls

Ranjith KRI have a domain test.com nad a sub domain sub.test.com. Now i need to rewrite the url sub.test.com to test.com/?state=sub and the urls like sub.test.com/content/ to test.com/content/?state=sub and sub.test.com/content/proceed/ to test.com/content/proceed/?state=sub The first url worked for th...

0
Q: how do i set a value of a multiple <select> tag from the database

Christian Burgosi am selecting an entry from the database to be edited on php/html. i can call the values of a table from the database and put it in a multiple tag. $job_exp_tags = $row[16];//value from another table $job_tags = explode(',',$job_exp_tags);//array to be put "selected" on the multiple select tag...

-3
Q: Crime rate and housing value api

user2952937I have recently came across a special project that I need to get a neighborhood's crime rate, and housing value. I am wondering has anyone ever stumble across an API that will help me with my project. I had look into trulia api, but look like they only have the crime rate, but does not contain an...

 
00:00 - 15:0015:00 - 00:00

« first day (258 days earlier)      last day (52 days later) »