39,393 Topics

Member Avatar for
Member Avatar for foxwizzy

<?php require_once("./Connections/root.php"); mysql_select_db($database_root, $root); include 'p_settings.php'; session_start(); $user = $_SESSION['MM_Username']; $q = mysql_query("SELECT id FROM performer WHERE username='$user' LIMIT 1") or die("Error : " . mysql_error()); $r = mysql_fetch_assoc($q); $id = $r['id']; ?> You can set three countries as banned." <br> Please choose from the following countries: <?php $query = …

Member Avatar for broj1
0
170
Member Avatar for vinson89

<?php require_once('recaptchalib.php'); $privatekey = "your_private_key"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp->error . ")"); } else { $username = $_POST['username']; …

Member Avatar for gabrielcastillo
0
207
Member Avatar for Nimerion

Hello guys and girls.. I have a problem with the media wiki endgine.. I want to create user groups via the UI, but these groups and permissions are static. (By static I mean that they are written in a php file that puts them into an array.) The php file …

Member Avatar for Nimerion
0
247
Member Avatar for dany12

I am still learning Laravel 4 so I have a resourceful controller tasks and I am having a problem implementing my jquery. My delete works fine without jquery so i think that I am not providing the proper url I have found one problem I don't know how to pass …

Member Avatar for cereal
0
378
Member Avatar for mastermind2

Hi Friends Please help me about a session problem, i am unable to find the reson of this issue. I am Developing a matrimonial site for a client : bit.ly/19mFQ8x Problem : users are automatically logout when they click on any page after login, but it is not happning in …

Member Avatar for diafol
0
360
Member Avatar for kanoy83

hi guys, am testing this script, but its not working. my requirements: current file in database and in folder is 135.docx, and if i want to update it by uploading a new file, the new filename should be 135_1.docx , if update again it must be 135_2.docx and so on, …

Member Avatar for kanoy83
0
2K
Member Avatar for rhodoscoder

<?php function html_escape($input) { return htmlspecialchars($input, ENT_COMPAT | ENT_HTML401, 'utf-8'); } require 'connection.php'; if(!empty($_POST)) { $ustmt=$conn->prepare('UPDATE posts SET title = :title, body=:body, WHERE id = :id'); $lpstid = $_GET['id']; $ustmt->bindValue('title', $_POST['title']); $ustmt->bindValue('body',$_POST['body']); $update_stmt->bindValue('id' , $lpstid); $ustmt->execute(); while($row = $update_stmt->fetch()){ print_r($row); } if($ustmt) redirect('post_view.php?id='.html_escape($_GET['id'])); } $sstmt = $conn->prepare('SELECT (title,body) FROM posts …

Member Avatar for diafol
0
210
Member Avatar for rhodoscoder

i have a form that posts to a database and i was testing code that prevents any javascript or othe client-side scripting from being submitted to the database.All javascript code i submitted ended up in the database, i figure this is bad.How can i prevent this?

Member Avatar for cereal
0
219
Member Avatar for accra

$query="SELECT * FROM history WHERE p_na LIKE '$p_na%' AND svreg LIKE '$svreg%' IN (SELECT * FROM history WHERE cdate BETWEEN '2013-09-12' AND '2013-12-12')"; $sql=mysql_query("$query"); am searching for data LIKE a and LIKE b that falls between to dates. I thought a sub query will be the best method, but its …

Member Avatar for diafol
0
156
Member Avatar for MattD00

I am building a cms I want to iplement the ability to hide pages. I have a row in mysql named hidden which stores the values 1 and 0. 1 will allow the page to be shown and 0 will hide it. The defalut value is set as 1. When …

Member Avatar for MattD00
0
2K
Member Avatar for shelexelex

I want to sum the values of the 'countryamt' column and echo it out. The inputs are coming from the 'matconfirmation.php'. I stored all the inputs in an array, but i dont know how to sum the values up. The bold part of the code was what i tried doing, …

Member Avatar for diafol
0
315
Member Avatar for kh_cade

Hey guys i need your help, i have a project "Web information extraction/gathering/scraping system" - An information extraction system extracts and gethers information from multiple websites, then; it organizes, formats and presents the information to the users. it helps users to find information on particular things (such as flight tickets, …

Member Avatar for pritaeas
0
122
Member Avatar for tqmd1

Dear Experts How to view PHP files without local host? I need a PHP Viewer software. Please help

Member Avatar for pritaeas
0
73
Member Avatar for Tiago_1

Hello, I have a simple HTML table generated using Mysql and PHP: type region platform price $/h m3.xlarge ap-northeast-1 windows 0.980 hs1.8xlarge ap-northeast-1 rhel 5.810 hi1.4xlarge ap-northeast-1 rhel 3.960 m1.medium ap-northeast-1 windows 0.230 cg1.4xlarge ap-northeast-1 rhel 4.450 cc2.8xlarge ap-northeast-1 rhel 3.100 c1.xlarge ap-northeast-1 rhel 0.855 c1.medium ap-northeast-1 rhel 0.254 m2.4xlarge …

Member Avatar for Alibi Ghazi
0
257
Member Avatar for chrisschristou

hello dears daniweb friend i'm trying to get total price in php with the below code but i get only the shipping price when i request echo total what is wrong in my code ??? <form name="valide" method="POST" action="<?php echo $editFormAction; ?>"> <label for="Sub total"></label> <label for="shipping">Sub total</label><input name="subtotal2" type="text" …

Member Avatar for chrisschristou
0
252
Member Avatar for levesque123456

I am trying to make a calculator to calculate your age in dog years, the following is the code I have so far, minus the html portion of it <?php if (!isset($_POST['your_age']) ) { header("Location: dog_form.html"); exit; } if ($_POST['your_age'] == "your_age") { $result = ($_POST['your_age'] *7; if ($_POST['your_age'] >= …

Member Avatar for diafol
0
366
Member Avatar for geoamins2

Dear friends i have developed a report using php/html/css. i have included @media print css style using div tag for page break because i want to print on different pages. each and everyting is working fine but only problem is delaying during printing..the printer print one page and sleep for …

Member Avatar for diafol
0
481
Member Avatar for Eagle.Avik

hi, in the mysql we can fetch data and store them into variables, like the code below: if (mysql_num_rows($userquery) != 1) { die ("that member could not be found!"); while($row = mysql_fetch_array ($userquery, MYSQL_ASSOC)){ $first_name = $row['first_name']; $last_name = $row['last_name']; $email = $row['email']; $password = $row['password']; $sex = $row['sex']; $dbusername …

Member Avatar for diafol
0
224
Member Avatar for sra1
Member Avatar for rhodoscoder

<?php // post_add.php if( isset ($_POST['title']) && ($_POST['body']) && !empty($_POST) ){ require 'connection.php'; $stmt = $conn->prepare('INSERT INTO posts (title,body) VALUES (:title, :body)'); $stmt->bindValue(':title', $_POST['title']); $stmt->bindValue(':body', $_POST['body']); $stmt->execute(); echo 'Entry posted. <a href="post_view.php?id='.$conn->lastInsertId().'">View</a>'; }else if(empty($_POST['title']) || empty($_POST['body']) ){ echo "no values entered"; } ?> As my code is , empty fields …

Member Avatar for Eagle.Avik
0
179
Member Avatar for lillorme

<?php require_once('connections/careergroup.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . …

Member Avatar for phaneendrahari
0
279
Member Avatar for Asif Naveed

hi i am new in the development field i want a little guide line about the WYSIWYG editor i have website and i want to integrate a wix html 5 type http://www.wix.com/ editor in it i try to edit the tinymce editor but i does not found it flexible as …

Member Avatar for diafol
0
413
Member Avatar for 9tontruck

/php/FrontController.php namespace FrontController; class FrontController { public static function add($a, $b) { return $a+$b; } } /project/index.php use FrontController; echo FrontController::add(4,5); error message: Warning: The use statement with non-compound name 'FrontController' has no effect in C:\wamp\www\project\index.php Fatal error: Class 'FrontController' not found in C:\wamp\www\project\index.php I want to use namesapces instead …

Member Avatar for 9tontruck
0
145
Member Avatar for kcrazy

Ive been coding in PHP for over a year now. I was thinking to learn a PHP Framework. After googling around, i found few top frameworks such as Zend, CakePHP, CodeIgniter and Symfony. Still, im not able to choose between these. Can anyone please suggest me the best one ? …

Member Avatar for jkon
0
441
Member Avatar for castajiz_2

Hi guys. for several weeks i can t make my mind whether to go and learn php or should i stick with my C# knowledge and learn ASP.net. I ve started to programming in C# 2 years ago, learned sql and databases and learned html css when i was still …

Member Avatar for JorgeM
0
135
Member Avatar for Priti_P

Hello, I have a question as: I have a calender invitation code for gmail as below: $vcal .= "BEGIN:VCALENDAR\r\n"; $vcal .="-//Google Inc//Google Calendar 70.9054//EN\r\n"; $vcal .= "VERSION:2.0\r\n"; $vcal .= "CALSCALE:GREGORIAN\r\n"; $vcal .= "METHOD:REQUEST\r\n"; $vcal .= "BEGIN:VEVENT\r\n"; $vcal .= "DTSTART:$dtstart\r\n"; $vcal .= "DTEND:$dtend\r\n"; $vcal .= "DTSTAMP:20110302T115742Z\r\n"; $vcal .= "ORGANIZER:mailto:$organizer\r\n"; $vcal .= …

Member Avatar for Priti_P
0
156
Member Avatar for HunainHafeez

i developed a website in php i did it 90% but the problem is that if i have 4 PDF files in website and via search box i enter a text and then it finds that text for me in all 4 odf files or display a message that "No …

Member Avatar for Julsy
0
169
Member Avatar for fheppell

I'm looking for a way to ensure that zero cookies are created by session, is there any way to do so? The session does not need to be overly secure, it is mainly being used to transfer basic and non-sensetive data inbetween pages. This is on a dedicated ubuntu box …

Member Avatar for fheppell
0
177
Member Avatar for rhodoscoder

I found this code online and i want to understand it, i have read the php documentation but i have found out that the php programming community offers better explanations PHP Code: function mysql_safe_query($query) { $args = array_slice(func_get_args(),1); $args = array_map('mysql_safe_string',$args); return mysql_query(vsprintf($query,$args)); } I figure the function isn't a …

Member Avatar for rhodoscoder
0
211
Member Avatar for TIM_M_91

Ok so for my register.php page I want to use https however the code that I am using makes my whole site use https how do I make it so only my register page uses https? Code I'm using: if(!isset($_SERVER['HTTPS'])) { header("location: https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);

Member Avatar for LastMitch
0
145

The End.