181 Posted Topics
Re: You need to create a system to translate the page name (maybe like admin or home) to a number using switch. Example: [code=PHP] <?php //Get Page $page = $_GET['id'] //Translate Text to Number switch($page) { case 'home': $id = 1; break; case 'admin': $id = 2; break; default: $id = … | |
I am working on a project that requires a MySQL database to store important information (So a little security would be nice). I realize that some users can't find or don't have MySQL databases with their hosting accounts. I would like to provide users with the ability to get a … | |
MySQL is great, especially for storing large amounts of data such as users, event logs, and tables for forms or CMS systems. There is one big problem though that faces PHP/MySQL developers: MySQL injection. Hackers usually try something like a username and password of ' a='a'. This is a MySQLer's … | |
Re: We would need to see the code line it is referring to. Also, for quick fixes highlight the error and remove the personal information (ie. line number and file) and do a Google text. (Hint: The error is probably going to be the bold text) | |
Hello, I am working on a login script for a personal site. The problem is though, I need to have the best and most secure protection there is for the login system I am creating (I will not go into specifics but the users will have access to very sensitive … | |
Re: [url]http://soogle.exofire.net[/url] is really cool!!! It searches for freeware!!!!!!! | |
Re: What you have to do is get a hosting account with MySQL (Probably a really big database or an unlimited one) and PHP. Then simply run the .sql files from your PhpMyAdmin (or other MySQL manager) and copy the files to your site. You might consider using an old computer … | |
Re: Simply close the last else statement: [code=php] }else{ echo @$_REQUEST['code'].' Codigos falso'; } [/code] Also, I would blank out your mysql password. A simple googling could reveal the mysql host you use and allow someone to edit your mysql databases. | |
Hello, I am currently having a problem with .htaccess. I am trying to use mod_rewrite to rewrite: [url]http://www.example.com/test/test?word=test[/url] to [url]http://www.example.com/test/test.php?word=test[/url]. The only problem is the GET vars can have different names. So another example url could be [url]http://www.example.com/test/test?test=true&form=1[/url] or even [url]http://www.example.com/test/test?search=Google&type=Web[/url] etc. For this I wrote a simple PHP script … | |
Re: Here is what I suggest (Might Sound Complicated): Create a SQL database with a table that has a seat name, number, and section, etc. and then a value if the seat is filled. Then have php create a table and fill the empty seats with a bgcolor of red (#FF0000). … | |
![]() | Re: You would probably want to use a MySQL table to store the emails. Then all you would have to do is write a php script that you can use to send email (Just make sure to password protect it for security!!). PHPList is a pre-coded, easily customizable PHP mailing list … |
Re: Just a suggestion: On line 17 I would not include the SQL query. While the chances of a bad person seeing this kind of information is unlikely, it adds some vulnerability to your site. Simply use this code: [code=PHP] $result = mysql_query($query) or die ("MySQL Error: ".mysql_error()); [/code] | |
Re: If you don't have scripting abilities you may consider an external Javascript file. Take this example: header.js: [code=JavaScript] function header() { document.write("MySite <a href='index.html'>Home</a> <a href='about.html'>About</a> etc. "); //Put the header code here //Note when placing the header code, make sure you replace " (Double Quotes) with /" (Slash and … | |
Re: Try [URL="http://www.aflax.org/"]AFLAX[/URL]. It is an AJAX for Flash. You can use some ActionScript to call an AFLAX command to send a message to a Server Page (I prefer PHP, but you can use anything that you are comfortable with) which processes the request and updates the record in a file … | |
Re: I would suggest first learning CSS. It has become a web standard for styling HTML text, images, etc. Once you have a [B]very[/B] good understanding of CSS (It's pretty important to know it!!!), I would suggest going on to JavaScript. If you are creating forms you will want to have … | |
Hello, I have a question about PHP. I realized that you can use the POST variable to get data from a form submitted with the type post, but does the order of the fields matter. Example: index.html: [code=HTML]<HTML> <HEAD> <TITLE>Form</TITLE> </HEAD> <BODY> <FORM name='test' action='submit.php' method='post'> Name: <INPUT type='text' name='name' … | |
Hello, I was browsing DaniWeb and found a code snippet that allows PHP files to be static and more search-able by browsers. I notice that certain pages of DaniWeb are PHP (such as this new thread page), yet most are html files. I know this may seem nosy, but I … | |
![]() | Re: Here is an interesting statistic: Yahoo has hundreds of HTML/CSS errors that don't comply with standards. No website is absolutely prefect when it comes to standards. (Not like I'm volunteering to check!!!). I would suggest simply using a less-strict standard. I usually code in XHTML 1.0 Transitional. |
Hello, If you have ever looked at the URL of a Google search (I'm sure we all have!) you will notice that the script called is called search. So a search could be [icode]http://www.google.com/search?q=Dani+Web[/icode]. I notice that the search script file has no extension such as PHP or JSP. Does … | |
Hello, I installed the Vista Transformation pack a few weeks ago and I have decided to remove it and replace it with a nicer looking theme that Lifehacker wrote about. I restored my computer back to before the installation, but for some reason there are still parks of the pack … | |
Hello, I am creating a feature for a site, that when you click a button changes specified text to a textbox that lets you edit the text. When the user presses enter, the textbox will dissapear and the text typed will be in it's place. This is so I don't … | |
Hello Everyone, I have a little problem with my PHP script. I have created a very detailed system using PHP and wish to upload it to a computer running XAMPP on my network. Because the file will be uploaded to a normal computer all of my PHP files will be … | |
Re: No, but I would start off with a basic HTML form like such: [code=HTML] <form name='example' action='submit.php' method='post'> How would you rate the following? Select 1-5 for each.<br/> HTML: <select name='HTML'> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select><br/> JavaScript: <select name='JS'> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select><br/> PHP: <select name='PHP'> <option>1</option> … | |
Re: I would be a great help if you posted your code so we can see [I]exactly[/I] what you are talking about!!! | |
Hello, I have a problem with my form validator. For some reason it will always return true when it should return false and display and error message (either about a blank username or password). Here is my javascript: [code=JavaScript] <script type='text/javascript'> function ValidateLogin(form) { var error=false; document.getElementById('userError').style.display = 'none'; document.getElementById('passError').style.display … | |
Hello Everyone, I was browsing the web today and I cam across a site that had a file called script.do. I have never seen this .do extension and I was wondering the language that it referred to. If anyone knows what the .do programming language is, please tell me. Also, … | |
Re: Well I would suggest giving each product a category (that has a cat number) and then within each category, give each product number (id). Then the address would be something like: products.php?cat=5&id=1 With that you could also use it to browse each category with one PHP script. Ex. products.php?cat=5 Try … | |
Re: Please post the link. Also note, that most of the time, Dreamweaver's deign mode is not what you will see in your browser. It's best to simply switch between Code mode and an internet browser with the page loaded. | |
Re: Also, with the price of ink today, many people are using freeware programs to remove the background from printed documents to save ink and paper!! | |
Re: Javascript. You can use it's date function to put the time, etc. into the field. Create a javascript function to validate your form and the add [icode]onsubmit="return Validate(this);"[/icode] to your form. The validate function can validate the form and then if valid, put the date, etc into a textbox and … | |
Re: Well, you could disable embedding on the video, but that probably wont fix it. The best thing to do would be to not upload videos that you don't want that to happen to. Like the age old saying: "Once on the internet, always on the internet." No matter how hard … |
The End.