39,323 Topics

Member Avatar for
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" …

Member Avatar for Lewis_1
0
265
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 …

Member Avatar for gogs85
0
337
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'])) { …

Member Avatar for Atli
0
296
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 .= ","; } …

Member Avatar for PerplexedB
0
224
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 …

Member Avatar for chrisschristou
0
370
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] => …

Member Avatar for blueguy777
0
326
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] …

Member Avatar for davecoventry
0
165
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 …

Member Avatar for LastMitch
0
187
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
340
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, …

Member Avatar for chrisschristou
0
197
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 …

Member Avatar for LastMitch
0
243
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})(/.+)?)?$ …

Member Avatar for mmcdonald
0
160
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 …

Member Avatar for pritaeas
0
153
Member Avatar for Zoe_1

Full disclosure - I'm not total novice so any help would be appreciated but simple help for dummies will be **extra** appreciated :) I'm creating a form in an html page. It needs to link up with a payment gateway and forward the entered information (I'm currently using the method="post" …

Member Avatar for Anima Templi
0
173
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] => …

Member Avatar for diafol
0
377
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 …

Member Avatar for chrisschristou
0
198
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 …

Member Avatar for cereal
0
190
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] …

Member Avatar for cereal
0
285
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 …

Member Avatar for simplypixie
0
673
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 …

Member Avatar for veedeoo
0
313
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") …

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 …

Member Avatar for ehpratah
0
136
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 …

Member Avatar for diafol
0
155
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 …

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 …

Member Avatar for cereal
0
809
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

Member Avatar for dom246
0
304
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 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.

Member Avatar for anestistsoukalis
0
178
Member Avatar for blueguy777

my actual code is: $agent_id=mysql_real_escape_string($_GET['memberid']); $result = mysql_query("SELECT id,ac_no,agent_name FROM ankali_slabpay WHERE agent_id=$agent_id ORDER BY id DESC LIMIT 1"); $row = mysql_fetch_array($result); $ac_number=$row['ac_no']; $agent_name=$row['agent_name']; ?> <?php $b = array(000350,000400,000450); //pre-defined installment amount values $replacement = "000000"; $cust_mast = '$C21'; $bank_name = 'KISAN SWARAJ'; $dfile = "READ ME CUSTOMERS.txt"; $fo = …

Member Avatar for blueguy777
0
126
Member Avatar for game4tress

When I insert data into the database, for instance, a new client, and after that query the clients in the database, the new client is not immediately shown in the list. For it to be listed, I have to clear the cookies and log in, again, into the site. Why …

Member Avatar for ehpratah
0
214

The End.