1,741 Posted Topics

Member Avatar for carobee
Member Avatar for COM84TxZycx
Member Avatar for nav33n
0
34
Member Avatar for Weezle
Member Avatar for Jessicca
Member Avatar for sudane
Member Avatar for anand_banse
Member Avatar for torcakey
Member Avatar for Gimmick
Member Avatar for nav33n
0
102
Member Avatar for coffeepot!
Member Avatar for lesouvage
Member Avatar for prashish_raj

[quote] $query = "SELECT id, topic, event, date FROM events ORDER BY 'id' DESC LIMIT 5"; [/quote] Should be [code=mysql] $query = "SELECT id, topic, event, date FROM events ORDER BY id DESC LIMIT 5"; [/code] Cheers, Naveen

Member Avatar for nav33n
0
159
Member Avatar for ShawnCplus

[QUOTE=The Dude;536019]oops i didnt notice the extra 0 there.[/QUOTE] Dude! you noticed an extra 0 there :P Btw, Congrats ShawnCplus!

Member Avatar for sneekula
1
144
Member Avatar for 808girl
Member Avatar for Drenalin
Member Avatar for icsantos
Member Avatar for Just a beginner
Member Avatar for Serunson
0
50
Member Avatar for RINJE
Member Avatar for craigdmc
Member Avatar for jmaldrich
Member Avatar for enque
Member Avatar for Duit
Member Avatar for nav33n

Hello, The dropdown menus doesn't work [url=http://www.daniweb.com/forums/forum44.html] here [/url] and [url=http://www.daniweb.com/forums/search.php?do=getnew&f=44] here [/url]. I tried it in FF as well as IE6. Is it possibly a bug ?

Member Avatar for nav33n
0
100
Member Avatar for isomillennium

[quote]$html = implode('', file($url_to_fetch)); // this is the code that gets the code fron that url into an array..[/quote] It won't gets the code from the url into an array. Try [code=php] $html=htmlentities(implode("",file("http://www.daniweb.com"))); [/code] $html will have the contents(javascript,css,..) of [url]www.daniweb.com[/url] as a string.

Member Avatar for nav33n
0
146
Member Avatar for werks

[icode]concat(firstname,lastname) as name [/icode] More on concat [url=http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat]here[/url].

Member Avatar for nav33n
0
96
Member Avatar for lydia21

print out the query, execute it in mysql or phpmyadmin. I think $cps and $lps are not passed correctly OR the values of $cps and $lps doesn't return anything when you limit.

Member Avatar for lydia21
0
85
Member Avatar for joshSCH

[QUOTE=cscgal;535818]Something is in the works regarding this but those of you without access to Area 51 will have to wait and be surprised.[/QUOTE] Wow! I can't wait to be surprised :P

Member Avatar for nav33n
-1
165
Member Avatar for dalefish

[code=php] $query = "UPDATE $table SET '$io='$io2', $pp='$pp2', $sn='$sn2', $re='$re2', $sd='$sd2', $ed='$ed2', $dp='$dp2', $rn='$rn2' WHERE ID='$id'"; [/code] Look near SET '$io. An extra ' . :) Remove it!

Member Avatar for nav33n
0
460
Member Avatar for Morty222

