52,566 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for riahc3

Im trying to set a session variable using AJAX but it doesnt seem to work: This is my PHTML page: <?php session_start(); ?> //SOME CODE <script type="text/javascript"> $j(document).ready(function() { var variablecalle=$j("#listadetiendas").val(); var data = 'calle='+variablecalle; $j.ajax({ url: '../../updatesession.php', type: 'POST', data: data }) }); Then this is my "updatesession.php" page: …

Web Development javascript session
Member Avatar for riahc3
0
12K
Member Avatar for techyworld

Hi can someone help? I'm creating a 2 dimensional Array with a table but its not displaying anything. why this? var totalRows = new Array(10); function drawTable() { var div1 = document.getElementById('div1'); var tbl = document.createElement("table"); // creating rows for (var i = 0; i < totalRows.length; i++) { var …

Web Development javascript
Member Avatar for techyworld
0
478
Member Avatar for Motifaithed

Good Day, Can anyone help me how to delete duplicate record in a dropdown list? I have a database with the column "material type" and "material model". For every material type there are a lot of model, so everytime I add record to the database, the column material type will …

Web Development php
Member Avatar for Motifaithed
0
1K
Member Avatar for davy_yg

<td>Jumlah :</td> <td><input type="text" size="12" maxlength="22" name="Jumlah" value="2 box 1 pack"></td><br> <tr> <?php // use date picker to automate date ?> <td>Tanggal :</td> <td><input type="date" id="datepicker" size="12" maxlength="22" name="Tanggal" value=""></td><br> </tr> <?php if (isset($_POST['submit'])){ mysql_query("INSERT INTO Stock (Produk,Jumlah,Tanggal) VALUES ('$_POST[batch]','$_POST[Jumlah]','$_POST[Tanggal]')"); echo "<script type=\"text/javascript\"> window.location = \"print.php\"; </script>"; } ?> </table> …

Web Development php
Member Avatar for TonyG_cyprus
0
127
Member Avatar for Julia25

I found a script but i cant make it to work to detect ie 9. need some assistance! http://www.devslide.com/labs/browser-detection

Web Development javascript
Member Avatar for Julia25
0
206
Member Avatar for vishalonne

Hi Every Body How I can add leading zeros in a number for example if No. is 4 it should display 0004 if No. is 41 it should display 0041 if No. is 441 it should display 0441 Please give some hint.

Web Development display php
Member Avatar for diafol
0
182
Member Avatar for GlenRogers

I,m going through a tutorial for pagination using php mysql and ajax. I'm getting this error Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\phpAjaxPagination\pageData.php on line 16 This is the file. <?php include_once('inc/dbConnect.inc.php'); include_once('inc/pagination.inc.php'); if(isset($_POST['pageId']) && !empty($_POST['pageId'])){ $id=$_POST['pageId']; }else{ $id='0'; } $pageLimit=PAGE_PER_NO*$id; $query="SELECT post,link from pagination …

Web Development php
Member Avatar for diafol
0
162
Member Avatar for ebc3142

I'm trying to use this code to populate my drop down menu from a mysql table: <select name="fileselect"> <?php $pdo = new PDO('mysql:host=localhost;dbname=contisec_portal', 'root', ''); $stmt = $pdo->prepare("SELECT dateid FROM date_header"); $stmt = $pdo->execute(); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { echo "<option value='" . $row['dateid'] . "'>" . $row['dateid'] . "</option>"; …

Web Development html-css mysql php
Member Avatar for diafol
0
7K
Member Avatar for bradly.spicer

Hey all, Just some questions regarding queries and the logic behind what I'm trying to achieve. So basically, I have these rows of information inside a MSQL table called Customers. The columns are as follow: id customer_name customer_name_letterhead customer_notes systype status signaltype verification address postcode telephone mobile mobiletwo email mainarea …

Web Development php
Member Avatar for Squidge
0
130
Member Avatar for dashawk

Hi guys, I have a php code that displays a list of dishes where a user can check on those dishes and then save the selection to the database. My code works find when selecting and saving the data. But the problem is that when I try to uncheck one …

Web Development mysql php
Member Avatar for dashawk
0
281
Member Avatar for soapyillusion

Hi all, Im trying to get some data from an Ajax callback and use it in another function (from a php file). I was just wondering if there was a way to pass data returned from the callback to another function. I could just do the function at success but, …

