1,257 Posted Topics

Member Avatar for karl.jackson87

try to add slashes instead of real escape [CODE]$title= addslashes($_POST[title]); $description= addslashes($_POST[description]);[/CODE]

Member Avatar for urtrivedi
0
206
Member Avatar for AngelicOne

in your post handler form you check errors [CODE] <?php unset($_SESSION['last_data']); unset($_SESSION['errors']); if(errors) { //set error session here $_SESSION['last_data']=$_POST; } else { //update/insert database } header("location:myform.php"); exit; ?> [/CODE] Now in your main form you can diplay session errors if session errors is set, and use last data to set …

Member Avatar for urtrivedi
-1
180
Member Avatar for facarroll

I have selected only required columns and echoed query before running it. When you run this page, copy the query output from browser and run it in phpmyadmin, and see what comes as result [CODE] <?php $query="SELECT topics.quizId, topics.title, quiz.passState' FROM topics LEFT JOIN quiz ON topics.managerId = quiz.managerId WHERE …

Member Avatar for Mikav6
0
113
Member Avatar for fidolas7

in the begining (or before using session variable) of all pages make sure you write session_start();

Member Avatar for decade
0
242
Member Avatar for nikita.chandra

your form page, say myform.html. [CODE]<div><?php echo $_GET['message']?> </div> <form action='mail.php' > . . . </form> [/CODE] your mail.php [CODE]<?php $mailsent=mail('som@g.com','hi','how are you'); if($mailsent) $msg="Mail sent succefully"; else $msg="Error occured while sending mail"; header("location:myform.html?message={$msg}"); exit; ?>[/CODE]

Member Avatar for diafol
0
338
Member Avatar for devindamenuka

[CODE]<div><b><a href='edit.php?articleid=1'>My article 1</a> </b> content 1 content 1 content 1 content 1 content 1 </div> <div><b><a href='edit.php?articleid=2'>My article 2</a> </b> content 2 content 2 content 2 content 2 content 2 </div> <div><b><a href='edit.php?articleid=3'>My article 3</a> </b> content 3 content 3 content 3 content 3 content 3 </div>[/CODE]

Member Avatar for devindamenuka
0
179
Member Avatar for bizfreak22

try to do without sprintf, [CODE] $notes=addslashes($_POST['Notes']); $updateSQL = "UPDATE Leads SET Notes = CONCAT_WS(Notes,'\r\n', '{$notes}') WHERE Id='{$_POST['Id']}'";[/CODE]

Member Avatar for urtrivedi
0
444
Member Avatar for MichaelFL

1 removed () around echo 2 merged two lines, 3 changed " to ' [CODE] echo "<br>You left out some required dields. <STRONG>Record NOT added</STRONG>. Enter this record again, please <P align='center'><A HREF='http://www.kotw.net'><STRONG>Go Back</STRONG></A></P> "; [/CODE]

Member Avatar for MichaelFL
0
370
Member Avatar for riteshe
Member Avatar for urtrivedi
0
134
Member Avatar for DILO3D

Explain in detail. post acutally table structure and sample data (preferably in sql format) Then post expected output.

Member Avatar for IIM
0
113
Member Avatar for Kevin Lee

I assume gid is number so pass one more parameter test.jsp?gid=1&gidlist=-1,2,3, track entered ids using javascript store it some where. then in your query you may write [CODE]"select gid, sgg_eng_nm from test where gid not in ($gidlist)"[/CODE]

Member Avatar for urtrivedi
0
158
Member Avatar for Hani1991

we must practise to do it in correct format. Better you use <br /> <img />. Though it will not change layout, if you do not add space and slash.

Member Avatar for dreamer14
0
163
Member Avatar for Red_Indian

[code] update tablename set col1='newvalue' where col2='my condition' [/code]

Member Avatar for prit005
0
94
Member Avatar for choboja621

You must quote operators if (ope=='+') there no operators function [CODE]<html> <body> <script lang="text/javascript"> var num1, num2, ope, sum, diff, prod, quo, mod; num1=Number(prompt("Enter First number: ")); num2=Number(prompt("Enter Second number: ")); ope=prompt("Choose Operator : + - * / %"); if (ope=='+') { sum=num1+num2; document.write("The sum is: "+sum); } else if …

Member Avatar for choboja621
0
90
Member Avatar for vaultdweller123

if you know the path of the file on server, you may use readfile('http://server/folder/image.jpg');

Member Avatar for urtrivedi
0
421
Member Avatar for Ichcha

this is expected output groupname jan feb march.... A 3 1 2 B 1 4 5 then post table structure and sample data here

Member Avatar for Ichcha
0
467
Member Avatar for arsala211

HERE IS THE CODE [CODE]<html> <head> <script lang=javascript> isEmail1 = /^\w+([\.\-]\w+)*\@\w+([\.\-]\w+)*\.\w+$/; isEmail2 = /^.*@[^_]*$/; function isEmail(s) { return (isEmail1.test(s) && isEmail2.test(s)); } function validate(what) { if (!isEmail(what.txtemail.value)) { alert('Invalid email id'); return false; } else { alert('WELCOME ID IS VALID'); } //return true; } </script> </head> <body> <form name=frm id=frm …

Member Avatar for urtrivedi
0
78
Member Avatar for RazorRamon

As far as I know in mysql by default datatime field is stored in yyyy-mm-dd format. Though if data is in another format then you may use mysql strtodate (some thing like that) function. I suggest you to directly use mysql current_timestamp function [CODE]mysql_query ("INSERT INTO $tablename (timestamp,name) VALUES (current_timestamp,'$name')"); …

Member Avatar for RazorRamon
0
314
Member Avatar for mbarandao

after running page view souce and search for MY SQL = I think you should find real query text around it in source. then run that query in myadmin.

Member Avatar for ddymacek
0
437
Member Avatar for devindamenuka

Are you able to display it [CODE]echo '<td align="center" >'.$row['commentId'].'</td>';[/CODE] If no then check the spelling and case, php array is case sensitive. Another thing is that you have placed form in the loop, I think it is not required, you can simply use <a></a>\ replace your delete code [CODE] …

Member Avatar for leakbali
0
360
Member Avatar for vikaspa

You must also consider javascript in mind. load server time in javascript and manage countdown clock there. [url]http://www.w3schools.com/js/js_timing.asp[/url]

Member Avatar for urtrivedi
0
719
Member Avatar for manzoor.ilahi77

I think this is not good way of entering date check jqueryui datepicker its very simple to use, in your case how you will validate date any way for your case you must give name and ids to all elements like [CODE]<input .... name='d1' id='d1' > <input .... name='d2' id='d2' …

Member Avatar for urtrivedi
0
458
Member Avatar for Madhuphp

Basic php [url]http://www.w3schools.com/php/default.asp[/url] PHP TUTORIAL [URL="PHP TUTORIAL http://devzone.zend.com/node/view/id/651"]http://devzone.zend.com/node/view/id/651[/URL] There are so many ready to use free tools (framework) joomla, wordpress, drupal, cakephp and so many more, but you must learn basic php first.

Member Avatar for vaultdweller123
0
136
Member Avatar for chaychie

It is possible same form and one action page by using complex javascript coding. You need to learn html element arrays 1) like Naming html elements using xyz[], 2) Adding /deleting table rows using javascript code. 3) accessing posted array in php and all that. [COLOR="Green"]If updating all at once …