[code=php] $i=0; while($row=mysql_fetch_array($result)){ $photo=$row['photo']; if($i==0) { //initially, i is 0, so it inserts a new tr. echo "<tr>"; } $i++; echo "<td>$photo</td>"; //add the photo if($i==4){ //adds 4 photos, once its done, make i as 0 to insert a new <tr>, end the existing <tr>. $i=0; echo "</tr>"; } } …

Member Avatar for nav33n
0
101
Member Avatar for werks

What happens is, the query ends when it encounters ' in hilgard's. Escape it with \. Eg. [code=php] 'SELECT * FROM `table3` WHERE name LIKE '%hilgard's%' [/code] To escape the single quote, you can use addslashes (or mysql_real_escape_string if your database is mysql). Or You can use double quotes. [code=php] …

Member Avatar for werks
0
92
Member Avatar for Beks

Check where include directory is. If you are executing a script in, say for example, www/site/test/1.php and you are trying to include a file eg. functions.php, which is in www/site/include folder, you should give, [inlinecode]include ("../include/functions.php"); [/inlinecode] because that's where the file is. If you give, [inlinecode]include ("include/functions.php"); [/inlinecode] it …

Member Avatar for Walkere
0
148
Member Avatar for timvdwest
Member Avatar for jinchiruki

What's the complete error ? And what do you mean by command at server side ?

Member Avatar for nav33n
0
107
Member Avatar for lydia21

He selects a keyword from the dropdown ? Well, then, you can simply use, [inlinecode]$query="select * from table where col like '%$value%'"; [/inlinecode] $value is the selected value of the dropdown.

Member Avatar for lydia21
0
164
Member Avatar for Vai

Thats because you dont have a condition in your update query. [code=php] update bridal_songs set artist='someone'; update bridal_songs set track='something'; [/code] would update all the artists with 'someone' and all the tracks with 'something'. Have some condition like, [code=php] update bridal_songs set artist='someone' where id='1'; update bridal_songs set track='something' where …

Member Avatar for nav33n
0
73
Member Avatar for keynan_toht17

[url]http://www.google.co.in/search?q=why+penguin+is+the+logo+of+linux&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a[/url]

Member Avatar for nav33n
0
55
Member Avatar for ddwatkins

Well, You mean, based on one dropdown's value, the other dropdown should be populated ? You can use ajax to do this. If you don't have enough time to learn ajax, then the simplest solution would be to submit the page when 'onchange' event occurs in the first dropdown. [code=php] …

Member Avatar for ddwatkins
0
301
Member Avatar for niladri.user

As ShawnCplus has suggested, learn the basics of php programming. The basic working of Login and logout script is simple. A login script takes username and password as input, check the table if the username with that password exists. If yes, then add the username to the session and redirect …

Member Avatar for nav33n
0
312
Member Avatar for Morty222

[code=php] <?php //connection //select db $selected_id=$_POST['select']; $query="Select * from table"; $result=mysql_query($query); $options=""; while($row=mysql_fetch_array($result)){ $name=$row['name']; $id=$row['id']; if($selected_id==$id){ $selected="selected": } else { $selected=""; } $options.="<option value='$id' $selected>$name</option>"; } ?> <html> <body> <form method="post" action="test.php"> Select something: <select name="select"> <?php echo $options; ?> </select><br /> <input type="submit" name="submit" value="submit"> </form> </body> </html> [/code] …

Member Avatar for nav33n
0
124
Member Avatar for Web_Student
Member Avatar for dami06

Simple. Fetch all the questions from the table and print it as follows. [code=php] $query="Select question from question_table"; $result=mysql_query($query); $i=1; echo "<form method=\"post\" action=\"questionpaper.php\">"; while($row=mysql_fetch_array($result)){ $question=$row['question']; echo $i."." $question."<br />"; // to print 1. What is your name ? echo "<input type=\"text\" name=\"answer$i\" /><br />"; \\ to have unique textboxes …

Member Avatar for nav33n
0
650
Member Avatar for lordx78

No. Do what he has said in the previous post. ie., [code=php] echo "<script type='text/javascript'>" echo "redirTimer()"; echo "</script>"; [/code] But, Change this line in your redirTimer function. This [code=javascript] self.setTimeout("self.location.href redirURL;",redirTime); [/code] To [code=javascript] self.setTimeout("self.location.href=redirURL;",redirTime); [/code] That ll solve your problem.

Member Avatar for nav33n
0
180
Member Avatar for richie513
Member Avatar for amin007

[code=php] WHERE siri = '".$_POST[status_batch][$i++]."' and ".$_POST[status_batch]." = '".$_POST[status_batch]."' [/code] Wouldn't work since $_POST['status_batch'] is an array. Assign the value of $_POST['status_batch'] to a variable and pass the index . For eg, [code=php] $arr=$_POST['status_batch']; for ( $f = 0 ; $f < $fields ; $f++ ) { echo $arr[$f]; //... …

Member Avatar for amin007
0
108
Member Avatar for Venom Rush

Your code works fine on my computer. You are probably getting 'access denied' because you don't have enough privileges for the mysql user. Use [url=http://dev.mysql.com/doc/refman/5.0/en/grant.html] grant[/url] to grant permissions for the users.

Member Avatar for nav33n
0
585
Member Avatar for tomsta
Member Avatar for okonjiaustin

Its not a good idea to store images in the database. As Ryan_vietnow has mentioned, it will add on to the server load, slows down the execution of the script and takes a lot of time to display it if you have more (say 100 images ) per page!

Member Avatar for nav33n
0
142
Member Avatar for usc87bb

[code=php] <td><img src="<?php echo $photo_name; ?>" width="30" height="30"></td>[/code] Like that !

Member Avatar for nav33n
0
63
Member Avatar for hillfolk
Member Avatar for rt7878
Member Avatar for jephthah

The End.