1,376 Posted Topics
Re: Just to let you know I find it is best to not use the system command line functions. My reason - I find that some servers just aren't compatible with these functions due to security policies and can even crash a server if the right settings are set on the … | |
Re: Looks like nobody likes the old fashion Mac. Linux is my choice because if I chose linux instead of xp when I first got my computer, I would have had double the amount of ram that I have now because Windoze just can't handle so much ram (8GB). So Linux … | |
Does anybody know how I would use sockets to tap into the SMS protocol for sending+receiving SMS messages. Basically, all I want to be able to do is setup a php script that will be able to act as the SMS server and send+receive the SMS's directly through the SMS … | |
Re: That code is correct but keep note that the first code snippet function only returns a single row. Then loops through the columns of that row in the second code snippet and the third function is a dynamic function which it's name is $get_query as pre-defined. | |
Re: Try the following: [CODE] if (!is_file($template_file)) { $template_file = $this->get_default_template(); } // Look whats the current post if (is_object($GLOBALS['post'])) { $this->the_current_post = $GLOBALS['post']; } // Use the template ob_start();[/CODE] Also don't forget that php is case sensitive. | |
Re: The mysql_fetch_assoc() error can also be due to an invalid mysql_query() syntax input. So try doing [ICODE]mysql_query($sql) or die(mysql_error());[/ICODE] so that you get debugging information. Then tell us what additional errors it reports back. Also don't forget to use mysql_real_escape_string(). | |
Re: Is this a php or javascript question because aren't the try and catch statements part of the javascript language. If that is the case then perhaps you are posting in the wrong section. Also could you please send some code to explain your question. From what I can understand in … | |
Re: The following function is fool proof and fully past, current and future attack resistant. [CODE]function truehash($input) { return hash('sha1',substr(hash('sha1',$input),4,-4)); }[/CODE] | |
Re: Try the following [CODE]mysql_query('SELECT * FROM `table` GROUP BY `title`');[/CODE] That will remove any duplicates from the title column when selecting. Keep in mind it does not delete the data but instead just filters it for the query. | |
Re: I got a joke that is more of a prank which I accidentally did as I forgot my name. This is how it goes. You ring up a local business you know and have talked to before than they ask who is it? So you answer "It's me.". Then they'll … | |
A week ago phpmyadmin was working fine but now whenever I try and access phpmyadmin, (in xampp localhost) it displays 2 error messages and nothing more. They are as follows: [CODE]phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username … | |
Hi, I just upgraded from Windows XP to Windows 7 Home Premium in my virtual box so that the operating system could recognize all of the cpu. My Virtual box setup is a 5 core 1 thread per core setup and XP Pro only sees 2 cores (dual core). Then … | |
Re: The following is an example based on a php.net example. It just simply uses a coma (,) to add more emails and additional headers for blind carbon copy (bcc) where people can't see what other people received the same email. [CODE=php]<?php // multiple recipients $to = 'aidan@example.com' . ', '; … | |
Re: If you want to extract the url's from the page then I have an existing script that not only extracts to links to other pages but also links to pictures and other media. My script is as follows: [CODE=php] function getlinks($url) { $media=preg_split('/(href\=\"|href\='|href\=|src\=\"|src\='|src\=)/i',$url); $media=preg_replace("/([^'])'(.*)/is",'$1',$media); $media=preg_replace("/([^\"])\"(.*)/is",'$1',$media); $media=preg_replace("/([^\>])\>(.*)/is",'$1',$media); $media=preg_replace("/([^'])'(.*)/i",'$1',$media); $media=preg_replace("/([^\"])\"(.*)/i",'$1',$media); $media=preg_replace("/([^\>])\>(.*)/i",'$1',$media); $media=preg_replace("/([^ … | |
Re: [QUOTE=ApocDen;1296997]hmmm what is the { at the end of the $act=mysql_real_escape_string($act);[/QUOTE] Indeed and did you use mysql_connect() before the mysql_real_escape_string() function? You need a mysql connection open before you are able to use mysql_real_escape_string(). | |
Hi, I have just started out with sqlite in c but I can't seem to return the results of the select statements. There are so many functions that I don't know what to use as none of them make any sense. So can anybody give me an example of how … | |
Re: May I suggest googling for a tutorial. I myself have written one if you want to read. [URL="http://syntax.cwarn23.net/PHP/Making_a_basic_blog"]http://syntax.cwarn23.net/PHP/Making_a_basic_blog[/URL] | |
Re: [QUOTE]My windows is Vista Ultimate.[/QUOTE] That is probably why. Microsoft nolonger supports windows Vista and as far as I'm aware Microsoft never did support Windows Vista. So upgrade to Windows 7 or at the very least download linux from your local internet hub. WindowsVista==WindowsME. For all we know Internet Explorer … | |
Re: [QUOTE=ppetree;1303342]Thanks Martin. $field and $value are both simple text strings. I tried it as $a = $structure[$i] and got nothing back... print_r shows the entire array.[/QUOTE] Try the following in the loop and if it dumps the array of two values then continue reading. [CODE]print_r($structure[$i]);[/CODE] If that dumps an array … | |
Re: Why use hotmail when there is gmail with fewer ads. IMO gmail offers more for less. eg. you don't need to pay for gmail to send data to a email client where as hotmail has a monthly subscription for that. The only use for hotmail is for an msn account. | |
Re: I also have a theory and am still working on a formula to prove that pi is not infinite in length. If pi were infinite in length then the circle would have have an infinite circumference. And using MS Paint I have found that pi is not always 3.1415. It … | |
Re: Well there are a few factors that could cause this problem. First correct your code as ApocDen mentioned. Then when viewing the pages, make sure it is in the same browser window (eg. different tabs) and be sure that cookies are enabled. If cookies are disabled then the script will … | |
Re: And perhaps the best way of them all is url variables. Send a number to the database and pass that number through the url. The number could be just a sha1 hash of various data from the first page. | |
Re: Try each of the following [CODE] if ($s>=1) { $prevs=($s-$limit); print " <a href=\"$PHP_SELF?s=$prevs&q=$var\"><< Prev 10</a>  "; }[/CODE] [CODE] if ($s>=1) { $prevs=($s-$limit); print " <a href=\\\"$PHP_SELF?s=$prevs&q=$var\\\"><< Prev 10</a>  "; }[/CODE] The difference? The first code box has the regular syntax for escaping a quote. However the second code box will output a single … | |
Re: I would suggest going into network connections (control panel) and the options in internet explorer to check if a program has setup a proxy server or vpn. Because some programs override your internet connection settings so you connect through a malicious server. | |
Re: Try the following: [CODE]$ext - is the var that reads the file extensions, such as exe and so on. if (($ext == "jpg" || $ext=="gif" || $ext=="png") && ($_FILES["uploaded_file"]["type"] == "image/jpeg" || $_FILES["uploaded_file"]["type"] == "image/gif" || $_FILES["uploaded_file"]["type"] == "image/png") && ($_FILES["uploaded_file"]["size"] < 1000000)){ echo 'something'; }else( echo 'none'; )[/CODE] As … | |
Re: Besides from the very obvious as pointed above ($_SESSION['pas']) I would also suggest making sure you have cookies enabled. If cookies are disabled then sessions are disabled unless you put the session id in the url. The session id is stored in the variable/constant SID (upper case and no $ … | |
Re: [QUOTE=cscgal;1287841]In theory, good idea. In practice ... perhaps there is a reason there exists so much doubt about how large communities can work together to produce great development projects. haha. It seems like getting so many people on the same page and working together on a project in their spare … | |
Hi everybody, I have been making a autoresponder bot but need information for the bot to learn from. I have just downloaded gutenberg and got all of its data into a database but need more data (preferably IT related). So does anybody know of a website like gutenberg but for … | |
Re: [CODE]<?php session_start(); ?> <html> <head /> <body> <form action=login.php method=POST> KeyIDentity: <input type=text name='user'> Password: <input type=password name='password'> <input type=submit value='Login'> </form> <?php if(isset($_POST) && !empty($_POST)){ $con=mysql_connect("localhost", "root", ""); mysql_select_db("register"); $user=mysql_real_escape_string($_POST['user']); $password=mysql_real_escape_string($_POST['password']); $get=mysql_query("SELECT * FROM users WHERE user='$user' and password='$password'"); $result=mysql_result($get,0); mysql_close($con); if($result!=0) echo "Login Failed"; else{ echo "Login Successful"; … | |
Hi, as a member of daniweb I have a question regarding the proposal of more forums. Would it be possible to have a tutorials forum where people can post tutorials where admin can sort through to transfer/edit/delete into the appropriate positions. Also another idea which I have brought up before … | |
What are your computer specs and what makes your computer special? As for mine it is as follows: RAM: 12GB CPU: 3.2GHz 8 core i7 (Totaling to 51.2GHz single core single threaded) Hard drive: 3TB Graphix: 256MB Operating System: Ubuntu 9.10 64-bit This computer I use for brute force hashing … | |
Re: My superstitious beliefs include the US government have a top secret Stargate program to travel distant worlds via a device called a "Stargate" made by the Ancients. Then they wrote a movie about it so no body would suspect it. Another is if you stop dreaming of a night then … | |
Re: This script not only suffers from security holes but also has a but in recording incorrect data. If magic quotes are enabled then every recording of a slash be recorded. This means if you record the username te"s't then when you retrieve it from the database it will display te\"s't. … | |
Re: Although I rarley use that method to login I too find it annoying it doesn't work as every so often I forget that method doesn't work and get caught by the bug. Please fix dani. | |
Re: Wherever the bug is it isn't in that piece of code. But as the previous post states it usually means a missing curly bracket { or }. | |
Re: Do you have cookies enabled because with the method your using only cookie powered sessions will work. This is because php is unable to pass to the parent http header information and/or the SID in the url. So make sure you have cookies enabled in IE. If however cookies are … | |
Re: There is a bug in your code which is making sessions not initialize. The session_start() function should be placed on the first line of the page before any browser/html output. For example. [CODE]<?php session_start(); ?> <html> <head> <title> Blokmates Account Login </title> </head> <body> <link rel="stylesheet" type="text/css" href="css/login.css"/> <center> <?php … | |
Re: Hi, if you have installed wamp, xampp or lamp then success you have done the first step. After that you may place your php files in the htdocs folder where you can view them at [url]http://localhost/myphpfile.php[/url] Next time RTFM please as google is your friend. I'm sure all of your … ![]() | |
Re: Golly I see loads of glitches in the code. Well their not exactly bugs since their not syntax errors but things that should be changed. Perhaps try the following: [CODE]class DB { private $connection; public function __construct(){ $this->connection = mysql_connect('localhost', 'user', 'pass', true) or die(mysql_error()); mysql_select_db( 'dbname', $this->connection ) or … | |
Re: I came to this question a looong time ago. In fact I wanted free sms but never happened. I would suggest googling for online php sms providers as you will need to find a provider which you can a- send an email to which delivers the sms or b- use … | |
Hi, me again. I don't mean to be a pain but I have another question. I'm trying to add an event handler to the code (Irrlicht game engine) but I can't seem to retrieve data from the main function to the event class. Below I have [ICODE]bool check = ((IGUICheckBox*)event.GUIEvent.Caller)->isChecked();[/ICODE] … | |
Hi, long time no C. I have started using the Irrlicht gaming engine but have bumped into a problem which has been bugging me for the past 6 hours flat. I have a variable containing a std::string but it needs to be converted to a (const wchar_t *) string. Does … | |
Re: Hi and welcome to daniweb. Have you read the documentation for AWM menu because I'm sure all of your questions will be answered in the starters guide. So I would suggest reading the manual and if you still can't find the answer then post your attempted code here. And also … | |
Re: [B]51.2GHz on board[/B] Yes it is a 3.2GHz 8 core with each core containing 2 threads. | |
Re: Try the following: [CODE]foreach (glob("tpl/*") as $filename) { echo "<a href=\"$filename\">".basename($filename).'</a>'; }[/CODE] | |
Re: Hi and welcome to daniweb who's name I won't mention. Could you please explain the question clearly and in more detail as I see more of a statement than a question in your post. So please explain in lets say 64 words minimum. | |
Below is a link to a rather popular topic which now has an unviewable page. From what I can see it exceeds php's memory limit of 16MB. I would strongly suggest increasing it to 48MB as 32MB is the php standard and without a limitation on the size of a … | |
Hi, Sorry if this is in the wrong forum but it appears daniweb doesn't have a category for sqlite or miscellaneous database systems. I have just started on a personal project which is an admin interface for sqlite (Like sqliteMyAdmin), similar to Phpmyadmin but for sqlite. Anyways the question is … |
The End.