708 Posted Topics

Member Avatar for Josh Connerty

You are overwriting your first query with the one in the loop. Name your second query something different.

Member Avatar for somedude3488
0
108
Member Avatar for Aamit

i had a problem like this recently where I was trying to give an image preview when the mouse went over a link. I was trying to fill a div that followed the mouse and when I ran over another link it would append another image to the div, not …

Member Avatar for danishbacker
0
174
Member Avatar for mbabaali

Do you get an error with this code? [code] if (!$_POST['username'] | !$_POST['pass'] | !$_POST['pass2'] ) { die('You did not complete all of the required fields'); } [/code] The single | makes me think it would cause an error because "OR" is "||". [EDIT] I tested it on my server …

Member Avatar for somedude3488
0
199
Member Avatar for Besherek

run two queries in a while loop. [code] <?php $html = "<ul>\n"; $query = mysql_query("SELECT `cat_id`,`cat_name` FROM `tblCategory`"); while( list( $id,$name ) = mysql_fetch_row( $query ) ) { $html .= "\t<li>{$name}"; $query2 = mysql_query("SELECT `topic_id`,`topic_name` FROM `tblTopics` WHERE `cat_id` = {$id}"); if ( mysql_num_rows( $query ) > 0 ) { …

Member Avatar for Besherek
0
117
Member Avatar for veledrom

The best way is to not store them in a place accessible to the public. I put all of my config files ect. outside the web root.

Member Avatar for somedude3488
0
88
Member Avatar for sureronald

You will have to have a inactivity timeout. Probably around 20 to 30 minutes. Just have some code to check to make sure the user is still active otherwise delete them. You can also implement a javascript solution. I have seen where you can use a function run onunload via …

Member Avatar for somedude3488
0
74
Member Avatar for mandyb

I think you are going about this the wrong way. Why not take advantage of what php has to offer to simplify everthing. You can have one php page generate a different blog for each member without having to create seperate static html pages.

Member Avatar for somedude3488
0
82
Member Avatar for tanha

i don't think you can export and fill a template with php. I have however exported data from a database to excel with php. My suggestion is that you recreate the template in html and have server side code fill the template then export. Excel will read html tables.

Member Avatar for ikinothman
0
91
Member Avatar for fiddler80

i don't think this would be to hard. you can use opendir and readdir to find directories and files and then add them to a zip file (I just saw a few good zip classes online, search "php zip class" in google). then have that emailed to you, which isn't …

Member Avatar for bbeauford
0
253
Member Avatar for JoKat

reverse the order. the string you want to escape goes first, then the database connection.

Member Avatar for BzzBee
0
102
Member Avatar for justinmyoung

Have a landing page that users go to before being redirected to a site. If every image has an id in a database, then you can just change all the links in your page to something like click.php?id=[image id] on click.php you update the database with the new click and …

Member Avatar for Josh Connerty
0
236
Member Avatar for jbobfunky

Here is how I would do it. It minimizes the number of queries and should work (at least in my head it does). I don't have time to test it right now. [code] <?php $con = mysql_connect('localhost','user','password'); mysql_select_db('database',$con); $result = array(); $path = '../images/gallery_images/'; $query = mysql_query( "SELECT * FROM …

Member Avatar for jbobfunky
0
125
Member Avatar for Vai

i finished the pagination script you needed. PM me your email so i can send it to you.

Member Avatar for somedude3488
0
109
Member Avatar for rajeesh_rsn

NO. That is not enough. Javascript can be disabled. Also, instead of all of that redundant code, why not use: [code] array_map('mysql_real_escape_string',&$_POST); [/code]

Member Avatar for Designer_101
0
127
Member Avatar for ChaosTheory
Member Avatar for Merlin33069

First of all, there are some problems you need to address before anyone even thinks about downloading/using this. You have a username and password stored in plain text on the server. Not Good! A database should be used to store them. The password should be hashed as well. You also …

Member Avatar for Designer_101
0
301
Member Avatar for kssi89
Member Avatar for rm_daniweb
0
90
Member Avatar for marjan_m

So you are wanting one image to be displayed every 5 seconds, right? If that is the case, I would have php echo a javascript array with the image names. Then javascript could change the picture easily. Otherwise, I would use ajax.

Member Avatar for cwarn23
0
111
Member Avatar for Ancient Dragon

I take a more hands down approach to such a question. The acquisition of knowledge is man-kinds greatest asset and biggest liability. We strive to know as much as we can and it just hurts us. With limited time on this earth, I don't understand why we spend so much …

Member Avatar for GrimJack
0
1K
Member Avatar for brechtjah

So pretty much you are wanting a tree like the one you have in pieces, to be expandable so it won't have to be in pieces? If so, I have a basic idea on how I would do it. I would like to know if I understood your question right …

Member Avatar for somedude3488
0
141
Member Avatar for brechtjah

Here is a good example of a secure login system: [url]http://www.daniweb.com/forums/thread183049.html[/url] With proper implementation of sessions, the possibility of hacking them goes down drastically.

Member Avatar for somedude3488
0
224
Member Avatar for theimben
Member Avatar for theimben
0
105
Member Avatar for trtcom1

You are not sending the managers id in the confirmation form. You have [icode]$mGinNo = $_POST['mGinNo'];[/icode], but there is no 'mGinNo' in the form.

Member Avatar for rm_daniweb
0
1K
Member Avatar for vanessia_1999

check this thread. i helped the poster with a similar problem. [url]http://www.daniweb.com/forums/post833398.html#post833398[/url]

Member Avatar for vanessia_1999
0
183
Member Avatar for queenc

why not use an array name as the inputs name. [code] <input type="checkbox" name="check[]" value="1" /> [/code] then the results will already be in an array in the $_POST array. all you do after that is validate.

Member Avatar for rm_daniweb
0
162
Member Avatar for totalnoob

move [code] $login= $_POST['user']; $password= $_POST['pass']; [/code] under the if statement [code] if (isset($_POST['user'] ,$_POST['pass'])) { [/code] in login.php

Member Avatar for totalnoob
0
113
Member Avatar for rm_daniweb

not possible the way you are doing it. you are displaying the output of that function in a js variable. php is writing the javascript. javascript did not call the php function. the only way you can do that is by ajax.

Member Avatar for Ezzaral
0
13K
Member Avatar for OmniX
Member Avatar for Mtowns Finest

store comments in a separate table and reference them by id. it would be very inefficient to store them in the same row.

Member Avatar for theighost
0
251
Member Avatar for rajeesh_rsn

make the checkbox name "id[]" and then you can process the data using [code] foreach( $_POST['id'] as $key => $val ) { //delete query using $val as $id } [/code] thats just a simple example, there still are some security issues to take care of

Member Avatar for hemasow
0
150
Member Avatar for jjtrooper

Did you ever edit the page via a editor on the website? I have had permission problems when the file is created/changed by a script on the server.

Member Avatar for jjtrooper
0
109
Member Avatar for veledrom

Form on [url]www.111.com/form.html[/url] [code] <form action="http://www.222.com/process.php" method="post"> <!-- rest of form here --> </form> [/code]

Member Avatar for veledrom
0
1K
Member Avatar for jtyler
Member Avatar for theighost

in IE7 and Firefox3, I really don't see any difference. Which browser are you using?

Member Avatar for theighost
0
143
Member Avatar for Mtowns Finest

Why do you have a file for every location? Couldn't you just send an id to a landing page that could get the data you need. I think you might be over-complicating things. As I don't know the whole situation I can't be sure though.

Member Avatar for Mtowns Finest
0
249
Member Avatar for theighost
Member Avatar for stevehart808

This doesn't make sense to me. A session shouldn't be lost if you use absolute links. When a session starts a cookie is set with the session id for that domain. The only problem I can think of if you are changing domains or using a subdomain. I have never …

Member Avatar for chrishea
0
108
Member Avatar for orchids

I would use array_diff. The way you have your form setup, you should get an array of answers. Its really the easiest way to get data from a checkbox. Try: Your correct answers need to be in an array though, which isn't hard. [code] <?php $options = $_POST['option']; if ( …

Member Avatar for orchids
0
86
Member Avatar for csharplearner

Your variables are overwriting each other. And you are using the wrong variables names. The [icode]i[/icode] should be [icode]$i[/icode]. The method you are trying to use won't work easily either. I am typing up a solution now.

Member Avatar for csharplearner
0
318
Member Avatar for sajjad aziz

Uploading via ajax and php isn't the easiest thing to do. You have to submit a form to an iframe on the page. Here is a good example: [url]http://www.anyexample.com/programming/php/php_ajax_example__asynchronous_file_upload.xml[/url] or just google "php ajax file upload"

Member Avatar for somedude3488
0
49
Member Avatar for shasha821110

here is a regex that will make sure the password has at least 1 uppercase letter, 1 lower case letter, and a number. which is a pretty secure password. [code] preg_match( "/^.*(?=.{3,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/",$password) [/code]

Member Avatar for shasha821110
0
141
Member Avatar for webecho

that won't stop all urls. [url]http://google.com[/url] would work. for a simple solution, change "/www/" to "/(http:\/\/|www)/"

Member Avatar for webecho
0
1K
Member Avatar for grunge man

you need to escape the " in the css/html. example: [code] $css = "<style type="text/css"> body { background -color: #ffoocc; }"; [/code] should be [code] $css = "<style type=\"text/css\"> body { background -color: #ffoocc; }"; [/code] You could also use the heredoc syntax [code] $css =<<<CSS <style type="text/css"> body { …

Member Avatar for grunge man
0
237
Member Avatar for emhmk1

You should make a new password and send that to them. Thats how you have to do it. It would defeat the purpose of hashing if you could get the orginal text back.

Member Avatar for emhmk1
0
71
Member Avatar for incd

i just created a function to make dynamic multi-level menus. it uses an array to make the menus. i think if you can get the data from the database into the right format for the function it should work nicely for you. example: $menu['testing'] = array( 'href'=>'path/to/page','title'=>'Page Title' ); $menu['testing']['submenu']['test2] …

Member Avatar for somedude3488
0
1K
Member Avatar for jayb

put the validation on the same page. don't let them go to the next page until the first page is completed successfully.

Member Avatar for cwarn23
0
114
Member Avatar for london77

does $myusername have a value? you are using shorttags "<?", does your server allow them?

Member Avatar for somedude3488
0
152
Member Avatar for shasha821110

why not just use [icode]header('Location: index.php');[/icode] instead of the redirect function. i don't see a need for it.

Member Avatar for somedude3488
0
58
Member Avatar for virk1711

you will need to be more specific so we can help. we are not mind readers. general solutions rarely help, more details helps us solve your problem faster.

Member Avatar for somedude3488
0
58
Member Avatar for snefmoo

you have your emails sending to "someone@example.com". replace that with $councillor. After you do that, change the $_REQUEST['councillor'] to $_POST['emailler']. change [icode]if (isset($_REQUEST['emailler']))[/icode] to [icode]if (isset($_POST['send']))[/icode] i recommend using $_POST array instead of $_REQUEST because it more secure. you need to make this much more secure before putting this live. …

Member Avatar for nathenastle
0
95

The End.