1,257 Posted Topics
Re: 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>"; | |
Re: Just looking problem statement and code, no body can guess what you trying to do. Describe your problem precisely | |
Re: 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"]<>"") { … | |
Re: you are trying to insert wordid in wordid1 or wordid2 which do not exites in table words | |
![]() | Re: I would suggest to keep conditions and slab in mysql table rather than php. |
Re: 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 | |
Re: <?php function printvalue($val) { if($val>1) printvalue($val-1); echo $val."<br>"; return; } printvalue(100); ?> | |
Re: @TKO You could have added to code snippets. | |
Re: 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 … | |
Re: 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(" "); … | |
Re: 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> | |
Re: I think problem is in code editor | |
Re: 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"); | |
Re: change it to (with only 2 = sign) if($quantity==0 || trim($quantity)=="") { . . . } | |
![]() | Re: 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 … |
Re: > 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. | |
Re: You can set form method to post see example http://www.w3schools.com/php/php_forms.asp | |
Re: 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] | |
Re: 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 … | |
Re: 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. | |
Re: 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' | |
Re: [code]select post_id, topic,body, dateposted order by dateposted desc limit 0,10[/code] | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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] | |
Re: You already have value in drop1 and drop2, then why you want to save same value in another textbox. What is the use? | |
Re: 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 | |
Re: 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 | |
Re: 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. | |
Re: 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>"; … | |
Re: upload all php file used in this page, with sql data structure and sample data. so that we can have complete look to script. | |
Re: 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 … | |
Re: You are appending elements to same TD, instead I would suggest you to add TR TD FOR EACH ROW | |
Re: 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 … | |
Re: 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 | |
Re: 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. | |
Re: 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 … | |
Re: [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] | |
Re: [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] | |
Re: 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 | |
Re: 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) | |
Re: 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] | |
Re: 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. | |
Re: 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']; … | |
Re: 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] | |
Re: 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. | |
Re: 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] | |
Re: change line number 24 to [CODE]if($search > 0){ [/CODE] | |
Re: 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. |
The End.