38,020 Topics

Member Avatar for
Member Avatar for scoobie

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 ............. …

Member Avatar for shridharshenoy
0
613
Member Avatar for umesh daiya

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

Member Avatar for vibhaJ
0
53
Member Avatar for karthik_ppts
Member Avatar for karthik_ppts
0
241
Member Avatar for minart

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 …

Member Avatar for minart
0
154
Member Avatar for klemme

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 …

Member Avatar for vibhaJ
0
216
Member Avatar for begueradj

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 …

Member Avatar for vibhaJ
0
115
Member Avatar for rotten69

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); …

Member Avatar for vibhaJ
0
88
Member Avatar for ben.matthews18

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> …

Member Avatar for vibhaJ
0
518
Member Avatar for dyingatmidnight

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. …

Member Avatar for dyingatmidnight
0
88
Member Avatar for Violet_82

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 …

Member Avatar for brewbuff
0
190
Member Avatar for gnomix

Hi friend! I would compile my file php under under Linux. Have you got an idea of this? (free solution...) Thanks a lot [Gnomix]

Member Avatar for jakubmisek
0
901
Member Avatar for abhi10kumar

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) ?

Member Avatar for diafol
0
29
Member Avatar for adamworld

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 * …

Member Avatar for adamworld
0
107
Member Avatar for dyingatmidnight

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 …

Member Avatar for diafol
0
94
Member Avatar for Hakoo

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 …

Member Avatar for diafol
0
200
Member Avatar for phpbeginners
Member Avatar for branding4you

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)) …

Member Avatar for branding4you
0
164
Member Avatar for twitah

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(): …

Member Avatar for diafol
0
451
Member Avatar for designalex

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"; …

Member Avatar for diafol
0
101
Member Avatar for branding4you

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 …

Member Avatar for branding4you
0
97
Member Avatar for mangel.murti

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'); } }); …

Member Avatar for mangel.murti
0
874
Member Avatar for TotoTitus

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); …

Member Avatar for TotoTitus
0
2K
Member Avatar for abhi10kumar

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 …

Member Avatar for karthik_ppts
0
96
Member Avatar for ben.matthews18

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

Member Avatar for rkskeka
0
56
Member Avatar for zakir ali

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 …

0
150
Member Avatar for thedonedeal

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?

0
111
Member Avatar for makimbo

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.

Member Avatar for makimbo
0
130
Member Avatar for Tenaciousmug

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 …

Member Avatar for C#Jaap
0
133
Member Avatar for klemme

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 …

Member Avatar for klemme
0
156
Member Avatar for veledrom

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 …

Member Avatar for veledrom
0
932

The End.