39,323 Topics
| |
Hi I am inserting in database but there is error in query. i have array in which form data is stored and function recieve the array but data is not inserting in array. bellow is the code. $insArr=array(); $insArr['first_name']=addslashes($_REQUEST['first_name']); $insArr['last_name']=addslashes($_REQUEST['last_name']); $insArr['email']=addslashes($_REQUEST['emailid']); etc there is 46 fields in table //now the … | |
**Hi Daniweb!** I have a question regarding my e-commerce website. On my product overview, I have this code: <?php $replace_what = array('/',' ', ' - ', ' ', ', ', ','); $replace_with = array('-',' ', '-', '-', ',', '-'); //Start of (1) $mysqli = new mysqli(***); if (mysqli_connect_errno()) { printf("Connect … | |
hi everyone, i just want to ask is there any mistake in my code..because whenever i comment the email check it wroks fine but with email check it always gives error that this email already exists.. i am actually checking if the email im going to add is present already … | |
hope everyone is fine over there :) i just wanted to ask how i can display only one question at a time from mysql table?? here is my code which is doing following things 1) selecting all questions and displaying them what i want to do is 1) display only … | |
I need help. I got this error after submitting a form that uses formmail.php: Parse error: syntax error, unexpected T_STRING in /home/thewebdy/public_html | |
I'm a bit lost on this with html5 - The datasrc attribute on the select element is obsolete. Use script and a mechanism such as XMLHttpRequest to populate the page dynamically.. Does this mean that I will have to change everything into a ajax format? | |
i Always getting : **mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\class\function.php on line 28** please give the suggestion friends config.php <?php define('DB_SERVER', 'localhost'); define('DB_USERNAME', 'root'); define('DB_PASSWORD', '12345'); define('DB_DATABASE', 'class'); class db_class { function db_constractor() { $connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die('Oops connection error -> … | |
Getting a q is undefined.. I took <option="1">1</option> etc.. and now I'm pulling with ajax from datasrc.. I can't quite figure out how to define my database value.. The one uses query which pulls from the auto start typing.. then it submits to the other page through q - Once … | |
I'm getting this error in one of my scripts: **You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-25,25' at line 1** Below is part of the code any help would be great <?php … | |
Okay, sorry if it's a terribly easy/newb-ish task. But I really need this figured out, so I appreciate any help at all. I have a simple online exam task with just a couple of pages, just started learning PHP. The process is like this: 1.) a new user inputs his … | |
Hello all.. we can execute php files from the command line interface... but do we have anything using which we can execute the command line cmds from our php file?? Plz help soon.. | |
Hi! I have a problem with getting error on update... What i have is - one table where i store my orders, and one table where i keep stock records. I managed to update the stock in my table with this piece of code but when i have for example … | |
I knew that I can use variable variables instead of reflection in PHP but I have never gone that way because my OOP background stated that this is not a clean way. Recently I made a test using both methods and the results made me rethink it. Using variable variables … | |
Hy, i am a new here. this is my first post.check this website http://www.abswheels.se/ below slider there is an 3 colunms Marke(Main category) , Modell (Sub Category) and Motor(Sub Category). You can see the default selected menu below slider. When you select other main category than sub category and 2nd … | |
Hello DaniWeb, First off, I am not looking for code, at least not yet. I also honestlly don't know where to post this, but since I'm using PHP, what the heck. If you're an admin and can help me find more relevant answers by changing the "forum type", so be … | |
I'm doing a delete page, and this part is the part where all the data were supposed to be echoed. but, the problem is I don't really know how to print the checkbox within the php. The line 6 is wrong. Kind men, do show me how to write it … | |
Hi, so I'm trying to make a basic registration and everything shows up in the database (phpMyAdmin) except the password <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("sportcourt", $con); $sql="INSERT INTO user (firstname, lastname, password, … | |
hi everyone :) i dont know where i am doing it wrong...but cant upload my file...there is no error but its not saving the whole path in DB and not uploading anything in the directroy as well... please point me to riht direction tahnx :) <?php include("../includes/config.php");?> <?php $mediafile = … | |
Hey all, What I am trying to do is create a search by zip code form. When the form is submitted, it will search for members in nearby cities within the given radius. For example, I submit a form saying find me all members within a 20 mile radius of … | |
This is my php code, I was wondering if you could help me, <link rel="stylesheet" href="style.css" /> <script type="text/javascript" src="script.js"></script> <?php $cat = mysql_real_escape_string($_GET['category']); include '../includes/db-conns.php'; //The file is being accessed on the staging site $hostname = $hostname3; $username = $username2; $password = $password2; $databasename = $databasename3; $link = mysql_connect($hostname, … | |
I'm developing a website wherein the user searches for a name and results will be in a list. Then there is a link where in the user will preview an email format, like a confirmation page and at the bottom is a send button. After the button is clicked, it … | |
im traying to create a contact form (email). im using xampp. so i need something like HmailServer or something like this to send email to myself. can everybody told me how i can configure HmailServer. | |
Hello I am having an issue assigning a variable to a select box selection so that i can feed the variable back into future queries. Please see code below: <select name="room" id="msg-room"> <?php $query = mysql_query("SELECT * FROM rooms ORDER BY ROOM asc"); while($data = mysql_fetch_assoc($query)) { ?> <option value="<?php … | |
Hey all. I FINALLY GOT MY PLUGIN TO *WORK*. Apart from one element... <?php /* Plugin Name: Minepress Minecraft Dynmap Plugin Plugin URI: http://minepress.co.uk Description: Minepress Minecraft Dynmap Plugin Author: Bradly spicer Version: 0.0.1 Author URI: http://minepress.co.uk */ /*Installation of Plugin */ /* What to do when the plugin is … | |
Hi, At first I'm really sorry for my bad English :icon_redface: I really want to simulate a ImageButton click for an ASP.NET (.aspx) file via [B]curl[/B] (or simplate HTML file, but I very tries for it and finally I didn't get it! [B]More explain...[/B] I have this snippet code on … | |
final public function result($sql) { return $this->mysql['result']($this->mysql['query']($sql, $this->connection), 0); } Anyone got any idea how to best fix this error ? | |
This is a sample of the string of data that i need to extract the price of. "Price Rs 475 000 - CHEVROLET AVEO LS // SEP 11 6,000 kms - Red.. full options.. MANUAL 5 door // hatchback Contact me on 786 8394" I have many such strings after … | |
<?php if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); } ?> <?php $vouch = mysql_query("SELECT * FROM cms_vouchers"); while ($voucher = mysql_fetch_assoc($vouch)) { $username = $voucher['user_id']; if(($_SESSION['user']['username']) == "$username") { ?> <div id="page-content-text" class="left"> <div id="contentTitle" class="red">%hotel_name% Alert: Enter the voucher code <?php echo $voucher['code'] ?> to receive <?php echo … | |
hi all,.... plz help me..... hi guyz... i just know how to insert a file into database, but i dont know how to update that file.... here is my code.... <?php $resume=$_FILES['resume']['name']; $file=$_FILES['resume']['tmp_name']; $ext=strstr($resume,"."); //echo "file".$file; //echo "<br>"; //echo "resume".$resume; $sql = "SELECT MAX(cnd_id) FROM tbl_candidate"; $res = mysql_query($sql); $data= … | |
Heello, I was having problems with this php script. I am trying to echo a statement on a contact form depending on the data entered, but when I hit submit, I get a blank page. I belive the error is something small, but I can;t put my finger on it. … |
The End.