1,257 Posted Topics

Member Avatar for sainigks

in the marksheet.php page you can access selected student by following line of code, in the begnining of the page echo $_POST['st']; or you dump post array to check what is posted like echo "<pre>"; print_r($_POST); echo "</pre>";

Member Avatar for Biiim
0
181
Member Avatar for kjeu_kach

Just looking problem statement and code, no body can guess what you trying to do. Describe your problem precisely

Member Avatar for kjeu_kach
0
248
Member Avatar for whitecoder

I have written line, 72 to 92 again , you should not if else structure. <?php if ($_REQUEST["city"]<>"") { $sqla = " AND (city LIKE '%".mysql_real_escape_string($_REQUEST["city"])."%')"; } if ($_REQUEST["state"]<>"") { $sqlb = " AND state='".mysql_real_escape_string($_REQUEST['state'])."'"; } if ($_REQUEST["county"]<>"") { $sqlc = " AND (county LIKE '%".mysql_real_escape_string($_REQUEST["county"])."%')"; } if ($_REQUEST["status"]<>"") { …

Member Avatar for smantscheff
0
2K
Member Avatar for Verygoodguy
Member Avatar for codemasters
0
148
Member Avatar for LastMitch
Member Avatar for anita_86

Try to keep separate login for updation and html form. so upto line 53 keep code in process.php later part keep in same file. In format action call process.php

Member Avatar for Biiim
0
360
Member Avatar for decade

<?php function printvalue($val) { if($val>1) printvalue($val-1); echo $val."<br>"; return; } printvalue(100); ?>

Member Avatar for blocblue
0
1K
Member Avatar for Tko_1
Member Avatar for Xephis

You may try this code <?php $userprofile= $_SESSION['name']; $sql = mysql_query("SELECT a.Playername, a.Rating,b.avg_rating FROM userrating a left outer join (select Playername,avg(Rating) avg_rating from userrating group by Playername) b on a.Playername=b.Playername WHERE a.Ratedby = '$userprofile'"); echo "<table> <tr> <th> Name </th> <th> My Rating </th> <th> Average Rating </th> </tr>"; while …

Member Avatar for Xephis
0
169
Member Avatar for freemancomputer

1) I am adding following code to line number 13 as <div id='showrateimg'> 2) I am adding follwing code to line number 57 </div></td> 3) I am rewriting your success function success: function() { $('#div_show').text('You have rated ' + movie_title_s + ' at a ' + movie_rating_s).show('fast'); //additional code $("#showrateimg").html("&nbsp;"); …

Member Avatar for urtrivedi
0
206
Member Avatar for Shyam.MT

I dont think simple javascript code can do that. I am not sure jquery can do that or not. Simply why dont you keep both descripion and code in the option display value together. <option value='ls2'>Solution Department (ls2)</option>

Member Avatar for urtrivedi
0
77
Member Avatar for fantasma
Member Avatar for Violet_82

remove line 20 and copy it to line number 18 (declare image outside swap funciton like you do for frame variable) var image = document.getElementById("the_image");

Member Avatar for Violet_82
0
121
Member Avatar for grako84

change it to (with only 2 = sign) if($quantity==0 || trim($quantity)=="") { . . . }

Member Avatar for fobos
0
241
Member Avatar for nova37

I assume that id is auto increment. I am not sure about performance, but this way you can try updting 1x using only 1 query insert into 1x (id, domain) select id, domain from 2x where domain not in (select domain from 1x); Now we assume that all rows from …

Member Avatar for smantscheff
0
214
Member Avatar for breakzzzz20

> while ($row = mysql_fetch_array($result)) Is used after select statment to display/process selected reords, but you have inserted record not selecte before while loop. So you need one more select statment before while loop.

Member Avatar for breakzzzz20
0
236
Member Avatar for nchy13

You can set form method to post see example http://www.w3schools.com/php/php_forms.asp

Member Avatar for urtrivedi
0
346
Member Avatar for kram54

I hope this works. update [rotadb].[dbo].[Rota],[rotadb].[dbo].[RotaBos], [rotadb].[dbo].[RotaBa],[dentime].[dbo].[den] set [rotadb].[dbo].[Rota].[ldchangetime] = [dentime].[dbo].[den].[time] where [rotadb].[dbo].[Rota].[pRotaBos] = [rotadb].[dbo].[RotaBos].[Rotabos_rowid] and [rotadb].[dbo].[RotaBos].[pRotaBa]=[rotadb].[dbo].[RotaBa].[RotaBa_rowid] and [rotadb].[dbo].[RotaBa].[skod]= [dentime].[dbo].[den].[skod]

Member Avatar for kram54
0
123
Member Avatar for nathmack

I have changed line 16, 20 and 26 yof your code above. 1) In 16 you are fething your row only once, you need loop through query2 result. 2) In 20 now I am using new array I set in loop, to implode. 3) In 26 I have removed single …

