39,321 Topics

Member Avatar for
Member Avatar for RLS0812

I am attempting to use preg_replace to purge everything except letters and numbers in the $_POST, however is seems to be failing to work. Sample code below demonstrating the problem. <html> <?php if( isset($_POST["name"]) || isset($_POST["age"]) ) { $x1 = preg_replace('[^A-Za-z0-9]', "", $_POST['name'] ); $x2 = preg_replace('[^A-Za-z0-9]', "", $_POST['age'] ); …

Member Avatar for RLS0812
0
231
Member Avatar for barry.gold.963
Member Avatar for ultmt.punisher

I want to put 1 variable in my send.php page and get its value by if statement on 2nd (page-contact-us.php)page, because I have my form in 2nd page with <form action="<?php bloginfo('template_directory');?>/send.php" method="post" id="contactform"> and in my first page (send.php) i have if statement like, if($security=="10") { mail($to,$subject,$message); $var='1'; } …

Member Avatar for diafol
0
292
Member Avatar for dean.ong.14

"The page isn't redirecting properly" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR...l1-strict.dtd"> <!-- --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Yakity Yak</title> <link href='http://fonts.googlea...=Oswald:400,300' rel='stylesheet' type='text/css'> <link href='http://fonts.googlea...css?family=Abel|Satisfy' rel='stylesheet' type='text/css'> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div …

Member Avatar for dean.ong.14
-1
179
Member Avatar for david.roun.7_1

I have a webiste and would like to send an email to someone, and myself, when they request their lost password. For some reason, I can't get the mail() function to work, no matter what I do. I unsuccessfully tried to model it after the listserv I created and am …

Member Avatar for david.roun.7_1
0
168
Member Avatar for casey.li.146

Hi, I have a already designed web page with tables and stuff, but there are challenges for me to insert or include php and inserting the data that is from mysql to the tables in the webpage. I do not know how to do it to maintain the integrity of …

Member Avatar for casey.li.146
0
292
Member Avatar for Tko_1

Hello, so the code i have gets the files in the directory and lists them in a dropdown. what im trying to do is rename the selected dropdown file with the input of the text field. error i get is: Warning: rename(test.php,) [function.rename]: No such file or directory in..... For …

Member Avatar for Tko_1
0
189
Member Avatar for sigvewinter

What is the easiest way to retrieve templates from database in Smarty? I've tried http://www.smarty.net/docs/en/resources.custom.tpl to make this work, but unsuccessfull. I can't figure out how to implement it right. No errors really, it just don't work. Any suggestion or ideas?

Member Avatar for pritaeas
0
89
Member Avatar for Siberian

Hi, this script is suppose to back up most if not all directories, all files within each directory then compressed those files and directories in a zip file and save it to a directory. A typical web server can be in the hundreds of megs, the script works except it …

Member Avatar for Siberian
1
180
Member Avatar for tomcromp

In my wordpress theme my logo is built into my background, how can I make part of the background (where my logo is) a link? Any help would be greatly appreciated Tom

Member Avatar for cereal
0
147
Member Avatar for Abdul Qayyum_1

Hello, I am trying to get HTML source of my vendor website's URL using cURL but I am not getting correct result, the output is coming only Header Template and Footer Template. I have given code below which I m using. Please help me out to get correct result. Thanks …

Member Avatar for pritaeas
0
370
Member Avatar for MaddTechwf

I've started using Bitbucket recently for version control and I have to say I like it a lot. I've only been using it for HTML/CSS development. I would really like to use it for when I convert those page from html to a Wordpress template. Is there any way to …

Member Avatar for pritaeas
0
196
Member Avatar for Indians

![1085c1c3bd57d0a1fb75f1b1edbbda0f](/attachments/small/4/1085c1c3bd57d0a1fb75f1b1edbbda0f.PNG "align-left") look at this image. when i send this page via email it shows the php code. it does not fetch the details from mysql and then i'm fetching the mysql records based on the particular voucher id. how to send mysql fetch records page via email?

Member Avatar for Tpojka
0
262
Member Avatar for fheppell

The output of this code is a 0 byte file: if ($_GET['download']== 'true'){ $downloadarray = array(); while($row = mysql_fetch_array($res)){ $url= $row['loc']; $path = 'tmp/'; $path .= rand(100,999); $path .= $row['name']; $fp = fopen($path, 'w'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_FILE, $fp); $data = curl_exec($ch); curl_close($ch); fclose($fp); echo print_r($data); $downloadarray[] = array($path, …

Member Avatar for fheppell
0
323
Member Avatar for meempat

I am just trying a simple code which executes on a form submission ( self). It runs perfect in local. But shows "Error: No database selected" in the remote server. Can anyone say why ? Thank you [CODE]<?PHP $con = mysql_connect("localhost","aby","pass123"); if (!$con) { die('Could not connect: ' . mysql_error()); …

Member Avatar for diafol
0
5K
Member Avatar for sandipan.rcciit

hi friends, I already have a code that upload image with re size it. [CODE]<form action="<?php echo $_server['php-self']; ?>" method="post" enctype="multipart/form-data" id="something" class="uniForm"> <input name="new_image" id="new_image" size="30" type="file" class="fileUpload" /> <input type="submit" name="submit" value="Submit"><p> </form> <?php if(isset($_POST['submit'])){ if (isset ($_FILES['new_image'])){ $imagename = $_FILES['new_image']['name']; $source = $_FILES['new_image']['tmp_name']; $target = "images/".$imagename; move_uploaded_file($source, …

Member Avatar for diafol
0
952
Member Avatar for mansi_1

i am fetching values from a database in a page using while loop..the page where i ma fetching values from database have 8 columns , out of 8 , 6 cloumn values are coming from database , now on this page i have added two columns , now what i …

Member Avatar for urtrivedi
0
91
Member Avatar for annyangel

hlo, i have a code in php with different functions. i want to test that functionality with php code. plz tell me how this automated test code would be written? individually i had test these functions but there is a requirement of a single code with which all the functions …

Member Avatar for annyangel
0
309
Member Avatar for Iikeloa

Hi I'm working on a registration form.So every one can register but to regeister you need to upload your logo.! this is the file:register.php : <?php $page_title = "register"; require_once("inc/config.php"); require_once('inc/header.php'); ?> <center> <form action="check-register.php" method="POST" encrypt=”mulipart/form-data”> <input type="text" name="username" /><br /> <input type="password" name="password" /><br /> <input type="password" name="repassword" …

Member Avatar for Iikeloa
0
226
Member Avatar for broj1

Just to alert admins that some spamming is just happenning in the PHP forum here on Daniweb. Please take a look.

Member Avatar for Dani
1
125
Member Avatar for Izzah_1

i want to ask is my coding correct or not.. ive been trying for many times and cant find the errors. thanks in advance if you guys help me with this problem. <!-- ubah.php --> <!-- Interface of update data. --> <?php include("db.php"); $idURL = $_GET['id']; $query = "SELECT * …

Member Avatar for Lsmjudoka
0
211
Member Avatar for Linddha

i want to show the notification of my posting. but my script cann't working i have 4 table - user, group, article, comment user : id_user username 1 | user1 2 | user2 3 | user3 group : id_group name content 1 | Script 2 | Math article : id_news …

Member Avatar for Lsmjudoka
0
229
Member Avatar for Iikeloa

Hi I'm working on a website and every thing is going great untill I faced this problem with the editing page! here is my code : <?php session_start(); if(!isset($_SESSION['admin'])){ echo "Only admin has access to this page"; header("Refresh: 3;url=login.php"); }else{ require("inc/config.php"); require("inc/header.php"); $id = (int)mysql_real_escape_string($_GET['id']); $title = $_GET['title']; $describtion = …

Member Avatar for Iikeloa
0
120
Member Avatar for Indians

<form action="searchdetail.php" method="post"> SEARCH BY: <select name="searchby"> <option value="gname">Guest Name</option> <option value="city">Guest City</option> </select> <input name="query" type="text" /> <input name="subval" type="submit" value="Search" /> </form> and searchdetail.php include("config.php"); if(isset($_POST['subval'])) { $query = mysql_real_escape_string(trim($_POST['query'])); $sql = mysql_query ("SELECT * FROM voucher WHERE gname = '$query'"); echo "<table border=1 width=860 align=center cellsapcing=5 cellpadding=5>"; …

Member Avatar for Indians
0
283
Member Avatar for rahia307

Hi every one, I am using this funtion function get_last_inserted_id($table) { include "dbsetting/adm_vars_config.php"; include "dbsetting/classdbconection.php"; $dbacosis = new dbacosis(); $sqlacosis = $dbacosis->queryacosis("SELECT LAST_INSERT_ID() AS `last_id` FROM `pcosis_courses`;"); if(!$sqlacosis or mysql_num_rows($sqlacosis) == 0) { return false; } else { $data = mysql_fetch_array($sqlacosis); return $data['last_id']; } } $id = get_last_inserted_id("courses"); echo $id; …

Member Avatar for diafol
0
119
Member Avatar for bodylove121

<?php $input = $_GET['input'];//Note to self $input in the name of the search $terms = explode(" ", $input); $query = "SELECT * FROM `#####` WHERE 1 LIMIT 0 , 30"; foreach ($terms as $each){ $i++; if ($i == 1) $query .= "keywords LIKE '%$each%' "; else $query .= "OR keywords …

Member Avatar for pardeepkk
0
280
Member Avatar for nacedo

I am using Formidalbe Pro on my wordpress site. Users are sending me a form that I make editable by them and by me (Its all managed by Formidable). They have to be logged-in with wordpress to fill the form and edit it. No anonymous access. I want to encrypt …

Member Avatar for diafol
0
271
Member Avatar for Indians

here i am store the dynamic row values into mysql. i am using jquery and javascript for dynamic rows and auto calculation and then stored to mysql using php coding. that works perfectly. i already added dynamic row value into mysql perfectly. But, now i want to edit the table …

Member Avatar for Indians
0
1K
Member Avatar for Izzah_1

i want to insert new data but the data didnt show up in database and didnt display for user when i click foe change theres nothing happend i couldnt find any error...ples help me (BookingnDisplay.php) <h1><?php if($_SESSION["name"]) { ?> Welcome <?php echo $_SESSION["name"]; ?>. Click here to <a href="logout.php" tite="Logout">Logout</a>. …

Member Avatar for ehpratah
0
211
Member Avatar for davy_yg

Hello, This script has error: Warning: opendir(E:/xampp/xampp/htdocs/images/uploads/) [function.opendir]: failed to open dir: Invalid argument in E:\xampp\xampp\htdocs\sunvone_contoh\admin\javas\tinymce\plugins\tinybrowser\upload_process.php on line 17 Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\xampp\htdocs\sunvone_contoh\admin\javas\tinymce\plugins\tinybrowser\upload_process.php:17) in E:\xampp\xampp\htdocs\sunvone_contoh\admin\javas\tinymce\plugins\tinybrowser\upload_process.php on line 79 You won't see this. Why is it? upload_process.php <?php require_once("config_tinybrowser.php"); require_once("fns_tinybrowser.php"); // …

Member Avatar for davy_yg
0
208

The End.