708 Posted Topics

Member Avatar for moerpheus

Here is an upload example I created a day or two ago. It needs to be modified a bit, but you get the basic idea. Its pretty secure, making it so people can't upload scripts to the server and run them. [url]http://www.daniweb.com/forums/post905365-3.html[/url]

Member Avatar for nagarjuna.king
0
244
Member Avatar for mustafaneguib

good job for the most part. you need to work on your form validation though. i clicked submit on the register page, and it made a blank account. then i went to the login page and just pressed the login button and i got into your system. you need to …

Member Avatar for megadata
0
142
Member Avatar for PinoyDev

i would use the onsubmit attribute in the form tag for this. [code] <form action="something.html" method="post" onsubmit="return confirm('Are you sure?')"> <input type="submit" name="submit" value="Submit" /> </form> [/code]

Member Avatar for ivancarrascoq
0
2K
Member Avatar for navi17

MVC is different from 3-tier from what I have read. MVC uses a triangle type layout where 3-tier is linear (I put this in his other thread, don't see why this one was created).

Member Avatar for afsha khan
0
642
Member Avatar for cwarn23

I really hate trying to rewrite urls. I found using a basic rewrite and having php parse the url is much easier. I use a url class that parse the url. This makes it so you can change the rewrite via php and not have to edit .htaccess. Dynamically I …

Member Avatar for kingkong111411
0
217
Member Avatar for veledrom
Member Avatar for diafol
0
179
Member Avatar for ZaphodQB

why?!?!? reduce the footprint? what does that mean. I anything I have coded, I have never needed to do this, I can't even think of a reason to. btw, I don't think its possible

Member Avatar for robbz
0
392
Member Avatar for ray_broome

so pretty much you want to take the insertion uid and use it in the second table. something like this maybe. [code] $sql = "SQL HERE"; $query = mysql_query( $sql,$con ); if ( $query ) { $iid = mysql_insert_id( $con ); $sql = "SQL HERE WITH {$iid}"; $query = mysql_query( …

Member Avatar for onlysumon
0
1K
Member Avatar for kokfui

Ardav, can you elaborate on why they should use a formhandler page? I have seen you say this twice now, any reason why?

Member Avatar for diafol
0
135
Member Avatar for Vai

do you have a mailing list setup that someone can unsubscribe from. if not, i recommend using [url]www.mailing-manager.com[/url]. they will have everything you need. i have a class to export mysql database to excel file. i have a working example if you need one.

Member Avatar for sumitgupta225
0
446
Member Avatar for somedude3488

Hello, I have been working on a php/xml/ajax chat program which requires no database for the last few days and was wondering if anyone could test it out for me. It has a few bugs that I would love to have someone help me fix (I am running out of …

Member Avatar for joeidee
3
901
Member Avatar for rime

Try this: [code] <html> <form method="post" action="test.php"> User Name : <input name="UserName" type="text" id="UserName" value="User Name" size="20" maxlength="30" /> <input type="submit" name="submit" value="Submit"> </form> </html> <?php if (isset($_POST['submit'])) { mysql_connect("Localhost","username","password") or die("Failure to communicate"); mysql_select_db("mydb") or die("Could not connect to Database"); if ($_REQUEST['UserName'] == NULL) { echo "Please Enter a …

Member Avatar for Borzoi
0
216
Member Avatar for Stefano Mtangoo

I would say this is one of those problems that can't be solved with one query. Couldn't you just select the first id: [code=sql] SELECT `id` FROM `bible` WHERE `book` = 1 AND `chapter` = 1 AND `verse` = 1 LIMIT 1 [/code] and the second: [code=sql] SELECT `id` FROM …

Member Avatar for Stefano Mtangoo
0
369
Member Avatar for nickles

Can you post the rest of code so we can see what is going on? From what you gave, I can't get you a definitive answer. Also, mysql_numrows() is depreciated. Use mysql_num_rows() instead.

Member Avatar for nickles
0
107
Member Avatar for careless_monkey

You can just do a query to get the number of moons for a planet. Ex. [code=sql] SELECT COUNT(*) FROM `moons` WHERE `regularplanet_id` = 1 [/code] Looping through them would be cumbersome. I would just use a subquery to get the number of moons in one query. I can't help …

Member Avatar for careless_monkey
0
103
Member Avatar for kbohmr

Here is a function I found in about 1 minute of searching. [code] function url_exists($url) { // Version 4.x supported $handle = curl_init($url); if (false === $handle) { return false; } curl_setopt($handle, CURLOPT_HEADER, false); curl_setopt($handle, CURLOPT_FAILONERROR, true); // this works curl_setopt($handle, CURLOPT_HTTPHEADER, Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; …

Member Avatar for somedude3488
0
162
Member Avatar for zlegend

Won't happen. Search engines won't fill out your form. I would suggest a tag cloud that search engines can index. This would work in the same manner as what you are wanting.

Member Avatar for somedude3488
0
106
Member Avatar for phpcode

For this you just need to store the data in another array. Ex. [code=php] $mysqli = new mysqli('localhost','root','','test'); $sql = "SELECT * FROM food"; $results = array(); if ( $result = $mysqli->query($sql) ) { while( $row = $result->fetch_object() ) { $results[] = $row; } } $result->close(); echo "Please Select a …

Member Avatar for somedude3488
0
95
Member Avatar for stephen_UK
Member Avatar for diafol
Member Avatar for shafeequeom

Here is one I wrote a long time ago. [url]http://www.daniweb.com/forums/post832028.html#post832028[/url] and [url]http://www.daniweb.com/forums/post832231.html#post832231[/url] It shows some good practices you should use and has a pretty easy structure to follow.

Member Avatar for somedude3488
0
261
Member Avatar for raevin

If you are just trying to restrict access to the those pages, just move them outside of public domain and use the main page that you are talking about to include them. Seems simple enough to me, but I may be missing the point.

Member Avatar for raevin
0
193
Member Avatar for jigglypuff13
Member Avatar for somedude3488
0
286
Member Avatar for bwallace

Notice the "==" besides the enctype attribute. I would also remove the brackets "[]" from the name.

Member Avatar for somedude3488
0
158
Member Avatar for CEVGames

I think that using the bitwise operators (<< and >>) are causing problems. Try using < and > instead.

Member Avatar for CEVGames
0
155
Member Avatar for CEVGames

This can be tricky but its doable. The best way would be to use a mysql database and store the users answers. Each answer will need to be stored with a timestamp, so you can determine who answered first so you can distribute points correctly.

Member Avatar for CEVGames
0
288
Member Avatar for jfarny

Using firebug for Firefox, I found that on the page the ajax posts to it is saying that post.php cannot be found.

Member Avatar for jfarny
0
713
Member Avatar for TooMpa

You are mixing javascript and php. This is not possible. PHP is a server-side language where as javascript is client side. They cannot communicate with each other directly. Your best bet would be AJAX, which is the workaround to your problem. Since your experience with web development is limited, trying …

Member Avatar for TooMpa
0
147
Member Avatar for duttydea

You should be using the $_GET superglobal when trying to retrieve values from the url.

Member Avatar for somedude3488
0
149
Member Avatar for feoperro

You can do it on each page load. Just have a function to run a query to delete all records that are expired. You can also do a cron job that runs at the end of each day.

Member Avatar for feoperro
0
136
Member Avatar for kavkazi

Usually I agree with quasipickle about showing effort, but your thread is interesting and I am really bored, so I wrote a quick example on how to do it. This is just a very basic way of doing things. [code=php] <?php $data =<<<MADLIB One day, I was walking through the …

Member Avatar for kavkazi
0
582
Member Avatar for CanadianGSX
Member Avatar for CanadianGSX
0
145
Member Avatar for Brianbc

Sometimes $_SERVER['DOCUMENT_ROOT'] doesn't display the right path. /usr/local/apache/ etc. should not be there. Do: [icode]echo __FILE__;[/icode]. That should show you the real that should work.

Member Avatar for somedude3488
0
166
Member Avatar for nonshatter

Is there an "or die()" statement in your database handler? Also, never use inline error suppression. Its not very good performance wise.

Member Avatar for somedude3488
0
247
Member Avatar for feoperro

I guess you don't understand how sessions work. Even when you store sessions in a database, a cookie stored on the clients browser is still needed to identify them. I guess if you passed the session id with the url, you wouldn't need cookies (but this is very insecure and …

Member Avatar for somedude3488
0
136
Member Avatar for Joe34

fopen, fwrite, fclose or file_put_contents would do it. It would be very insecure and your site will mostly be compromised but you can try it anyway.

Member Avatar for monica singh
0
115
Member Avatar for keyroche

Are you running the numRows() function before running query()? That would cause that problem.

Member Avatar for keyroche
0
103
Member Avatar for it_1

Usually its [icode]mysql_query("call prodecure_name(params)");[/icode]. Why couldn't you find this with a search engine? Its simple.

Member Avatar for dev.vini
0
294
Member Avatar for mushget

Do you have control of the links posted on websites A and B? If so, then this is pretty easy. If not, then you might have to use the referrer, which will not always work.

Member Avatar for somedude3488
0
69
Member Avatar for cwarn23

Here is something simple, but still would cost money. This type of service will never be free. [url]http://invalid.name/wiki/index.php/Setting_up_an_SMS_Gateway[/url]

Member Avatar for chrishea
1
325
Member Avatar for ppetree

After selecting a table, it brings me to tableparam.php which has a few errors. On line 20 of the tableparam.php file you have the variable $database which doesn't exist. I am also getting: Notice: Undefined offset: 1 in C:\programming\stillwaters\public_html\forms\inc\mysqlAjaxForm.class.php on line 88 genform.php also has the $database variable error, along …

Member Avatar for somedude3488
0
362
Member Avatar for Designer_101

By coordinates, are you meaning latitude and longitude. If so, then the best way to do this is with mysql only. Ex. [code] $lat = ''; //latitude of user $lng = ''; //longitude of user $lat_col = ''; //latitude column in database table $lng_col = ''; //longitude column in database …

Member Avatar for mschroeder
0
129
Member Avatar for Stefano Mtangoo

Here is something I typed up a while ago. Its a complete login and registration system. Just create the following pages and create the database and tables. After that it should work. This system is safe from sql injection, spam bots, and cross-site request forgery. It doesn't have any xss …

Member Avatar for Stefano Mtangoo
0
1K
Member Avatar for DealthRune
Member Avatar for manzarr
0
226
Member Avatar for Metse

you need to use brackets: [code] $listbox2 = $_POST['listbox2']; [/code] is the select box multiple or not. is it returning only one value.

Member Avatar for mak_80
0
444
Member Avatar for LloydFarrell
Member Avatar for rajarajan2017
0
253
Member Avatar for cjay175
Member Avatar for chitra1

here is an upload code i just typed up for you. change the variables to what you need and also change the sql query to your database specifications. Remember: always store images in a folder on the server and have the path to the file in the database. here is …

Member Avatar for rajarajan2017
0
165
Member Avatar for Mujahid158

Sometimes, when encoding a page as UTF-8 it puts a character at the beginning of a file that causes errors like that. It might not be the case here since the error is on line 12 but it might cause you problems later.

Member Avatar for Mujahid158
0
102
Member Avatar for brendyd

You can't use session_is_registered() with the $_SESSION array. They don't work nicely together. You might also want to look at mysql_real_escape_string to prevent sql injection.

Member Avatar for somedude3488
0
169

The End.