492 Posted Topics
Re: Can you post your actual code, as what you have posted will not work - this is not correct PHP syntax. | |
Re: [QUOTE=gauthamnagpur18;964339]how can i use php/mysql.[/QUOTE] Simple: [code=php]mysql_connect("DB_SERVER", "USEERNAME", "PASSWORD")or die(mysql_error()); [/code] [URL="http://www.lmgtfy.com/?q=php+mysql+registration+form"]Google helps.[/URL] | |
Re: The best way I know would be to use a database. You can look into the file functions in PHP, fopen, fread, fwrite etc... But I would use a database over this any day. Also, about this: [QUOTE=jonow;956299] I don't want to use MYSQL or JavaScript to show the content. … | |
Re: It looks like you have Object Oriented code there, if the file in question called by another file (include, require....)? | |
Re: You will need to make slight alterations to your SELECT statement for each query to get the desired results. So when the link is clicked the selected options will need to be passed to PHP (using Session data, POST, Query String etc) To select only 1 value from a column, … | |
Re: If you mean a 'clock' which shows the current time without refreshing the page, PHP is not the place for you, try looking for Javascript clocks. | |
Re: No way of knowing without seeing some code. | |
Re: If you have installed one of the bloated mafia style protection systems then you might find things a bit slow. I use Vista as a dual boot with openSuse. Not a huge difference between the two. But then I do use a free protection system so the developers aren't sat … | |
Re: If I understand what you are doing, it seems you are trying to call PHP scripts with a JavaScript function, this will not work without either: 1. Reloading the page 2. Implementing an AJAX type script to make a call to the PHP script. There are plenty of guides online … | |
Re: All you need is either a server supporting PHP. Or if you want to develop on your home PC, you will need both Apache HTTP server (apache.org) (Or another server) and the PHP package from php.net. Plenty of guides online on how to install and configure these. ![]() | |
Re: Do you have more than one SQL query? In an error, MySQL will echo the query, but in the error you posted the ip and adid values are swapped. I can't see anything wrong with your code there. | |
Re: Posting some code might help... Most likely not clearing Sessions or Cookies, but possibly something else. | |
Re: If you are trying to get values from a form, why not use the $_POST and $_GET vars in PHP... Any data from the form will be in these. Using JavaScript is all well and good until you come across a browser which either has JavaScript disabled or does not … | |
Re: I am not sure I understand exactly what you are trying to do here, but surely passing a table name in the URL is a very bad idea. Isn't the reason that SQL errors should be suppressed in production sites because the developer does not want the table name to … | |
Re: Might help to state what the problem is. I don't want to sit here looking through your code without knowing what I am looking for. Also, use code tags. | |
Re: +1 to the Star Trek film rocking! Best film I have seen in a while. Age ratings are fairly pointless, the context the 'questionable material' is used in is more important, and obviously the young person viewing it. But I guess as a rough guide it serves it's purpose. Bring … | |
Re: Store it in a session or cookie. Session example: [code=php] <?php session_start(); foreach($_POST as $key => $value) { $_SESSION['post_vars'][$key] = $value; } ?> [/code] Very basic example, by no means complete. You can then access the values using [icode]$_SESSION['post_vars']['field name'][/icode] | |
Re: You would ideally need a database for this which has a table in it for Users and columns for a minimum of Username, Password and User ID. | |
Re: IMAP is what you are looking for [url]http://uk.php.net/imap[/url] | |
Re: You need to escape certain characters otherwise they do funky things to your PHP. Best way is to escape them (or convert them to HTML enitities) when they are put into the database (Otherwise they may run riot on the database) and then unescape any escaped characters when you echo … | |
Re: It should be [code=php] $query = "SELECT * FROM pec_mssgs WHERE m=$todaysMonth AND d=$todaysDay AND y=$todaysYear"; [/code] Edit: Ezzaral beat me to it :) | |
Re: Try replacing [icode](!$sqlStr==...[/icode] with [icode]($sqlStr != ...[/icode] | |
Re: Wouldn't it be a good idea to re-use your previous thread which is still on the front page. And if you post your code then people may be able to point out where you are going wrong. Although, this is the example given by php.net: [code=php] <?php $zip = new … | |
Re: Shouldn't NumOfDogs be $NumOfDogs? Or are you trying to call a function NumOfDogs()? | |
Re: All you need to do is specify the location in the function, change: [code=php] imagejpeg($img, "", 90); [/code] to [code=php] imagejpeg($img, "/flashimages/filename.jpg", 90); [/code] Or, generate a name for the image and store it in a variable: [code=php] //Generate the image name $image_dir = "/flashimages/"; $image_name = "something.jpg"; imagejpeg($img, $image_dir … | |
Re: Correct me if I am wrong, You want a script that will calculate the time taken to query the database and then predict how long it will take to do the same for a larger database? Also, from what you said it seems you want someone here to provide you … | |
Ok, I have an iBook G3. I was restoring it to factory with the Software Restore disks which came with the unit as I was planning to move on to a new unit.. But there was a power cut in the middle of the process and the unit shut off. … | |
Re: It would be better to store the dates in the database as a timestamp, and use these in the query. Take the normal date in PHP, use strtotime to convert it to a timestamp and search this. Your queries will be faster if using integers rather than full text searching.. | |
Re: Wait.... How do you complete an [I]infinite[/I] loop at all? Infinite means no end last time I checked .... | |
Re: There are multiple resources online which deal with this issue, a quick search comes up with exactly what you are looking for, please research and dont ask other people to do all the work. Post an example of what you have if it isnt working and we can assist you. | |
Re: A couple of questions.. 1. Where are you getting those GET names from? Can't see any reference to them in your code.. 2. Why are you putting GET data directly into the database.. That's just asking for trouble. Any and all input from a user should be seen cleaned before … | |
Re: [URL="http://www.lmgtfy.com/?q=ajax+sortable+tutorial"]Click[/URL] Plenty of guides (and ready made open source code) online if you actually search for it. | |
Re: Upload the PDF files to a directory and have the PHP script check the directory and list any PDF files in there. | |
Re: Fairly simple, limit the number of results that SQL returns, and have a start point for the query. A google search brings up what you want. [URL="http://www.lmgtfy.com/?q=php+pagination+tutorial"]Click me.[/URL] | |
Re: Why is this in the PHP forum? | |
Hello all. Quick question. I have a table in my database with 'feedback' items which are assigned to pages/items in another database. I have a inner join to list all of the items on the feedback table and which items they are listed on. I have used a DISTINCT on … | |
I am building a program that will 'integrate' with a website I have built, the user wants a client based app that can be used to upload text from a .doc file to the website. The website uses a database to store the text in HTML format. The HTML produced … | |
Re: +1 to not using an IDE to learn PHP, there are plenty of applications that support syntax highlighting and line numbering (Textpad2 comes to mind). I have found the best IDE to be the NuSphere phpED, pricy, but very nice :) | |
Re: Can you confirm PHP is installed in C:\php5, and that the file php5apache2.dll is actually there (These are sometimes in a subfolder and need to be moved to the main directory) | |
Re: I find that FPS games bore me, I can't stick them very long at all. But I'd agree with the overall assessment of the article, I am more aggressive in driving games (i.e. NFS Underground) than shooting games (i.e. GTA:SA) I actually play GTA to relax, whereas I play a … | |
Re: CSRF: Cross-site request forgery XXS: Cross-site Scripting As mentioned by Designer_101, I would suggest not using POST values directly into SQL queries (Or for anything really) They should be cleaned first. Use a preg_match on any values (such as usernames) where you know they will only contain certain characters, at … | |
Re: Aside from the comments in the previous post, you ahave a lot of redundant code there. Rather than coding HTML like: [code=php] echo "<html>"; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo "<table align=center border=1 cellpadding=0 cellspacing=0 bordercolor=#FF6600 bgcolor=#C0C0C0 … | |
Re: My guess would be that 'lal' is a directory, and the query string is for the default file in there. So 'www.some.com/lal?some=some&somemore=somemore' would actually go to 'www.some.com/lal/index.php?some=some&somemore=somemore.' Just a guess, I can't think of a site off the top of my head that uses this though, could possibly be a … | |
Re: [QUOTE=Narue;837047] >Fullmetal Alchemist I'm more curious how the licensing will go. The last thing I want is another Utawarerumono where I get really into it and then after ten or so episodes it gets licensed. [/QUOTE] Wait... Didn't this finish after the 52 episode and 1 film :-/ Don't see … | |
Re: [QUOTE=jephthah;842500]i sort of misread the title and thought that you were going to tell us about your erotic fantasies.[/QUOTE] +1 Really, some people need to take their minds out of the gutter ;) | |
Re: You could use a meta redirect to redirect the page after a period. This would go to a page which unsets the session [code=html] <meta http-equiv="Refresh" content="300; url=http://www.site.com/logout_page.php" /> [/code] ^That goes in the head of the document. | |
Re: The problem is that you have mixed double and single quotes, it should be: [code=php] <a href="delete.php?id=' . $row['autoid'] . '"> [/code] But your coding style needs alot of work, suggestions posted above are good ones. | |
![]() | Re: Looking at your code, I think you have your variables in a mix: [code=php] echo '<a href="' . $row['thumb']. '"><img src="' . $row['url']. '" /></a>'; [/code] Would output (for row 1) [code=html] <a href="001.jpg"><img src="001.php" /></a> [/code] Swap over the variables so that the thumb is in the img tag … |
The End.