Member Avatar for vaultdweller123
0
122
Member Avatar for arsheena.alam

are you getting expected number of records by selecting it say [CODE]select count(*) from quest_bank where source like '%src="~/%'[/CODE] I think you might be having space in between in some records [ src = "~/ ] like that

Member Avatar for arsheena.alam
0
200
Member Avatar for arsala211

[CODE]select col1,col2,col3 from tablename where col1='something' and col4='some more thing'[/CODE]

Member Avatar for urtrivedi
0
47
Member Avatar for chandimak

Even some database do not allow to change type especially when table having data, or it is key column. In your case if it is PK then when u change PK's datatype you will also have to change datatype of its foreign key reference. I suggest if it is going …

Member Avatar for chandimak
0
219
Member Avatar for Arjun_Sarankulu

if its one time you can export it to excel or csv then import it in oracle or you can develop some front end in vb.net or php and connect to both database and transer data from one to another database

Member Avatar for Arjun_Sarankulu
0
381
Member Avatar for lps

this will alert user to enter proper string which may or may not start with + [CODE]function zz(txt) { isPhone = /^[+]?\d+$/; if (!isPhone.test(txt)) { alert('Invalid phone number'); document.getElementById('aa').focus(); return false; } return true }[/CODE]

Member Avatar for urtrivedi
0
119
Member Avatar for uselessninja

check my code line numbers 389 given id to form 393 given id to num 395 changed submit to button and added onclick event 404 removed duplicate form 470 accessing num by id 502 change function definition, now creating new function totext 507 accessing num by id [CODE]<html> <style type="text/css"> …

Member Avatar for uselessninja
0
200
Member Avatar for Shizuo

rename for function all to function allnew (i think all is inbuilt keyword)

Member Avatar for urtrivedi
0
94
Member Avatar for arcticM

I think you can use gd libraries. You can draw rectangles and lines using it using php code. gd must be installed on your server with php.

Member Avatar for urtrivedi
0
130
Member Avatar for jpknoob

I have merged template in your code, I think following 3 variable are important for your payment gateway. Do not include template code now. (its already in your code now) [CODE]$sngTotal=0.0; $strBasket=""; $iBasketItems=0; [/CODE] Final code [CODE]<?php $sngTotal=0.0; $strBasket=""; $iBasketItems=0; $total=0; foreach($_SESSION['cart'] as $product_id => $quantity) { $query = sprintf("SELECT …

Member Avatar for jpknoob
0
164
Member Avatar for johndohmen1963

carefully use this code, before running this query, keep back up of table [CODE] mysql_query("UPDATE narr_weinachtfeier SET albumdescription='$change_name', location= concat('$change_name',substr(location,instr(location,'/'))) , location1= concat('$change_name',substr(location1,instr(location1,'/'))) WHERE id='$idalb'"[/CODE]

Member Avatar for johndohmen1963
0
105
Member Avatar for Shizuo
Member Avatar for Mona Ali
Member Avatar for urtrivedi
0
580
Member Avatar for eltonpiko

category(cat_id, cat_desc) article(art_id,art_desc, cat_id) user(userid, username,pwd) user_category(userid, cat_id) user_mail_log(log_id,userid,art_id,sent_time) optional here when an article is added you can run query and loop it to send mail to user subscribed its category and save that log in user_mail_log table (optional). to find out you need to join article, user, category and …

Member Avatar for urtrivedi
0
257
Member Avatar for JesuZ

i think you want to join tables. query for joining two table is as follows [CODE]select t2.sup_id, t1s.name sup_name, t2.emp_id, tle.emp_name from table2 t2 left outer join table1 t1s on t2.sup_id=t1s.id left outer join table1 t1e on t2.emp_id=t1e.id[/CODE]

Member Avatar for urtrivedi
0
138
Member Avatar for mehrantahir

what is the datatype of arrival_at, its datetime or time or varchar. If its varchar then you need to cast it to time before comparing. So mention here how you store your arrival_at.

Member Avatar for urtrivedi
0
93
Member Avatar for MargateSteve

[CODE]What I need to do is take the date clause from the views and instead use it in the query so that I can re-use the views with other date ranges.[/CODE] You are in the right direction remove this line from both views [CODE]AND DATE BETWEEN '2010-08-01' AND '2011-05-01' [/CODE] …

Member Avatar for urtrivedi
0
141
Member Avatar for Some-Jackass

Can u check how much time this query takes. [CODE]select N.id, N.Alias, N.Weight FROM Ninja N left outer join Matchup Mb on Mb.BlueCornerNinjaID = N.id left outer join Matchup Mr on Mr.RedCornerNinjaID = N.id WHERE ifnull(Mb.BlueCornerNinjaID ,0)+ifnull(Mr.BlueCornerNinjaID ,0)>0 ORDER BY N.Alias[/CODE]

Member Avatar for urtrivedi
0
1K
Member Avatar for ghosh22

Before you upload you file, you must complete the record, you can not pass blank country. Human can read file and understand that to which country that blank city belong after looking the top row of city group. But computer can not understand that. Try to attach following file with …

Member Avatar for ghosh22
0
313
Member Avatar for soapyillusion
Member Avatar for soapyillusion
0
128
Member Avatar for Xtremefaith

add $this->link as first parameter, change that line to following [CODE]while ($rows = mysqli_fetch_array($this->link,$result))[/CODE]

Member Avatar for Xtremefaith
0
3K
Member Avatar for geekme
Member Avatar for urtrivedi
0
144
Member Avatar for ebanbury

DO you know about php datagrid428 (its free). YOu can create forms where you can add/edit/delete/print/export with ease and paging option. Also you can connect php with any database well known. I would recommend to not waste time in writing code. go for it. Warning: free version is with some …

Member Avatar for ebanbury
0
132
Member Avatar for MDanz

before one there are two single quotes not double quote [CODE]$search="q test\''1";[/CODE]

Member Avatar for urtrivedi
0
2K
Member Avatar for mbarandao

I think you are making it little complicated, This could be achevied using joining the table. So please post following 1) your table structure and 2) input to php page 3) output format expected Also tell me what is the difference between your customerid and clientid

Member Avatar for mbarandao
0
298
Member Avatar for ghosh22

Usually I follow like html1-> submit-> perl(save/fetch database) -> html2 -> submit -> perl (save/fetch) what you want is html1-> html2 (store html1 posted values in hidden variable using js) -> submit -> perl(save/fetch database) In short you need to preserve html1 values in html2's form, using javascript in hidden …

Member Avatar for ghosh22
0
228
Member Avatar for virtues

Dear Virtues, what is the difference between Chevrolet, Mercedes and Rolls Royce?

Member Avatar for urtrivedi
0
75

The End.