suzzane2020
Members-
Posts
233 -
Joined
-
Last visited
Never
Everything posted by suzzane2020
-
if(($Actual-$Target)==2) { $color="Amber"; return $color; }
-
GET variable coming up empty when inserting integers
suzzane2020 replied to jumpenjuhosaphat's topic in PHP Coding Help
sorry but tht wudnt make a diff anyways.. -
GET variable coming up empty when inserting integers
suzzane2020 replied to jumpenjuhosaphat's topic in PHP Coding Help
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.. -
GET variable coming up empty when inserting integers
suzzane2020 replied to jumpenjuhosaphat's topic in PHP Coding Help
tr usin GET instead of 'get' in the form , since u've used tht in te second page.. nt sure but try -
GET variable coming up empty when inserting integers
suzzane2020 replied to jumpenjuhosaphat's topic in PHP Coding Help
how are u passing te variable or value to this page..thru a form or a link.?.and does the form use GET method? -
do u get any error message?
-
ran my script thru the validator n bout 200 of the error points to the usage of & instead of & is $amp; te actual way ,wud it cause any serious issues if nt corrected..
-
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; }
-
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
-
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..
-
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
-
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");
-
hmm it works fine in ie..u said smethn bout saving it in a format..tried saving it in te usual way?
-
how to connect a database while using in dreamweaver
suzzane2020 replied to dream25's topic in Microsoft SQL - MSSQL
just add these lines mysql_connect ("localhost", "database username", "database password if any"); mysql_select_db ("database name"); -
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?
-
hw about tryin include instead of require?
-
[SOLVED] get the autoincrement value of newly inserted row
suzzane2020 replied to anatak's topic in PHP Coding Help
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 -
hw bout tryin single quotes instead of double ater echo.. nt sure..im a newbie ..but i have come across te same problem
-
sorry ..in the first while loop its $query instead of $res.
-
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
-
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)
-
thank u so much Got scared when i saw 20 errors on the same issue Thnx again
-
plz advise
-
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 & Is it essential ..wud it develop problems later if i dont change it? thnks in advance
-
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