39,326 Topics
| |
I have two problems with this code. 1. when i refresh the page it uploads the file again. 2. how to i validate the form if required fields are not filled ? i have added the code validation but its not working and there are no errors. <?php if (isset($_POST['upload'])) … | |
I have a form which a user fills out and submits. This will take the user to a review page where they can then either go back and make changes or submit their information. The user is then taken to a confirmation page. I used FPDF to create the pdf. … | |
This was an existing script written in PHP and Jquery, basically, what it does is the calculations of price and quantity for a Point of sale system. I made a few changes so that the end-user can enter the price, as they enter the quantity amount. Now, after I made … | |
before i have a code like this echo '<hr /> <h2> Chat Log</h2> <div class="chatWindow">'; foreach ($replay->chat as $content) { $prev_time = $content['time']; echo('('.convert_time($content['time'])); if (isset($content['mode']) && isset($colors[$content['mode']]) && isset($names[$content['mode']])) { if (is_int($content['mode'])) { echo(' / '.($content['mode'] == 0x01 ? "Allied" : "")); } else { echo(' / '.$content['mode']); } … | |
Hi People.... I have a table named 'csv_data_table' and it has a varchar(255) column named 'EMAIL' This EMAIL column has multiple records with white spaces (at front and end) I tried this way to eliminate the white space UPDATE csv_data_table SET EMAIL = trim(EMAIL); But it won't work.... the email … | |
before i have a code for this echo ('<div class="content" style="width: 293px; float: left;"> <b>Host: </b> '.(isset($replay->game['creator']) ? $replay->game['creator'] : "n/a").' </div> and then i will input a creator in my form echo"<form> <textarea name='BBCode' style='width:592px; height:120px;' >[B]Host : [/B] (how toinsert creator in this area) </textarea><br> <input type='button' onclick='javascript:this.form.BBCode.focus();this.form.BBCode.select();' … | |
This is the project I need to finish. I am fairly new to php and this project has got me confused. Any help would be greatly appreciated The project ask for to validate ISBN 10 Number. There would be 10 digits with 1-9 being Numbers, but Number 10 is an … | |
This is a function that I wrote and have re-used many times. I share it with you DaniWebers to use, laud or destroy! In a nutshell, this takes a user's search box input phrase and generates a series of LIKE clauses for your SELECT statement. Looks like "col1 LIKE '%s_term1%' … | |
dear friend i want to insert a row in orecal which is insert into employee ('AMIT D'SOZA', 'MANAGER','500') thorugth php but there is problem to insert data like 'AMIT D'SOZA' so i want to restrict "'" (singal quets ) to enter in text fields plz help me if you have … | |
I need some help with this project. I've gone as far as I can go, with no results, The inquiry form works, but I need to populate it with my sql table. I could only screen shot my sql and I have no idea of how to put it on … | |
How to upload image to database and move into image folder this is my function for other rows: <?php function add_post($title, $contents, $category) { $title = mysql_real_escape_string($title); $contents = mysql_real_escape_string($contents); $category = (int) $category; //var_dump($category); mysql_query("INSERT INTO `posts` SET `cat_id` = '{$category}', `title` = '{$title}', `image` = '{$image}', `contents` = … | |
Hi guys, Got a problem uploading an image to a directory and then including that directory location into the database so that I can display the image. Here is the code I have so far. <div id="main_right"> <?php if ($picture) { ?> <img src="<?php echo "../images/teacher_photo/" . $picture ?>" alt="<?php … | |
dynamic title,meta keywords and description.. manually i created one page in that i add some title,keywords and descriptions based on category(i.e like home,about us,contact us etc)in backend, and i have some pages like home.php,aboutus.php etc in front end. so if i click home(home.php) that title should display which i entered … | |
please am php biginner, am working on a form and i need a particular field in that form to fetch the name of the person login. i hope you do understand. thanks | |
hey guys so im trying to delete a row using checkbox but i get an undefined index error = Notice: Undefined index: check in D:\Xampp\htdocs\EMS2\event.php . i think its because the checkbox is echoed(?)maybe? or is it something else that i overlooked? <tbody class="tbody-event-list-table2"> <?php require "connection.php"; $check = mysql_query("SELECT … | |
how can i invite to friends of all my members which login to my website with fb id? | |
I'm not sure what is going on. I specified for the 2nd cell to go to the next line but it is attaching to the end of the first line. Here is my code: <?php require_once('/fpdf/fpdf.php'); $pdf = new FPDF(); //var_dump(get_class_methods($pdf)); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', '20'); $pdf->cell(0,10, 'Mobile Home Poperty Tax … | |
I am going to start a business of business consultant. My target clients would be pan-asia; so, to reach all of those, I need to have a impressive website with lots of designs and pictures. Videos would also be a integral part. I am confused for chosing- PHP or ASP … | |
I created a Virtual host using WAMP Server.Its working.But its DB connection not working. <VirtualHost *:80> ServerAdmin webmaster@kiwitravel DocumentRoot "c:/wamp/www/kiwi ServerName kiwitravel.localhost ErrorLog "logs/kiwitravel-error.log" CustomLog "logs/kiwitravel-access.log" common </VirtualHost> DB Connection class Database { const DB_HOST = 'localhost'; const DB_USER = 'root'; const DB_PASSWORD = ''; const DB_NAME = 'admin_kiwi'; public … | |
I want to send an email only if the field name 'Active' has changed in my database table bus_status.. It is a boolean field (TRUE or FALSE) so if it is False and changes to TRUE upon update I want it to send the email or if is TRUE and … | |
This is a bit complex. I have two tables *bus_status* and *routes* routes has a foriegn key look up from bus_status called UnitAssigned in routes table and it is pulled from the BusNumber field in the bus_status table. Right now when I send an email and include the field in … | |
I was taking a tutorial on PDO with PHP and MySQL and noticed I could not generate an exception from this code. I wonder what setting I need to put in place to generate the exception. If I shut down MySQL I can generate an error but with MySQL running … | |
Any ideas why the get variable after this .htaccess redirect is unobtainable? RewriteCond %{REQUEST_URI} !^/admin/editsale.php RewriteRule ^admin/editsale/(.*)$ /admin/editsale.php?reg=$1 [QSA,L] Many Thanks Tom | |
Basically I am woking on this project where I have been given an api. the maximum number of times i can access is 20 calls per second I need to call this api say 500 times I can do simple loop which is foreach($test as $call){ //call api using $call … | |
Hello, i have SAMP (san andreas multiplayer) server and hostname is on cp1251 or cp1252 (i dont know) Here is output: Áúëãàðñêè Òðúêèíã Ñúðâúð! but right way is: Български Тръкинг Сървър! Here is 2cyr site: http://2cyr.com/decode/?lang=en (i checked first name in them) The string which is needed to check is … | |
I using Phpredis and am trying to get information from the following key called "statHistory" I am new to redis and not sure how to call each value individually. I am able to connect to redis using php and have tested it using the ping command. It has been two … | |
Hi there, I am having difficulties with integrating [datatables](http://datatables.net/). Somehow, my data is being lost/weirdly modified when putting it in my response variable. foreach($aaData as $aData) echo "-".$aData."<br>"; foreach($aaData as $aData) $response['aaData'][] = $aData; My first foreach loop outputs data, and what I see is what I expect. However, when … | |
my hosting directory permissions is writeable but still i recieved in 0kb files came form my upload page. | |
I am Learning so Can suggest some code. How can i add Multi select Box in Codeigniter. Thank You |
The End.