Jump to content

suzzane2020

Members
  • Posts

    233
  • Joined

  • Last visited

    Never

Everything posted by suzzane2020

  1. if(($Actual-$Target)==2) {   $color="Amber";   return $color; }
  2. k im nt sure if its a copy paste error but it isnt <input type="submit" name="submit" value="Search" i guess u've missed to close the input tag..
  3. tr usin GET instead of 'get' in the form , since u've used tht in te second page.. nt sure but try
  4. how are u passing te variable or value to this page..thru a form or a link.?.and does the form use GET method?
  5. ran my script thru the validator n bout 200 of the error points to the usage of & instead of &amp; is $amp; te actual way ,wud it cause any serious issues if nt corrected..
  6. or better still hw bout checkin i te textbox has a value and if it does insert that n i not the select value if($other!="") {   $value=$other; } else {   $value=$select; }
  7. do u generate the textbox dynamically..like when the user selects other in te select option te textbox appears or isit included in your html
  8. i guess wat ur trin to do is check if the select box has 'other' and if so enter the 'other' value in the database..k if this is so u cud check this before insertin when u get the values thru post check:  if($select1=='other') {   $select1=$other1; } else {   $select1=$select1; } and then insert the $select1 as u usually do..
  9. hmm..sorry hve no idea bout sql server..but i guess te u need to use a particular keyword tht gives u distinct titles and does nt repeat them..somethn equivqalent to DISTINCT in sql server
  10. put in a DISTINCT keyword in the second query $rs2 = $db->Execute("SELECT DISTINCT Title as lawstitle, CreationDate as date, Name as name, LawID FROM laws WHERE LawID = '$thelawid' ORDER BY CreationDate DESC");
  11. hmm it works fine in ie..u said smethn bout saving it in a format..tried saving it in te usual way?
  12. just add these lines mysql_connect ("localhost", "database username", "database password if any"); mysql_select_db ("database name");
  13. i tried out the same code and it worked fine...so te prob shud be with te path..do u have the ile tht u include in te same directory as the index file?
  14. hw about tryin include instead of require?
  15. u cn do it this way too.. just ater inserting the new row INSERT INTO tbl_name (col2,col3) VALUES(firstname, lastname); write a select query on the whole table $query=mysql_query("select * from tbl_name"); while($row=mysql_fetch_array($query)) {   extract ($row); } echo $id; //it wud the (autoincrement)id u just inserted
  16. hw bout tryin single quotes instead of double ater echo.. nt sure..im a newbie ..but i have come across te same problem
  17. sorry ..in the first while loop its $query instead of $res.
  18. yup u cud use a quer like this $query=mysql_query("select * from catgory"); while($row=mysql_fetch_array($res)) {     //second query goes here $query2=mysql_query("select subcategory from subcategory(tablename) where connectinid='$row["id"]'"); while($row2=mysql_fetch_array($query2)) {     echo $category;       echo $subcategory; } } //u cud use html to display it in a better format
  19. I guess wat u mean here is tht 1 is the category and 2,3 are its subcategories in tht case u need to put them in dif tables with a connecting id 1st table id(autoincrement)    category 1                          category 1 2                          category 2 table 2 connectingid(nt autoincrement.u need to insert it)                    subcategory 1                                                                                        sub1(subcategory of category 1) 1                                                                                        sub2(subcategory of category 1) 2                                                                                        sub3(subcategory of category 2) 2                                                                                        sub4(subcategory of category 2)
  20. thank u so much Got scared when i saw 20 errors on the same issue Thnx again
  21. hi, I ran my homepage thru total validator and got th same error on almost 100 lines where i have my anchor tag <a href="hcatresults.php?pid=<?php echo $pid;?>&functional=<?php echo $farray[$i];?>"> </a>                                                               The error pointed to the & symbol between the values passed,it seems the & should b replaced by &amp; Is it essential ..wud it develop problems later if i dont change it? thnks in advance
  22. thank u so much or ur views...when i run my code thru a vaklidator do i get to c where the error lies..im too nw to php..n its just ben 6 months since i started out..need all the help i can get.. thank u once again
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.