39,395 Topics
![]() | |
hi all, i am using json and codeigniter for a project which it has 2 language preferences..english and french...my problem is.. in json number field has to accept (,) instead of (.) in french language can any one guide me on this... thanks, Praveen | |
Hi, i was wondering if anyone can help me. i am new to php and was wondering if it was possible to embed javascript in php. i was trying to get an alert/msg box up to explain an error to the user. i have written the following code <?php ............. … | |
hi, i would like to know how to use server side validation in php i mostly use client side validation using javascript but now i want to validate my form using php. thanks | |
how to add circle marker on google map by giving latitude,longitude and radius in KM? | |
Hi, I've seen similar problems to this posted here but nothing exactly the same so apologies if this question is repeated elswehere... I've got PHP/HTML page which shows a table of users and their e-mail addresses, retrieved from a MySQL DB. Part of the code builds the e-mail addresses returned … | |
Hi all, I have installed Tinymce on my textareas, which are working fine. I have more than one textarea, and the Tinymce attaches itself on ALL textareas, where I only need it to display on one. It starts like this, and logically it will show on textareas, anyone who knows … | |
![]() | Hello people I used TinyMCE for my "textarea" inputs. When I display that text the colors of TinyMCE don't work meanwhile my script works fine, including other features of TinyMCE who work fine also (such as Bold, Italic fonts ...etc) Only colors don't work, I just add that similar script … |
Hey all, I'm just hoping to receive great help from you people.. I'm tryin to fix my PHP coding and it looks good,but the server says that a particular line is broken.. [CODE] <?php $hd = fopen('content.txt', 'r'); $line = fgets($hd); $content = array(); while($line) { $word = explode(',', $line); … | |
Hi, I have a contact form which is laid out like the following; [CODE]<form id="form1" name="form1" method="post" action="send.php"> <table width="362" border="0" align="center" class="tbltxt"> <tr> <td height="30" colspan="2" style="color:#174AA8; text-decoration:underline;"><b>Send us a message!</b></td> </tr> <tr> <td width="95" height="30"><label for="Name">Name</label></td> <td width="257"height="30"><input name="Name" type="text" id="Name" style="width:200px;" /></td> </tr> <tr> <td height="30"><label for="Subject">Subject</label></td> … | |
Hi all. I'm working on a database for school and I'm working between two computers, my laptop at home and my desktop at work. Now my code works fine on my desktop but when I moved it over to the laptop the two drop down select boxes aren't being created. … | |
HI there, I am some problems creating a redirect from a php file. Now, here's teh problem. On my site - let's take this page - [url]http://antobbo.webspace.virginmedia.com/webediting/content.htm[/url] I have a comment form that sends me an email everytime somebody submits the form. Now, the php file is configured so that … ![]() | |
Hi friend! I would compile my file php under under Linux. Have you got an idea of this? (free solution...) Thanks a lot [Gnomix] | |
How do I populate a combobox when checkbox is checked or not on click event. If I click checkbox then combobox fill certain values, and If I uncheck then combobox will get its original items. How this can be done using ajax (jQuery) ? ![]() | |
I have code where I am pulling data from my database and it needs to be separated by commas except the last value (that part works) so I can take those values and input into another SQL query. Here is the working code: [CODE]$biz_id = $row_businesses['id']; $query_related = sprintf("SELECT * … | |
Sorry its a lame title. Not sure really if this should be hear or over in the sql section. I know what I want to do but I'm blanking on how exactly to go about it. I'm inserting book titles into a library database and what I'd like it to … ![]() | |
Hello Friends, I am working in JME. Now, I have situation in which, I suppose to connect with Database which has been used with PHP. So, How can I access to Mysql? As usual same as to connect mysql with JDBC? Is Mysql and Mysql in WAMP Server different? Please … ![]() | |
![]() | |
hi i want to direct my website to different pages If there are competions that are active to show the page list of them else go to other page i tried this but no luck [CODE]<?php include_once "connect_to_mysql.php"; $extract = mysql_query("select * from tbl_competition WHERE fld_closed='N'"); while ($row = mysql_fetch_assoc($extract)) … | |
Hello buddy, im getting some warning like this: [QUOTE]Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/a8150490/public_html/index.php on line 4 Warning: imagecreatefromstring() [function.imagecreatefromstring]: Empty string or invalid image in /home/a8150490/public_html/ocrbreaker.php on line 5 Warning: imagesx(): supplied argument is not a valid Image resource in /home/a8150490/public_html/ocrbreaker.php on line 52 Warning: imagesy(): … ![]() | |
Hi, please point me in right direction. I want to be able to post php/html/mysql code on my website and have it viewed as i would if i posted code on daniweb and used the CODE tags for e.g [CODE]<?php echo "I would like to see my code like this"; … ![]() | |
how does one search mysql where one fields has multiple entries. example: in my db i have two fields in table, one field is the type field: id | Garment | Type 1 | Satin Shirt | "Chemical Clean" 2 | Silk Shirt | "Dry Clean", "Chemical Clean" When i … | |
hi all, i want loading image should be display first for 3-4 second on every search button click then result should be display. [CODE] $(document).ready(function () { $('#form').submit(function() { $('#dsr').addClass('loading'); $.ajax({ type: 'get', url: 'search_hotel.php', data: $('#'+this.id).serialize(), dataType: "html", async:false, success: function(result){ $('#dsr').html(result); }, complete: function() { $('#dsr').removeClass('loading'); } }); … | |
Hello everyone, I am using the following code to do a post to localhost: [CODE] $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://localhost/response.php'); //response.php just spits out json_encode($_POST) curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/html")); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, Array('data' => $xml)); $curl_result = curl_exec($ch); if(curl_errno($ch)) { echo 'Curl error: '.curl_error($ch); } curl_close($ch); … | |
Query Runs in mysql but gives an error when I run in PHP here is the query [CODE]select p.pid as pid, s.sid as sid, s.status as staus, p.name as name, p.mobile as mobile, p.email as email, c.name as course from students as s, prospects as p, courses as c, batch … | |
Here is my script [CODE]<?php $Name = $_REQUEST['Name'] ; $Subject = $_REQUEST['Subject'] ; $Email = $_REQUEST['Email'] ; $Message = $_REQUEST['Message'] ; mail( "email@email.com", "Contact form", $Message, "From: $Email" ); header( "Location: http://randomaddress.com" ); ?>[/CODE] How can i prevent mysql injection? Thanks | |
function main() { if(window.XMLHttpRequest) { ab=new XMLHttpRequest; } else { ab=new ActiveXObject("Microsft.XMLHttp"); } ab.onreadystatechange=function(){ if(ab.readyState==4 && ab.status==200) { document.getElementById("progress").innerHTML=ab.responseText; } } ab.open("GET","querygoogle.php"); ab.send(); } function test(id) { if(window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest; } else { xmlhttp=new ActiveXObject("Microsft.XMLHttp"); } xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("testdiv").innerHTML=xmlhttp.responseText; //alert(xmlhttp.responseText); } } xmlhttp.open("GET","test.php",0); xmlhttp.send(); } function … | |
Is there a way to write a line in .htaccess so that a rewrite rule will NOT rewrite the URL if a certain query_string is found or if a certain page is referring to the page about to be rewritten? | |
I have this function: [CODE] function card_draw ($numeroDeobjetos) { for ($i=0; $i<$numeroDeobjetos; $i++) { $aleatorio=rand (1,40); $usada[$aleatorio]=true; } for ($i=0; $i<=39; $i++) { if ($usada[$i]==false) { echo '<img src="card.jpg">'; } else { echo '<img src="'.$i.'.jpg">'; } } }[/CODE] How can I do to prevent repeated numbers in $aleatorio? Thank you. | |
It's only displaying the first result and not the others. What am I doing wrong? I'm selecting the items the user occupies. Then I'm selecting the name and image of that item from the item table. [CODE]echo "<table cellspacing=\"0\" class=\"news\" align=\"center\">"; echo "<tr>"; $sql = "SELECT * FROM useritems WHERE … | |
Hello! So this might be really weird, but I'm having one of those mornings (the type of morning that no matter how hard you think nothing quite happens haha). So anyways where you guys step in - I am working on a website for a gaming clan. I am making … | |
Hey, I have a question on how to make an inline style to this..: [CODE] $sqlCommand = "SELECT * FROM pages WHERE subjectid='" . $subjectid . "' AND showing='1' ORDER BY pos ASC"; //*** $query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error()); $PageMenuDisplay = ''; while ($row = mysqli_fetch_array($query)) { $pid … | |
Hi, I just started learning CodeIgniter. There is a library [ICODE]$this->load->library('form_validation');[/ICODE] for form validation with rules. Does that mean we don't have to use Javascript to validate forms anymore? Because, if we have to use those validators in CI (sake of the best practise), what is the point of using … | |
Hi all, I am kinda new to web design and also PHP. I am currently working on a Mobile Tyre Fitting website for my dad and need a little help on a search form. The search form has 3 dropdown menu's which are WIDTH , PROFILE and SIZE. I have … | |
hi.. I have a form that needs 10 inputs from a user.. Now my problem is, once the user have input the 10 needed information, he/she cannot input another information and there will be a message stating that he/she cannot input the information because past information have inputed. What do … | |
Hello guys, I need help with this. When I run it, I get a blank page. Please Me out. [CODE] <?php //The Main Program $call_put_flag="c"; $S=50; $X=52; $T=0.5; $r=0.05; $v=0.15; BlackScholes ($call_put_flag, $S, $X, $T, $r, $v); //echo $call_put_flag, $S, $X, $T, $r, $v; //Commulative function function CND ($x) { … | |
hi any body help me. i am new user in web development i would like to know how to send mail using php.(localhost) while using wamp server. thanks and regards umesh daiya | |
I have a checkbox, populates the combox on both checked and unchecked. I am using AJAX to populates. When checkbox is checked, It works fine, but when I unchecked It wont work, actually it wont do anything. [CODE]<input type="checkbox" name="course_inactive" id="course_inactive" onclick="courseStatus(document.getElementById('batch').value, document.getElementById('batch').value)">[/CODE] If remove courseStatus() function is removed, it … ![]() | |
Hello Am new to PHP coding, and would like to get some very good tutorials on PHP forms and processing involved, with mysql may be included as well as part of the forms data to be used, anyone can suggest some nice sites or ebooks or tutorials? Googled some, but … | |
have problems understanding the logic of using variables inside this code. why ist it possible to use %s for different variables and how is it possible to use them as %1$s and %2$s...without even defining them somewhere...i just dont get it, the complete code can be viewed in the thread: … | |
Is it possable to un-include a file to reduce the footprint of a script? That is, after it is included, can it be un-included? | |
In This Page How Can I Make The Page Title Get Its Name From (( Title )) In Database Ads [CODE]("SELECT * FROM ads where id='$id'");[/CODE] [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en"> <head> <title>:: [COLOR="Red"]ZERO XXX[/COLOR] ::</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="http://www.e-alriyadh.com/favicon.ico" … | |
![]() | Hello everybody ;) I have written a kind of css (pre)-processor in PHP, and it uses the GET-method to acces to the file: HTML: [CODE]... <link rel="stylesheet" href="css.php?file=style.css" /> ...[/CODE] PHP: [CODE] ...$pss=file_get_contents("css/".$_GET["file"]); ...[/CODE] My problem is now, if a user types something like "css.php?file=../index.php", he gets the source codes … ![]() |
Hi Friend I need a alert msg display in php, without using javascript. Pls help me to solve it [CODE]$pqty = $bdatam["sum(curr_qty)"]; $pamt = $bdatam["sum(curr_amount)"]; $btotal= $bgtqty+$pqty;[/CODE] i want to display $btotal in alert msg display. Pls help me | |
I have the php which can import the csv files into mysql. But how to avoid the wrong data replace the data database. What is the code in php for checking before insert into the database? Thanks! | |
[QUOTE=~s.o.s~;610914]> how to make div id's as unique (since it need to identify a unique div for each row) One way would be to create a separate counter (e.g. i) which would be incremented for each "for each" block and create an ID dynamically by appending the common name with … | |
Hi First I'm really sorry if this is the wrong area to post this query, but as my pages are all in php, I thought it may have something to do with it. I have just realised that the top part of my pages flicker when you move your mouse … | |
hi, I create a form using php+html in my website. When visitor of my website press send button, the information their key-in in the form will send directly into my inbox. The problem is, my inbox always receive spam from this.. I already delete the form to solve this problem … | |
Why is the serial no always 0 while I put other numbers? Php file: <html> <body> <?php $con = mysql_connect("localhost","eduardli_user","-z.x,c"); if (!$con) { die('Could not connect: ' . mysql_error()); } $description = $_POST["description"]; $price = $_POST["price"]; $quantity = $_POST["quantity"]; mysql_select_db("eduardli_company", $con) or die(mysql_error()); mysql_query ("INSERT INTO Products (description, price, quantity) … | |
In the top of the first page that is requested, I make a global variable and store the value of microtime() in it. The footer of the page is require()'d at the bottom, and in the separate footer page is a code that subtracts the current microtime() from said global … ![]() | |
Hello. Although I have seen someone else having a similar problem here, I got stuck with an error. This is the code and it shows a red parenthesis. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>JumbleMaker</title> </head> <body> <?php function DisplayError($fieldName, $errorMsg) { global $errorCount; echo … |
The End.