1,376 Posted Topics

Member Avatar for phpboy

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 …

Member Avatar for lipo
0
391
Member Avatar for sbhavan

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 …

Member Avatar for 11thlogin
-3
436
Member Avatar for cwarn23

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 …

Member Avatar for chrishea
1
325
Member Avatar for qazplm114477

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.

Member Avatar for qazplm114477
0
87
Member Avatar for jessicaZ

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.

Member Avatar for jessicaZ
0
114
Member Avatar for jarmerson

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().

Member Avatar for jarmerson
0
173
Member Avatar for Pado

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 …

Member Avatar for Stefano Mtangoo
0
180
Member Avatar for Dorayaki

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]

Member Avatar for cwarn23
0
80
Member Avatar for Smudly

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.

Member Avatar for cwarn23
0
64
Member Avatar for Sabryan

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 …

Member Avatar for ih8bugz
0
210
Member Avatar for cwarn23

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 …

Member Avatar for steelluv
0
95
Member Avatar for cwarn23

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 …

Member Avatar for cwarn23
0
237
Member Avatar for lifeworks

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' . ', '; …

Member Avatar for lifeworks
0
171
Member Avatar for xor83

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("/([^ …

Member Avatar for xor83
0
304
Member Avatar for visualmonk

[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().

Member Avatar for liamfriel
0
143
Member Avatar for cwarn23

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 …

Member Avatar for tesuji
0
381
Member Avatar for vizz

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]

Member Avatar for FlashCreations
0
181
Member Avatar for irincka

[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 …

Member Avatar for cwarn23
0
173
Member Avatar for ppetree

[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 …

Member Avatar for cwarn23
0
119
Member Avatar for marilynne11

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.

Member Avatar for Ezzaral
-1
224
Member Avatar for babug

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 …

Member Avatar for Sriman_Laxmi
0
1K
Member Avatar for 68thorby68

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 …

Member Avatar for 68thorby68
0
8K
Member Avatar for design.eng
Re: ID's

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.

Member Avatar for metalix
0
117
Member Avatar for lwaterfo

Try each of the following [CODE] if ($s>=1) { $prevs=($s-$limit); print "&nbsp;<a href=\"$PHP_SELF?s=$prevs&q=$var\">&lt;&lt; Prev 10</a>&nbsp&nbsp;"; }[/CODE] [CODE] if ($s>=1) { $prevs=($s-$limit); print "&nbsp;<a href=\\\"$PHP_SELF?s=$prevs&q=$var\\\">&lt;&lt; Prev 10</a>&nbsp&nbsp;"; }[/CODE] The difference? The first code box has the regular syntax for escaping a quote. However the second code box will output a single …

Member Avatar for cwarn23
0
408
Member Avatar for donageek

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.

Member Avatar for cwarn23
0
249
Member Avatar for seularts

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 …

Member Avatar for seularts
0
124
Member Avatar for BlackNinja

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 $ …

Member Avatar for cwarn23
0
162
Member Avatar for daviddoria

[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 …

Member Avatar for Lusiphur
5
246
Member Avatar for jephthah
Member Avatar for cwarn23

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 …

0
39
Member Avatar for 1Meme

[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"; …

Member Avatar for cwarn23
0
63
Member Avatar for cwarn23

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 …

Member Avatar for Geekitygeek
0
167
Member Avatar for cwarn23

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 …

Member Avatar for madaapril
0
183
Member Avatar for vaultdweller123

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 …

Member Avatar for dellie
0
309
Member Avatar for DealthRune

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. …

Member Avatar for manzarr
0
226
Member Avatar for PatrickV

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.

Member Avatar for Dani
1
207
Member Avatar for tito2004

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 }.

Member Avatar for almostbob
0
170
Member Avatar for 68thorby68

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 …

Member Avatar for 68thorby68
0
977
Member Avatar for Dartz654

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 …

Member Avatar for Dartz654
-1
146
Member Avatar for Awah Mohamed

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 …

Member Avatar for rajarajan2017
-1
75
Member Avatar for alex4700

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 …

Member Avatar for cwarn23
0
128
Member Avatar for ravi0703

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 …

Member Avatar for rbrt13
0
133
Member Avatar for cwarn23

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] …

Member Avatar for cwarn23
0
163
Member Avatar for cwarn23

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 …

Member Avatar for cwarn23
0
119
Member Avatar for ganeshm21

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 …

Member Avatar for theantonis
0
190
Member Avatar for vmanes

[B]51.2GHz on board[/B] Yes it is a 3.2GHz 8 core with each core containing 2 threads.

Member Avatar for macgurl70
1
1K
Member Avatar for nyra98

Try the following: [CODE]foreach (glob("tpl/*") as $filename) { echo "<a href=\"$filename\">".basename($filename).'</a>'; }[/CODE]

Member Avatar for nyra98
0
212
Member Avatar for hassancool

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.

Member Avatar for hassancool
0
168
Member Avatar for cwarn23

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 …

Member Avatar for TrustyTony
0
117
Member Avatar for cwarn23

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 …

Member Avatar for sourcebits
0
119

The End.