Web Development javascript
Member Avatar for soapyillusion
0
129
Member Avatar for techyworld

hi how can i implement a timer (minute-second-millisecond) using simple javascript? It will increment when click on a button.

Web Development javascript
Member Avatar for techyworld
0
110
Member Avatar for joshmac

I am using a framework, and I am having an issue with getting the results of this particular associative array. All others work except for this one and I am not sure why. This one only returns one result. Here is what I have in my model: public function listStats($id) …

Web Development mysql php
Member Avatar for joshmac
0
229
Member Avatar for joshl_1995

Hello Community, I was wondering if there is a way to delete a folder and everything in the folder in ftp.

Web Development php
Member Avatar for cereal
0
388
Member Avatar for developer707

Hello to everyone, I want to direct foreign visitors of my site in one directory, this based on their IP. My site structure is: index.php(file) |->foreign(directory) I think that this can be done with .htaccess, but I don't know how Can someone gives me an example how to do this?

Web Development apache php
Member Avatar for cereal
0
407
Member Avatar for brenton_77

Hi All, I've hit a brick wall trying to get the jquery autocomplete to work correctly. The problem is with the .php file and the way the While loop works, as what it does is create a array for every name rather than one single array. I've tried to move …

Web Development javascript-jquery json php
Member Avatar for brenton_77
0
334
Member Avatar for FakeTales

