52,566 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for lilwizz770

I have a table applicants and one of the columns is age, i want to be able to calculate the age range, frequency and variation. Is there a way this can be achieved?

Web Development php
Member Avatar for diafol
0
198
Member Avatar for gahhon

i am using ASP.NET and i am able to detect the close the tab where's the `<body onunload="xxx">` but i don't know inside the xxx method how to window.open to another page with new window.

Web Development javascript
Member Avatar for JorgeM
0
413
Member Avatar for alpay.can.984

We have this code, thanks to a helpful person but it does not fully work as expected. The problem is that it currently checks for an exact match of dates, but there are situations of times that overlap one another and that should show a conflict too (background becomes red …

Web Development engineering javascript
Member Avatar for stbuchok
0
164
Member Avatar for gahhon

As i doing research i know most of them are suggesting use `<body onbeforeunload="beforeUnload" onunload="unload">` But i trying to do some sample, is this can't work it. Could you guys provide a simplest example to me ? In fact, i gonna to delete the `Cookies` value whenever they are trying …

Web Development asp.net
Member Avatar for gahhon
0
225
Member Avatar for chrisschristou

hello friend, i ust need your help when i insert in database i go to page of my choice on local alla work fine but on server it don't work when i insert a data the page just refresh, this is the code please help me friend ("INSERT INTO commande …

Web Development php
Member Avatar for chrisschristou
0
487
Member Avatar for websponge

Hi, I use a query which is identical throughtout my application, only thing that differs is the select part of the query, so for example: mysql_select_db("mydatabase", $con); $result4 = mysql_query("SELECT * FROM nap where Exchange LIKE '$majorvalue%'"); while($row = mysql_fetch_array($result4)) { $psba = $row['Site']; $status = $row['Status']; $spectrum = $row['InSpectrum']; …

Web Development mysql php
Member Avatar for Atli
0
149
Member Avatar for blueguy777

how to update table in foreach loop with where clause my code: foreach($output as $var) { $tmp = explode(",", $var); $collec_date = $tmp[2]; $cust_id = $tmp[4]; $cust_name = $tmp[5]; $install_no = $tmp[6]; $amount = $tmp[7]; $sql = "UPDATE ankali_slabpay SET install_date='$collec_date', install_amt='$amount' WHERE ac_no='$cust_id' AND install_no='$install_no' AND $install_amt='000000' GROUP BY …

Web Development php
Member Avatar for Atli
0
3K
Member Avatar for Tko_1

What im tryig to do is add one line of code to all files at once Can this even be done ? I have tried reading all files in a directory then fopen to fwrite without any success. Any ideas ? Thank you

Web Development php
Member Avatar for Tko_1
0
203
Member Avatar for garyjohnson

I want to remove all enters from an input and replace them with a single space. By that I mean something as </br>. So if someone places the input like this Hello, my name is bob. How are you? It will look like this, Hello, my name is bob. How …

Web Development php
Member Avatar for buzzfire
0
171
Member Avatar for brandon66

User fills out certain values in a form and hits the submit button. The values the user filled out will be submitted to the database. The user needs to come back to that form and be able to update the values he did not enter the first time. How would …

Web Development html-css php
Member Avatar for brandon66
0
198
Member Avatar for Lewis_1

Hello. I've created 2 pages that i'm currently working on. One is called; Test.php -- which just includes a basic form in HTML. <Form name ="form1" Method ="POST" Action ="result.php"> Building Name: <INPUT TYPE = "TEXT" Name ="buildingName"> Room Number: <INPUT TYPE = "TEXT" Name ="roomId"> <INPUT TYPE = "Submit" …

Web Development mysql php sql
Member Avatar for Lewis_1
0
271
Member Avatar for gogs85

I need help for my code when i login successfly i have error this is my code: <?php session_start(); $host="localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="portfolio_baza"; // Database name $tbl_name="skole_login"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot …

Web Development php
Member Avatar for gogs85
0
340
Member Avatar for kshahnazari

I'm working with openid library and one thing has been bodering me. <?php # Logging in with Google accounts requires setting special identity, so this example shows how to do it. require 'openid.php'; try { # Change 'localhost' to your domain name. $openid = new LightOpenID('localhost'); if(!$openid->mode) { if(isset($_GET['login'])) { …

Web Development php
Member Avatar for Atli
0
299
Member Avatar for PerplexedB

Please consider the following class : <?php class p0110dbinsertbuilder { public $table=""; private $fields ; public function add($Field,$Value){ $this->fields = array($Field,$Value); } public function insertstring(){ $count = count($this->fields,0); $c = "INSERT INTO " . $this->table . "("; for ($i=0;$i<$count;$i++){ $c .= $this->fields[$i][0]; if ($i <> $count-1){ $c .= ","; } …

Web Development php
Member Avatar for PerplexedB
0
228
Member Avatar for gahhon

Assume i have 3 buttons `button1, button2, button3` And each of them are firing the same method `onClick="Redirect"` ## PROBLEM ## How can i able to redirect them different pages by checking whether which button is clicked `button1.click; redirect(page1)`, `button2.click; redirect(page2)`, `button3.click; redirect(page)` how can i do this instead of …

Web Development asp.net
Member Avatar for gahhon
0
145
Member Avatar for chrisschristou

hello dear Friends i just discover this forum i don't know more about how it work here, i need help to complete my website i created a shopping cart with php in dreamweaver with generated code all work fine customer can add product to cart and edit quantity , see …

Web Development php session
Member Avatar for chrisschristou
0
372
Member Avatar for blueguy777

$a = array(000,400,000,500); $b = array(300,400,450,500); $i=0; foreach($b as $k=>$v) { if($v==$a[$i]) { $b[$k]='000'; } $i++; } print_r($b); i want same thing in two dimensional array $a = Array ( [0] => Array ( [0] => 000000 [1] => 000400 [2] => 000450 ) [1] => Array ( [0] => …

Web Development php
Member Avatar for blueguy777
0
328
Member Avatar for davecoventry

I have two lists which I have sorted with asort(). $weightings = Array([7] => 1,[3] => 2,[1] => 10,[2] => 10,[10] => 10,[6] => 10,[4] => 15,[5] => 15,[8] => 20,[9] => 20); $revised_date = Array([1] => 1378652385,[2] => 1378654024,[3] => 1378654113,[4] => 1378654151,[5] => 1378654201,[6] => 1378654239,[7] => 1378654273,[8] …

Web Development php
Member Avatar for davecoventry
0
167
Member Avatar for orange88

QUESTION: My need is to include a specific datepicker for EACH form when a specific button is clicked. Im not sure whether what im doing below in the jquery portion of the code for the datepicker is correct? Can someone please guide me with this? Thanks DETAILS: I am currently …

Member Avatar for LastMitch
0
769
Member Avatar for PF2G

Hi, i want to login with facebook and go back 1 page - window.history.back() - but only when error=1 (login.php?erro=1): This is the process_facebook.php: if($UserCount[0]){ //User is now connected, log him in login_user(true,$me['first_name'].' '.$me['last_name']); echo $_GET['erro']; /*if(isset($_GET['erro'])){ echo "<script>window.history.back();</script>"; }*/ } else{ // Insert user into Database. @mysql_query("INSERT INTO users …

Web Development php
Member Avatar for LastMitch
0
188
Member Avatar for woodenduck

How can I prevent a XSS attack but allow user to post iframe and img? My page is php based but I allow users to submit text and have allowed only iframes and imgs with strip_tag How do I prevent a user from launching an xss attack?

Member Avatar for woodenduck
0
350
Member Avatar for gahhon

protected void SetDestinationURL(object sender, EventArgs e) { if (loginMember()) Response.Redirect("~/Member/Home.aspx?Username=" + txtUsername.Text); else if (loginManager()) Response.Redirect("~/Manager/Home.aspx?Username=" + txtUsername.Text); else Alert.Show("Unauthorized User Access"); } protected Boolean loginMember() { SqlConnection conLogin = new SqlConnection(ConfigurationManager.ConnectionStrings["connMSJ"].ConnectionString); SqlCommand cmdLogin = new SqlCommand("SELECT Username, Password FROM Member WHERE (Username=@ID AND Password=@Pass)", conLogin); conLogin.Open(); cmdLogin.Parameters.AddWithValue("@ID", txtUsername.Text); cmdLogin.Parameters.AddWithValue("@Pass", …

Web Development asp.net
Member Avatar for gahhon
0
184
Member Avatar for Singlem

I have been trying to get a single model, with multiple partail views that use that model to sumbit the form correctly. @Html.Partial("_EmployerDetails", Model) <br /> @Html.Partial("_OutcomeControl", Model) When I submit the form only the firt PatailView model is posted. The second partailview values is null. I need to modulize …

Web Development asp.net software-architecture
Member Avatar for LastMitch
0
166
Member Avatar for chrisschristou

hello everybody i buil my dynamic site in dreamweaver cs6 but i'm not abble to formate the nember i want format number to decimal number like float in phpmyadmin this is how i do and it don't work please help thank. <label for="shipping">Sub total</label><input name="subtotal2" type="text"id="subtotal2" value="<?php echo $row_total[ number_format, …

Web Development php
Member Avatar for chrisschristou
0
200
Member Avatar for saadi06

Hi, I am using jquery tabs for displaying data.And while displaying the data in the tabs I have to use ajax again to display data. The data in the first tab is giving the desired result. But when I click on the second tab. The tab is loaded correctly. But …

Web Development javascript javascript-jquery php
Member Avatar for LastMitch
0
247
Member Avatar for gahhon

**Hashing Method** // If the two SHA1 hashes are the same, returns true. // Otherwise returns false. private static bool MatchSHA1(byte[] p1, byte[] p2) { bool result = true; if (p1 != null && p2 != null) if (p1.Length == p2.Length) for (int i = 0; i < p1.Length; i++) …

Web Development asp.net mysql storage
Member Avatar for gahhon
0
180
Member Avatar for gahhon

I have a textbox which letting user to enter their password. My password format is 1. Starting at least 1 non-alphanumeric 2. Continue with alphanumeric 3. Length: 7 and above. What should i put in the validate expression? <asp:RegularExpressionValidator ID="RegExpPass" runat="server" ErrorMessage="Password Length at Least 7 With Special Character" ControlToValidate="txtPass" …

Web Development asp.net
Member Avatar for gahhon
0
200
Member Avatar for castajiz_2

I was wondering if I could develop a comment section where people would post comments without using php or asp. The only thing that i would like to use ih javascript, html, css, ajax and things like that. Is this achievable without the usage of php or asp?

Web Development html-css javascript
Member Avatar for JorgeM
0
72
Member Avatar for everton.retweets

Hi everyone, I have a website that gives me the following url when viewing a users profile. website.com/index.php?a=profile&u=username I am trying to create a htaccess rule that will generate a friendly url like website.com/username The existing htaccess file is RewriteEngine on RewriteCond %{request_filename} -f RewriteRule ^(.*) $1 [L] RewriteRule ^([a-z]+)(/([^/]{0,32})(/.+)?)?$ …

Web Development php
Member Avatar for mmcdonald
0
162
Member Avatar for PerplexedB

Please consider my "execute" method of my db class. When I pass it a bad sql, it does not thow the PDOException, just returns $return === false and does not do anything in the db. What am I missing? public function execute($sql){ if (!$this->connection){ try{ $conn = new pdo(self::$dbName ,self::$user …

Web Development php
Member Avatar for pritaeas
0
155
Member Avatar for gahhon

Assume i have a table `field1, field2, field3` and i have radio button list that displaying `field1, field2, field3` If the end-user selected `field2` and inserting a value into `field2` How can i do? Any Tricks? Thanks for in advance.

Web Development asp.net sql
Member Avatar for mmcdonald
0
123
Member Avatar for blueguy777

i am getting array output as: Array ( [0] => Array ( [0] => 000000 [1] => 000400 [2] => 000450 ) ) Array ( [0] => Array ( [0] => 000350 [1] => 000400 ) ) i want output like this: Array ( [0] => Array ( [0] => …

Web Development php
Member Avatar for diafol
0
404
Member Avatar for chrisschristou

hello Dear friend of Daniweb i'm new in this site i just discovered yesterday, i find here fine. i create my website in Dreamweaver i created shopping cart and on local server in wamp it work fine but when i upluad on my hosting server i get this error: <?php …

Web Development php
Member Avatar for chrisschristou
0
201
Member Avatar for prashant.tiwari.737

Hi, I want to import only zip codes (inside csv) into one of table inside mysql database. All zip codes are in a csv file. When I run PHP code it works only with first zip code. Can somebody please help me on this where I am doing mistake. Here …

Web Development php
Member Avatar for cereal
0
198
Member Avatar for cgull

Hello, I have an array that I need to sort by keys. The array looks like this: Array ( [0] => Array ( [question_title] => Question 8 [question_description] => [type_id] => 1 [type_title] => Yes/No [question_number] => 8 ) [1] => Array ( [question_title] => Question 9 [question_description] => [type_id] …

Web Development php
Member Avatar for cereal
0
290
Member Avatar for robin.aditta1

I am getting following error when trying to click the next or previous button on following site: http://bdworld.co/newest.php?categoryId=35 > Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/69/9332569/html/imagewar/newest.php on line 30 Newest Pictures! ( Others ) SQL query failed. Check your query. Error Returned: You have an …

Web Development php sql
Member Avatar for simplypixie
0
688
Member Avatar for Brandon_4

So I am trying to write to an xml file. When I do it, NO SYNTAX comes up! BUT, When I go to the xml file it's supposed to write to it looks untouched and none of the data is there. here is my PHP code: <?php $xmldoc = new …

Web Development php xml
Member Avatar for veedeoo
0
322
Member Avatar for J

Design a form for students to enter the grades (A, B, C, D, or F) of five classes (I will enter class names in designated areas); use textboxes. After hitting the “Calculate” button, the result (average) with a message should be displayed right underneath the form. If the average is …

Web Development javascript
Member Avatar for <M/>
0
94
Member Avatar for gogs85

This is my links in website: mywebsite.com/index.php?id_1=main&id_2=kontakt mywebsite.com/index.php?id_1=main&id_2=onama How to remove from url that be like this mywebsite.com/index.php/onama mywebsite.com/index.php/kontakt This is my index.php and in template pocetna.php <li><a href="index.php?id_1=main&id_2=kontakt">КОНТАКТ</a></li> <li><a href="index.php?id_1=main&id_2=onama">О НАМА</a></li> <?php session_start(); require_once("configuration.php"); require_once("functions.php"); require_once("session_load.php"); //require_once("connection.php"); $url_id = get_url_value(); // ucitavanje pocetne strane, homepage if (($url_id['grupa'] == "0") …

Web Development php
Member Avatar for veedeoo
0
4K
Member Avatar for iamthwee

So I always wondered this, probably a bit dense. Let's say I've got a url string http://somelink.php?id=7 And that takes the user to another page which gives them access to something private. But what is to stop the user replacing the 7 with say an 8 (manually editing the url …

Web Development php session
Member Avatar for ehpratah
0
140
Member Avatar for blueguy777

table slabpay ------------------------------------------------------- agent_id|agent_name|cust_id|cust_name|installment_amt| ------------------------------------------------------- 1 |mike |1 |john |350 | ------------------------------------------------------- 1 |mike |1 |john |400 | ------------------------------------------------------ 1 |mike |2 |abraham |350 | ------------------------------------------------------- 1 |mike |1 |john |450 | ------------------------------------------------------- 1 |mike |2 |abraham |400 | ------------------------------------------------------- mysql query ------------------------------------------------------ `$select = mysql_query("SELECT cust_id, cust_name,installment_amt FROM slabpay …

Web Development display php seo
Member Avatar for diafol
0
159
Member Avatar for Paul_17

Hi Guys, Completely new to PHP! Just wanted to play around with Fields and submit stuff to a database on localhost through xampp. This code writes to the database no problem, except no insert is happening with 'Telephone' and it throws this error; Notice: Undefined index: Telephone in C:\xampp\htdocs\Inputs\update.php on …

Web Development html-css php sql
Member Avatar for Paul_17
0
2K
Member Avatar for iamthwee

So guys I have a vanilla install of code igniter and the thing returns a internal server error 500. This is only on my linux box. It works in windows xp on a virtual machine but I'd love to have it work on my linux box. So what do you …

Web Development php
Member Avatar for cereal
0
812
Member Avatar for aish1108

Any recommendations for implementing caching in ASP Classic. Server is Windows 2008 with IIS 7.5

Web Development asp caching
Member Avatar for dom246
0
477
Member Avatar for rpv_sen

Hi I need an help on showing related post in an website. i want to display my related posts with help of keywords column. Below is my database structure id int(12) title varchar(250) content varchar(250) image_path varchar(250) type varchar(250) keywords varchar(250) can any one please help me. Thanks

Web Development mysql php
Member Avatar for dom246
0
306
Member Avatar for gahhon

protected void Page_Load(object sender, EventArgs e) { int count = 0; string[] categories = new string[100]; double[] yValues = new double[100]; SqlConnection conBudget = new SqlConnection(ConfigurationManager.ConnectionStrings["connMSJ"].ConnectionString); SqlCommand cmdCount = new SqlCommand("SELECT COUNT(*) AS COUNT FROM DailyBudget WHERE (Username=@username)", conBudget); SqlCommand cmdBudget = new SqlCommand("SELECT Foods, Clothes, Drinks, Entertaiment FROM DailyBudget …

Web Development asp.net
Member Avatar for gahhon
0
1K
Member Avatar for dannybarh

Hi all, am trying to use bootstrap switch in my form. Am at a lost as to how to get the value of name="onoffswitch" from that field and insert it into mysql db, here is my code... div class="onoffswitch"> <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked> <label class="onoffswitch-label" for="myonoffswitch"> <div class="onoffswitch-inner"></div> …

Member Avatar for dannybarh
0
3K
Member Avatar for gahhon

protected double[] getValues(int ColumnCount) { double[] value = new double[ColumnCount]; SqlConnection conGetValue = new SqlConnection(ConfigurationManager.ConnectionStrings["connMSJ"].ConnectionString); SqlCommand cmdGetValue = new SqlCommand("(SELECT * FROM DailyBudget WHERE (Username=@username)) EXCEPT (SELECT Username FROM DailyBudget WHERE Username=@username)", conGetValue); cmdGetValue.Parameters.AddWithValue("@username", Master.getUsername); conGetValue.Open(); SqlDataReader dtrGetValue = cmdGetValue.ExecuteReader(); try { int i = 0; while (dtrGetValue.Read()) { value[i] …

Web Development asp.net
Member Avatar for gahhon
0
234
Member Avatar for gahhon

protected void AddTransaction(object sender, EventArgs e) { SqlConnection conAddTransaction = new SqlConnection(ConfigurationManager.ConnectionStrings["connMSJ"].ConnectionString); SqlCommand cmdAddTransaction = new SqlCommand("UPDATE DailyBudget SET @category=@amount WHERE Username=@username", conAddTransaction); cmdAddTransaction.Parameters.AddWithValue("@category", "Foods"); cmdAddTransaction.Parameters.AddWithValue("@amount", Convert.ToDouble("200")); cmdAddTransaction.Parameters.AddWithValue("@username", "mhingshiang"); conAddTransaction.Open(); cmdAddTransaction.ExecuteNonQuery(); conAddTransaction.Close(); } The `Foods` is one of the column name in `DailyBudget` table. But it can't update to the …

Web Development asp.net
Member Avatar for gahhon
0
159
Member Avatar for anestistsoukalis

I want to do what i describe on the title using php. Is it possible ? And how ? Something like this for example: http://www.pestaola.gr/ you can realize that there are pictures on menu bar. Thanks in advance.

Web Development image php
Member Avatar for anestistsoukalis
0
179

The End.