39,316 Topics

Member Avatar for
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
338
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
241
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
159
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
346
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
666
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
808
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
Member Avatar for vishal_WebDev

Hello, I have Error Like this when i open the table in phpmyadmin.. why this is happening with table ? please any solution for that... #145 - Table is marked as crashed and should be repaired Thanks

Member Avatar for vishal_WebDev
0
130
Member Avatar for tibor.marias

Dear Sirs, I would like to update some information in my MySQL through a PHP syntax, but it won't work. I'll show you my code. while($info = mysql_fetch_array( $data )) { if ($info['author'] === $user_data['username']) { print '<div class="registerleft"> <form action="" method="post"> <ul> <h2>A tulaj</h2> <li> Vezeteknev<br> <input type="text" name="first_name" …

Member Avatar for pritaeas
0
157
Member Avatar for Shikha_1

<?php require("Dbconnect.php"); //echo "<table id='t1'>"; $cls=$_GET['class']; //$count=0; echo $cls; $qry ="select cls_section_id from class where Class_name='$cls' "; $result=mysql_query($qry); while($row=mysql_fetch_array($result)) { echo $row['cls_section_id']; } ?> http://localhost/ediary/school%20%20diary%20system/subjectassign.php?class=%20NURSERY-A therefore $cls has value=NURSERY-A and when i am querying it does not result anything and instead of $cls if i use 'NURSERY-A' directly then output …

Member Avatar for Shikha_1
0
103
Member Avatar for jerry717

Hello, So I have a PHP page where I can enter my name, address, phone #, etc. I have some of these fields designed to be required information. If I do not enter something in the required fields, then information I have in other fields are lost when I submit …

Member Avatar for diafol
0
279
Member Avatar for Kishore Patra
Member Avatar for Rishav_1

iam creating a question paper for students where multiple questions are there with 4 choices per question and on submit butto i want to validate the given answers from answers save in the database. i have no any idea thathow to do it can anyone tell me the solution with …

Member Avatar for ehpratah
0
141
Member Avatar for everton.retweets

Hi Everyone. A real noob question here, Sorry in advance. I have found a php function online - public function ft_xss($str, $charset = 'ISO-8859-1') { /* * Remove Null Characters * * This prevents sandwiching null characters * between ascii characters, like Java\0script. * */ $str = preg_replace('/\0+/', '', $str); …

Member Avatar for everton.retweets
0
204

The End.