basically i am using xpath for a search query, the results display like this Array ( [0] => SimpleXMLElement Object ( [TITLE] => Empire Burlesque [ARTIST] => Bob Dylan [COUNTRY] => USA [COMPANY] => Columbia [PRICE] => 10.90 [YEAR] => 1985 ) [1] => SimpleXMLElement Object ( [TITLE] => Greatest …

Web Development html-css php
Member Avatar for FakeTales
0
205
Member Avatar for GraficRegret

is it posible to pass information held inside a MySQL database into a javascript array using PHP code? something like: $sql = mysql_query("SELECT * FROM uploads WHERE ref_id = '$refID'"); //javascript below var array = new Array() while(<?php echo $row = mysql_fetch_array($sql)?>) { array.push(<?php echo $row['name']; ?>) } or am …

Web Development javascript mysql php
Member Avatar for diafol
0
317
Member Avatar for GlenRogers

Hi. I have a php file with image links(mysql data) in one div, when a link is clicked the product_id is sent to another php file that builds the html to display all images(in another mysql table) with that product_id in another div. Someone else helped me out withsome ajax …

Member Avatar for soapyillusion
0
157
Member Avatar for biswa2ray

I want to add and delete 3nos of text field and label in a row dynamically using Add and delete button in javascript. Is any one help me in this regard...

Web Development javascript
Member Avatar for gon1387
0
346
Member Avatar for GraficRegret

is there any way to pass a variable from php into a variable in javascript? or do I need to revert to AJAX to get this done?

Web Development javascript php
Member Avatar for diafol
0
3K
Member Avatar for jtok

Sorry for everything being marked as code. It wouldn't let me post it unless I did (and, yes, I did try using the Inline Code option as you can see by the single quotes around much of what is written here). I have a page with an updatepanel that contains …

Member Avatar for jtok
0
809
Member Avatar for nunuaziz_

Been getting PHP Fatal error: Cannot redeclare class Facebook error since... Can anyone please enlighten what does this means?

Web Development api php
Member Avatar for veedeoo
0
207
Member Avatar for ebanbury

Hi I have the following email script, which is working fine except none of the carriage returns work and the entire message from all the fields just goes in one line without any spaces. I've tried to look up carriage returns and didn't find anything different from \r\n Any help …

Web Development php
Member Avatar for ebanbury
0
99
Member Avatar for techyworld

Hello people, I need an idea with u. I need to draw a grid 10 by 10 and then randomnly fill it with numbers, operators + - and =. then user will need to swap number or operator or equal sign to make matches like this 2+3 = 5. It …

Web Development javascript
Member Avatar for Taywin
0
154
Member Avatar for Tinnin

Hi all, I am trying to create an excel file in PHP which I then want to send as an attachment via the mail() function. I am able to create the excel file using the following code: function setHeader($excel_file_name)//this function used to set the header variable { header("Content-type: application/octet-stream");//A MIME …

Member Avatar for Tinnin
0
6K
Member Avatar for tsp003

Hi Guys, I've been searching the internet over this one for days now and am even more confused, so I hope you can point me in the right direction. I am basically trying to create a 3 tier cascading dropdown based on country/city/states. I'm using the following code to create …

Web Development javascript
Member Avatar for tsp003
0
231
Member Avatar for joshl_1995

Hello Community, I was wondering if there is a way to goto the direct link of a file (eg. http://example.com/files/test.txt) and for it to download insted of loading and displaying the file. I want to do this for every file in the "files" folder and only that folder.

Web Development display file-system php
Member Avatar for joshl_1995
0
208
Member Avatar for OsaMasw

Yesterday when I was working on php script I noticed that categories and subcategories works seperatly if I clicked on main category its show all articles under this main category and nothing imported from subcategories, now am working on somthing like this, so what should I do to avoid this …

Web Development php sql
Member Avatar for OsaMasw
0
2K
Member Avatar for Farhad.idrees

HI i have many forms in my application.. when some one see any form so i want to show form as "Only readable form" means i want to use disable form.. when someone click edit button so my form should enable for editing.. how to do it? can anyone help …

Web Development javascript
Member Avatar for code739
0
145
Member Avatar for arcana55

Hi! I have the following table: <table> <tr> <th>Cost</th> <th>Quantity</th> <th>Sum</th> </tr> <tr class="txtMult"> <td class="val1">1</td> <td><input class="val2" type="text" name="txt/>"</td> <td><span class="sum">0</span> </tr> <tr class="txtMult"> <td class="val1">2</td> <td><input class="val2" type="text" name="txt/>"</td> <td><span class="sum">0</span> </tr> </table> What i want to do is to multiple row by row cells: val1*val2. I found …

Web Development javascript
Member Avatar for Bachu
0
208
Member Avatar for davy_yg

Stock Recording System - I basically wants to see the data recorded in the table sql. yet this is not the case. mysql_query("INSERT INTO Produk FROM stock VALUES ('Produk')"); mysql_query("INSERT INTO Jumlah FROM stock VALUES ('Jumlah')"); mysql_query("INSERT INTO Tanggal_Masuk FROM stock VALUES ('Tanggal_Masuk')"); Is that instruction not enough to record …

Web Development php
Member Avatar for TonyG_cyprus
0
171
Member Avatar for nunuaziz_

I've been trying to send email using php. But I've been getting this error since... **PHP Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\www\IT3126Prac\Reservation\insertReserve.php on line 36** I know I have to configure something …

Web Development email php
Member Avatar for veedeoo
0
953
Member Avatar for GraficRegret

here is the slideshow styles, <style> body {font-family:Arial, Helvetica, sans-serif; font-size:12px;} .fadein { position:relative; height:361px; width:640px; margin:0 auto; background: #000; padding: 0px; } .fadein img { position:absolute; left:0px; top:0px; } </style> here is the javascript <script type="text/javascript"> $(function(){ $('.fadein img:gt(0)').hide(); setInterval(function(){$('.fadein :first-child').fadeOut().next('img').fadeIn().end().appendTo('.fadein');}, 5000); }); </script> and here are the phps …

Web Development javascript
0
84
Member Avatar for ambitiouskriss

Is anyone running Ruby on Rails on an Imac G4 or G5? Im on a tight budget right now and dont wanna spend more than I have to. Are either of these models working for anyone? If youre not using them, could I still use either one of these models?

Web Development ruby
Member Avatar for Taywin
0
209
Member Avatar for vizz

I need to create chart for log Database fields are, *** host * pageurl * VisitPage * VisitorIP * VisitDate * VisitorTimeZone * VisitTime * browser * operatingsystem * referer** I need chart for **Toatl Visits, Uniquie Visits, Impressions, Online Users, Pageviews, %New Visits, % Uniquie Visits, %New Visitor, %Returning …

Web Development apple chrome-os os-x php
Member Avatar for broj1
0
169
Member Avatar for Farhad.idrees

HI Guys... I have jquery list menu box of sliding.. i want o use scroll bar..i have imported requrired files but when i import jqxpanel file so nothing show.. when i block jqxpanel file so lisemenubox shows but without scrollbar..i have also enable true scroll bar but its not showing.. …

Web Development javascript javascript-jquery
Member Avatar for Farhad.idrees
0
235
Member Avatar for mrhankey

hi, i have been struggling to find a good autocomplete script with mysql backend. i now have an easy to use one and all is working, however in my page after the search has been typed and user selected instead of the users name appearing in the search box i …

Web Development javascript javascript-jquery
Member Avatar for mrhankey
0
131
Member Avatar for personalisedpen

hi guys, please post here some php tips, i need some help in php, thanks

Web Development php
Member Avatar for Draconyster
0
344
Member Avatar for aarya

$url=$_POST['url']; $ip = gethostbyname($url); $long1 = ip2long($ip) if ($long1 == -1 || $long1 == FALSE) { echo 'Invalid IP, please try again'; } else { print $url; echo $ip ?> bu this code i get ip address but i need the country name aslo with this ip address. is thers …

Web Development php
Member Avatar for kavinesh
0
1K
Member Avatar for brianbabu

Hi, can someone explain me the entire working of jquery.filedrop.js? I have used the filedrop for a project but i am interested in knowing it fully in detail so that i could improve its functionality and modify the code according the reqiurements i get from my client. Thanks.

Web Development javascript javascript-jquery
Member Avatar for Taywin
0
173
Member Avatar for darren.ang.5264

hi, i am a newbie to ajax. i have created 2 html file in the following :- <<< a.html >>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=big5" /> <title>Admin Page</title> <script> function loadURL(cDiv, cURL, cGetPost, cParam) { var xmlhttp; if (window.XMLHttpRequest) {// …

Web Development javascript
Member Avatar for Taywin
0
164
Member Avatar for satyavinayak

i am developing a online chat application, for that i have a server with static ip. i want to give only small javascript to include in client website. here my requirement is obtain ip address and the location of the user of the website. websites my in in any language …

Web Development php
Member Avatar for bops
0
395
Member Avatar for sainigks

hello, i want to make a script in php that identify the pc. actually i want to make a script like antivirus software which can only install at one pc. if we want to install it on other pc it cant. and also if we install it on same pc …

Web Development php
Member Avatar for pritaeas
0
554
Member Avatar for s0wh4t

Hi. Well, i'm trying to add new data to mysql, <input type="text" name="name"/> example: Billy Boy when I check mysql table, it shows "BillyBoy" How do I fix that error? Thank you.

Web Development first-post mysql php
Member Avatar for s0wh4t
0
230
Member Avatar for garyjohnson

I have javascript code with displays the placeholder attributes on browsers which dont support HTML5, I am testing the code in IE. It works on every field which is type text. But when its type"password" it displays the placeholder as a password and not text. I need to it show …

Web Development java-jsp javascript
Member Avatar for LastMitch
0
882
Member Avatar for DeepAnalyzer

Hi, I'm new to ASP.NET MVC framework.Previously i was worked with ASP.Net forms.Now the issue is i want to implement a login page.I have already done the other stuff.I want to know where to add "FormAuthenticationTicket class"? I'm using MVC3 and .Net framework 4.

Web Development asp.net
Member Avatar for LastMitch
0
130
Member Avatar for divyakrishnan

Hi... I am using xampp-win32-1.7.3.I want to use Adodb.I had seen that adodb is included on xampp package(xampp/php/pear/adodb).I had used the following code to retrieve data from mysql database. [CODE]<?php include("adodb.inc.php"); $db = NewADOConnection('mysql'); $db->Connect("localhost", "root", "", "emp"); $result = $db->Execute("SELECT * FROM employ"); if ($result === false) die("failed"); while …

Web Development file-stream php
Member Avatar for son.anh.963
0
3K
Member Avatar for Farhad.idrees

here is one form element. <input value="-7" class="validate[required,custom[integer],min[5]] text-input" type="text" name="min" id="min" /> here is one more problem.. i wanto use my javascript varible value in above class "validate[required,custom[integer],min[5]]" here like use dynamic number where 5 is using how to do it? Regards..

Web Development javascript
Member Avatar for Taywin
0
181
Member Avatar for bradly.spicer

Hey guys, got a system here which I'l try and explain in lame mans terms. Search > Customer page > Edit Customer. The problem I am having is that it is not letting me carry that ID over. E.g, I put John smith in, I get the customer Page which …

Web Development php
Member Avatar for bradly.spicer
0
158

The End.