Member Avatar for |-|x
1
148
Member Avatar for Venom Rush

in the begnining of the script write this 2 lines. <?php set_time_limit(1200); ignore_user_abort(true); ?> This script will run for 20 mintes (1200 seconds), default max time is 30 seconds. Due to second line, script will continue running even user close or stops browser.

Member Avatar for pritaeas
0
190
Member Avatar for Jfunch

You need to use 2 separate queries. Current query will give distinct combination of 2 colums SELECT DISTINCT category FROM product WHERE subcategory = '$subcategory' SELECT DISTINCT brand FROM product WHERE subcategory = '$subcategory'

Member Avatar for smantscheff
0
103
Member Avatar for fuggles

[code]select post_id, topic,body, dateposted order by dateposted desc limit 0,10[/code]

Member Avatar for KMon
0
78
Member Avatar for Argyrisv

1) Do you want to update database in the process form. (you did not mention form action and form method) 2) You can also keep hidden value before button element may be id of table or email id or user id which ever is primary key of table, so that …

Member Avatar for Biiim
0
2K
Member Avatar for aianne

Calculation of grade must be one time process and it must be done by faculty or administrator, in that process it should store calculated grades in some table. Then that calculated grades can be shown to students any other who knows roll number.

Member Avatar for urtrivedi
0
500
Member Avatar for mmazeemahmad

You can use union statment to merge multiple query result in one. But take care all queries must have same number of columns and of same type from proper output [CODE] SELECT DISTINCT 'country' coltype, dbo.Add_Employees.country colvalue, COUNT(Add_Employees.employee_uniqueId) AS total FROM dbo.Add_Employees GROUP BY(Add_Employees.country) UNION SELECT DISTINCT 'city' coltype, dbo.Add_Employees.city …

Member Avatar for adam_k
0
293
Member Avatar for laura301019

if userid is numeric then ur query is fine, but if user id is text then u must enclose value with single quote. [CODE] $query="INSERT INTO gamescores (userID, visitScore) VALUE ('$formUser', $points)"; $query2="UPDATE gamescores SET userID='$formUser', visitScore=$points";[/CODE]

Member Avatar for Biiim
0
113
Member Avatar for rainny

You already have value in drop1 and drop2, then why you want to save same value in another textbox. What is the use?

Member Avatar for rainny
0
218
Member Avatar for jbennet

NO it cant go wrong, becuase even last_inert_id gives value as per connection, but value is unique for table. Just you need to be careful in setting primary key , foreign key in your table to avoid insertion of duplicate recrods

Member Avatar for urtrivedi
0
103
Member Avatar for hamaraquetta

your result tables are not good, you can have only one result table with column class code in it. you must say table name as student_result (resultid, classcode, ...... other columns) where class code can be one, two, nursary like that

Member Avatar for urtrivedi
0
87
Member Avatar for infinitus

I suggest you to break up all problem in 10 threads one by one, because as discussion progresses, it will be difficult to handle all 10 problemns in one thread. Start with most important question, Also post next question after previous is solved.

Member Avatar for urtrivedi
0
323
Member Avatar for mlhazan

Print_r can only show dump values. You can try following code to show values on screen in better manner. [CODE]<?php echo "<table>"; echo "<tr>"; echo "<td>ID</td>"; echo "<td>First Name</td>"; echo "<td>Last Name</td>"; echo "</tr>"; for ($i=0;$i<count($mysql->arr2);$i++) { echo "<tr>"; echo "<td>{$mysql->arr2[$i]['id']}</td>"; echo "<td>{$mysql->arr2[$i]['first_name']}</td>"; echo "<td>{$mysql->arr2[$i]['last_name']}</td>"; echo "</tr>"; } echo "</table>"; …

Member Avatar for mlhazan
0
94
Member Avatar for phpbeginnerx

upload all php file used in this page, with sql data structure and sample data. so that we can have complete look to script.

Member Avatar for urtrivedi
0
147
Member Avatar for DriftingSteps

dear driftingsteps If you your code is in pure html then you may not save your code from being stolen. But now a days I do not think any website in pure html. So I guess you have developed your site in php-mysql or any other such language. If you …

Member Avatar for 098
0
2K
Member Avatar for solomon_13000

You are appending elements to same TD, instead I would suggest you to add TR TD FOR EACH ROW

Member Avatar for lordjohar
0
797
Member Avatar for h2so4_2003

