492 Posted Topics
Re: Do you mean double as in it echos 1.15 or it displays 0.575 twice? | |
Re: Rather than using [code] $date = date("d-m-Y"); [/code] Save the date as a timestamp in an int(11) field, do not save dates as DATETIME, DATE or any other date specific SQL type.. Since this will be a number, you can then sort by the date column in descending order to … | |
Re: [QUOTE=BestJewSinceJC;1007838]The only problem I really have with Vista is the annoying, consistent 'do you really want to do X activity' messages and the fact that it hogs my RAM (which isn't a problem on my 4GB computer I now have). All I use is ad-aware and I have never had … | |
Re: Take a look at [url]http://uk.php.net/manual/en/function.exec.php[/url] | |
Re: Assuming the server is running Apache, specific rewrite questions would be best posted in the Apache forum: [url]http://www.daniweb.com/forums/forum33.html[/url] But take a look at this: [url]http://corz.org/serv/tricks/htaccess2.php[/url] | |
Re: Your problem will be this line: [code] <form action='manager_employee_select.php?proc_employee_id=<?php echo $_POST['proc_employee_id']; ?>' method="POST">[/code] This will put the proc_employee_id from the previous form as in the URL for this forms action. | |
Re: This should work... [code] mysql_query("CREATE TABLE IF NOT EXISTS `table_name` ( `field_name` int(11) NOT NULL AUTO_INCREMENT, `field_name` varchar(65), ..., ..., ..., PRIMARY KEY (`field_name`) )"); [/code] | |
Re: Use a while statement, like: [code] $query = mysql_query(query here...); while($result = mysql_fetch_assoc( $query )) { echo "<tr><td>{$result['column_title']}</td></tr>" } [/code] That will output one line for each record retreived. Adjust the echo to your needs obviously | |
Re: Try this: [code] $q6 = "SELECT * FROM banners WHERE lang='{$_SESSION['lang']}' AND section='top' ORDER BY RAND() LIMIT 1"; [/code] | |
Re: Pardon? Can you explain what you are looking for, or provide an example? | |
Re: [code] function mapRefresh(timeoutPeriod) { setTimeout(load(),timeoutPeriod); } [/code] Then add mapRefresh(10000) to the Onload event. | |
Re: Use sessions, when a user signs in, create a session: [code] // Put this at the top of the page session_start(); // Process the login then do this: $_SESSION['logged_in'] = 1; [/code] Then only allow access to the page to users who have an active session: [code] if(isset($_SESSION['logged_in'])) { // … | |
Re: Couple of issues, your script does not provide a response for if the username or password is blank, also there are redundant lines of code. Another thing, you should be hashing the passwords (MD5 at a minimum) I will rework the code for you and post up a possible solution. … | |
Re: Take a look at the FAQ here: [url]http://www.daniweb.com/forums/thread191031.html[/url] | |
Re: Couple of things. 1. Why are you sending unchecked POST values to the database? That is just asking for trouble. Look at SQL injection. Make sure that the values you receive are the ones you expected, that numbers are numbers etc... 2. Try running the query without single quotes on … | |
Re: Make a seperate page (profile.php perhaps) and use the unique field in the database (Usually an ID of some sort) in the query string, for example, profile.php?user=usersID. In the profile.php page, pull the required data from the database and display it as required. | |
Re: Its not needed there, there are a couple of uses for the braces, such as variable variables, but I believe the most common use is to include array vars in a string. For example: [code] echo "My name is {$_GET['name']}<br />"; [/code] instead of this: [code] echo "My name is … | |
Re: Add this code to the head of your document (Or in an external file if you use one) [code] <script type="text/JavaScript"> function checkValue() { if(document.getElementById('my_field').value == "default_value") { document.getElementById('my_field').value = ""; } } </script> [/code] Change my_field and default_value to the relevant values for your script. Then add an onkeypress … | |
Re: In delete.php do you actually have a mysql_connect statement? From your code it would seem not... | |
| |
Re: For the title, do this in each file: [code=php] define ("PAGE_TITLE", "Title for the Page"); [/code] And in common.inc put something like: [code=php] <title><? echo PAGE_TITLE; ?></title> [/code] For the Meta tags, you could put together an array on each page like follows: [code=php] $page_meta_tags[] .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" … | |
Let this be a warning to any loud mouth drunk yobs... The next person you start on may not be as easy as you think :D [url]http://www.mirror.co.uk/news/top-stories/2009/10/07/we-re-very-cross-cross-dressers-115875-21728860/[/url] Good to see someone stand up to the violent youths :) | |
Re: What parse error? It will usually give you something to go by, e.g. 'expecting x' or 'unexpected x' | |
Re: Since HTML is client side, it cannot directly access a PHP script, so you will need to send a request to a PHP script on your server, which can be done either by reloading the page, sending the details to PHP in the query string or by POST. Or you … | |
Re: If you mean 'how do I get a domain such as [url]www.daniweb.com[/url]' you will need to pay for and register it with a company who provide domains, and Google will give you hundreds. And as network18 said, if that is what you mean, PHP forum is not the place for … | |
Re: Currently I play no instruments, although in the past I played Brass instruments, mainly the Tuba and Baritone [horn]. I was let loose on both a guitar and a piano in the past, and I basically murdered them... the sounds produced could not be classed as music. If I go … | |
Re: I don't have much choice about the hours I am awake, as I work the graveyard shift (9:30PM - 9:30AM) so I guess I would have to say nights :) | |
Re: For me, 2. Although you might want to rethink the thread name, I am not sure how you can use multiple computers [I]simultaniously[/I] at a [I]different[/I] time.... :P | |
Re: Please search first, this has been covered numerous times and is information readily availble on google. [url]http://uk2.php.net/manual/en/function.mail.php[/url] | |
Re: You can enable short tags, however, there are other servers (like yours) which do no have the short tags option on. This means that if you deploy the code onto another server, it may not run. As pritaeas says, it is recommended to the the full <?php opening tag. There … | |
Re: Take a look at this line: [code] echo "<a href 'stats.php'>$fname</a>"; [/code] You are missing the = on href. | |
Re: Reuse an old thread maybe? You have 4 other threads on the same subject on the first 2 pages of this forum.... As for the query, post some code or we will be guessing at the problem. ![]() | |
Re: If I lost my iPhone I would miss the phone part, but I doubt I will have to as I have every phone I have ever owned sat in a drawer incase I ever need them...... I also have a 30GB iPod sat with the phones which got replaced with … | |
Re: I think [icode]$query = "insert_into[/icode] should be [icode]$query = "insert into[/icode] I dont do Postgres though, although I assume it is simialr to MySQL | |
Re: This is discussed at length on vBulletin's own forum: [url]http://www.vbulletin.com/forum/showthread.php?t=21342[/url] | |
Re: Your script can be as secure or insecure as you want. Generally, the end user would not see constants or any of the actual code as this is executed on the server. All the end user should see is the output of any functions in your script. If you are … | |
Re: Strangely enough, a google search comes up with guides for what you want to do: [URL="http://www.lmgtfy.com/?q=Mysql+%2B+php+%2B+jquery+auto+suggest"]Click[/URL] | |
Re: Either the password you are using is wrong, or there is no permission for user 'admin' on local machine to access the database. Check your username/password for the DB and also check the user has got the correct permissions. | |
Re: Add hidden fields to the form with the Submit button, the values can then be retreived using $_POST or $_GET in PHP. | |
Re: You will ideally need a Database to store the information in, there are a number of calendar and diary scripts available if you search Google. | |
Re: Look at your value attribute,: [code=php] value = <?php echo $_SESSION["namevalue"]; ?> /> [/code] This should be: [code=php] value="<?php echo $_SESSION["namevalue"]; ?>" /> [/code] | |
Re: When you say a text list, will this be a text file or a database? If it is a text file, use [URL="http://uk.php.net/manual/en/function.fopen.php"]fopen[/URL] etc to read the contents of the file, split the contents of the file into an array (for example [URL="http://uk.php.net/manual/en/function.explode.php"]explode[/URL]) then search the array with [URL="http://uk.php.net/manual/en/function.in-array.php"]in array[/URL] … | |
Re: Take a look at the last few characters on line 16, you hae an extra period in there. Periods are used to join strings, as there is nothing following the final value in the print() statement, you do not need a trailing period. | |
Re: You will want rewrites to do this. This will be fairly simple if the 'folder/folder/folder' is always the same, but if you have alot of sub directories then you will need more than just /file.php in the final URL Take a look at [url]http://www.sitepoint.com/article/guide-url-rewriting/[/url] | |
Re: First, I would not suggest taking POST variables (or $_GET or $_REQUEST etc..) and put them straight into sessions for use later, I would suggest you look into checking/sanitizing the results to ensure that they are what is expected. Especially if you are then using these values to query a … | |
Re: Take a look at the move_uploaded_file function in PHP: [url]http://us3.php.net/manual/en/function.move-uploaded-file.php[/url] | |
Re: Excellent! You made it to Speed Level 4 (out of 5) 52 out of 63 correct |
The End.