39,323 Topics
| |
Hi all. I'm having a mad issue... totally mad. I mean I've never had this before. I have the following HTML form: <form action="" method="POST" name="createForumCategory"> <label>Create a new category:</label> <input type="text" name="category" class="m-wrap placeholder-no-fix" /> <input type="hidden" name="id" id="id" value="<?php echo $forumOrange['id']; ?>" /> <button class="btn green" type="submit">Add Category</button> … | |
I just got a new laptop that is running os x maverick. I opened the /etc/apache2/httpd.conf file and uncommented the # Virtual hosts Include /private/etc/apache2/extra/httpd-vhosts.conf and LoadModule php5_module libexec/apache2/libphp5.so lines, but I still can't run php files. Does anyone have any idea how I can run php files locally again? | |
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'] ); … | |
i want to know how to develop and run my own smtp server | |
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'; } … | |
"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 … | |
| 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 … |
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 … | |
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 … | |
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? | |
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 … | |
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 | |
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 … | |
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 … | |
![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? | |
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, … | |
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()); … | |
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, … | |
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 … | |
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 … | |
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" … | |
Just to alert admins that some spamming is just happenning in the PHP forum here on Daniweb. Please take a look. | |
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 * … | |
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 … | |
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 = … | |
<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>"; … | |
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; … | |
<?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 … | |
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 … | |
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 … |
The End.