following is the sample, you can have 2 forms and onclick you can use javascript fuction to post your values to xyz.php. [CODE]<script lang='javascript'> function delete_record(id,act) { document.getElementById('ID').value=id; document.getElementById('action').value=act; document.actionform.submit(); } <script> <form name='actionform' id='actionform' action='xyz.php' method='post'> <input type='hidden' name='ID' id='ID'> <input type='hidden' name='action' id='action'> </form> </form> <form name='mainform' id=mainform …

Member Avatar for ko ko
0
2K
Member Avatar for johndoe111

this design looks good, but i will suggest you one thing add one more column in orderline (orderid, it is referred from order table) remove orderlineid from order table

Member Avatar for scarcella
0
155
Member Avatar for pankaj.garg

If you are not going to use data after one year, at the end of year, can trunc year old data. to keep on required rows. I think mysql will handle millions rows without any problem.

Member Avatar for pankaj.garg
0
176
Member Avatar for amansingh

I dont know how your query is working, because column list and group by list is not matching in your query. to find min only by arline [code] $sql="SELECT MIN(price),airline FROM faresheet WHERE cabin = '".$q."' AND des = 'DEL' GROUP BY airline ORDER BY MIN(price) ASC"; [/code] to find …

Member Avatar for amansingh
0
158
Member Avatar for dirnthelord

[code] update enrolled set grade= case when marks <35 then 'F' when marks>=35 and marks <45 then 'D' when marks>=45 and marks <55 then 'C' when marks>=55 and marks <65 then 'B' ELSE 'A' END [/code]

Member Avatar for datakeyword
0
3K
Member Avatar for naeemnur

[CODE]$query="SELECT a.id as club_id, a.fr_name as club_name, b.id as nation_id, b.fr_name as nation_name, c.id as player_id, c.fr_fname as player_name FROM fr_clubs as a INNER JOIN fr_nations as b ON a.id = b.club_id INNER JOIN fr_players as c ON b.id = c.nation_id LIMIT ". $paginate->start .",". $paginate->limit[/CODE]

Member Avatar for naeemnur
0
993
Member Avatar for ravi_91

If your computer is in LAN, then, you can try to open it from other pc like [url]http://yourcomputername/pagefolder/page.jsp[/url] I am assuming that it is running successfully in your computer like [url]http://localhost/pagefolder/page.jsp[/url]. You also need to check firewall in your computer, usually port no 80 for http service

Member Avatar for peter_budo
0
136
Member Avatar for agriz

If possible then you must refer to country id rather than country code, I means I think numerice referece will perform better than varchar reference. If that is not possible then, Also create key for short_code in both table (country and city table)

Member Avatar for agriz
0
192
Member Avatar for bflack

You are almost done, just add column names in the select list you want to access. Your query is alright. [CODE]$query="SELECT userprofile.profpic, userprofile.lastname, userprofile.firstname FROM userprofile INNER JOIN accntinfos ON accntinfos.accntnum=userprofile.accntnum";[/CODE]

Member Avatar for bflack
0
149
Member Avatar for billmudry

This is very well explained, but I still need the sql script of 2 tables with sample data. Sample data means, you give say 100 rows in one table and some more rows in source table. So that we can help you build the exact query.

Member Avatar for urtrivedi
1
2K
Member Avatar for LegoBeast

you must exit after using header function [CODE]<?php $name = $_POST['name']; $bedrijfsnaam = $_POST['bedrijfsnaam']; $adres = $_POST['adres']; $plaats = $_POST['plaats']; $postcode = $_POST['postcode']; $email = $_POST['email']; $phone = $_POST['phone']; $socialemedia = $_POST['socialemedia']; $website = $_POST['website']; $Type1 = $_POST['Type1']; $type = $_POST['type']; $productendiensten = $_POST['productendiensten']; $productendiensten_anders = $_POST['productendiensten_anders']; $vragen = $_POST['vragen']; …

Member Avatar for urtrivedi
0
250
Member Avatar for peterpa

You want return status so I would suggest you to create function in mysql [url]http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html[/url]

Member Avatar for peterpa
0
113
Member Avatar for HemZone

1) Export database from one 2) you must check whether there is table name conflict or not. 3) you need to import exported file to first one 4) change code in pages where second database is used.

Member Avatar for urtrivedi
0
62
Member Avatar for jonnyboy12

You must use loop to display the multiple result [CODE]while($row = mysql_fetch_array( $result )) { echo "Name: ".$row['name']." "; echo " Age: ".$row['age']."<br>"; }[/CODE]

Member Avatar for urtrivedi
0
138
Member Avatar for gilgil2
Member Avatar for mayreeh

md5 is function you can use one way only, you can not find the password by any reverse kind of function. better you regenerate new password in case user forget password.

Member Avatar for EnjoyYourMeal
0
114

The End.