1,376 Posted Topics

Member Avatar for cwarn23

Hi, I have some strings but I want to convert them to binary (1 way). Are there any functions other then the compression functions that will convert strings to binary? Thanks. cwarn23

Member Avatar for cwarn23
0
70
Member Avatar for 6pandn21

This is a file forbidden error. So post your .htaccess file or if you don't have a .htaccess file then post your apache httpd.conf file. It is usually a configuration with the virtual hosts that causes this error.

Member Avatar for 6pandn21
0
19K
Member Avatar for William Hemsworth

Cleaverbot told me that he is not a bot but instead a human. What bot would think their human? It could say at least it is an alien from area 51. [QUOTE]I'm not a bot. Then who are you? I am a human.[/QUOTE]

Member Avatar for vivosmith
2
426
Member Avatar for niths
Re: php

Like the following? [CODE]echo '<select size=1>'; $r=mysql_query('SELECT * FROM `table`'); while ($row=mysql_fetch_assoc($r)) { echo '<option value="'.htmlentities($row['column'],ENT_QUOTES); echo '">'.$row['column'].'</option>'; } echo '</select>';[/CODE]

Member Avatar for cwarn23
0
30
Member Avatar for s_kanika

Use something like the following: [CODE]<head><title>test</title> <script> function ajax() { //ajax stuff here } </head> <body onunload="javascript:ajax();">[/CODE] Hope that helps.

Member Avatar for cwarn23
0
90
Member Avatar for niths

I don't see how the code relates to your question. Could you mention a line which expresses your question as I can't find what would yield 00:00:002010-03-26?

Member Avatar for Zagga
0
104
Member Avatar for Katsurou

Below is a corrected version comparing case insensitive. So it will also work for MaDRiD [CODE]if(isset($_POST['City'])) { echo "<strong>Answer nr1:<BR></strong>"; $cities= $_REQUEST["City"]; $odp1 = "madrid"; //$odp = "Madrid" && "madrid"; //neither of OR/AND works here if(strtolower($cities)== $odp1){ echo "Your answer is <Font Color=#009900>correct</font> <P>"; } elseif($cities== ""){ echo "Please fill …

Member Avatar for Katsurou
0
110
Member Avatar for faizal4cool

Internet Explorer isn't really designed for plugins although very few are available. I would suggest using a browser like Firefox, Opera or Crome as they all have that feature.

Member Avatar for ShawnCplus
0
112
Member Avatar for sallycheng
Re: PHP

Welcome to daniweb and let me be the first to say please explain your questions in greater detail with relavent code. From what I can understand you want us to fix your mysql query but I can't seem to see any mysql query in your code. Please post the relavent …

Member Avatar for sallycheng
0
100
Member Avatar for fatcat2010

It means it cost big dollars. :) Naa just another way of making a variable name. So the value of $key will be the name of the variable. For example observe the following: [CODE]$a='C:/dos'; $b='C:/dos/run'; $c='\run\dos\run'; $d='test'; $$d = $c; //only $c and $d is used echo $test; //displays \run\dos\run[/CODE] …

Member Avatar for fatcat2010
0
181
Member Avatar for niths

[CODE]<?php session_start(); $_SESSION["username"] = $username; $_SESSION["password"] = $password; //now to distroy session $_SESSION=array(); header("location:login.php"); ?>[/CODE] [CODE]<?php session_start(); $_SESSION["username"] = $username; $_SESSION["password"] = $password; header("location:login.php"); ?>[/CODE]

Member Avatar for cwarn23
0
68
Member Avatar for Dani

Google looks very different. Seems just like yesterday that the homepage had the plain word Google Beta at the top with no links unless you put in a search. Take a look at [URL="http://www.youtube.com/watch?v=yJNOM-PZkf4"]this youtube video[/URL]

Member Avatar for cwarn23
0
229
Member Avatar for tmaniacco

[QUOTE=tmaniacco;1169922]Why do I need to use another variable $display_message?[/QUOTE] You don't and would be wiser not to. You should always use stripslashes on $_POST and so below is a faster executing example. [CODE]$message = stripslashes($_POST['message']); echo $message;[/CODE] Of course you could try the below but there is no guarantee of …

Member Avatar for cwarn23
0
82
Member Avatar for dirtyhiphophead
Member Avatar for cwarn23
0
69
Member Avatar for cwarn23

Hi, I have been introduced to this problem but can't get my head around how the problem works. What I understand is you have a matrix or grid of true and false statements then you need to pair together true and false statements according to best fit. For example a …

0
60
Member Avatar for Exploded Fiber

There are two possibilities and are as follows [CODE]<?php //method 1 explode(',',$input); //method 2 str_split ($input,6); ?>[/CODE]

Member Avatar for Exploded Fiber
0
87
Member Avatar for cwarn23

Hi, I would like to post a few php tutorials but can't find the section where I can post tutorials. Does anybody have a link as to where to post tutorials in the php forum? Thanks.

Member Avatar for BestJewSinceJC
0
206
Member Avatar for Jooks

Do you mean like the following? [CODE]$data=explode(',',file_get_contents('path/to/file.txt')); for ($i=0;$i<count($data);$i++) { echo $data[$i]; echo '<br>'; }[/CODE]

Member Avatar for Jooks
0
108
Member Avatar for samarudge

Well in a few weeks all of those links will probably work. It would just be in the middle of the process of updating the index but this is no new problem. Just a more obvious one as more updates are been made.

Member Avatar for Geekitygeek
0
171
Member Avatar for sam023

I would suggest using the [URL="http://www.codeplex.com/PHPExcel"]PHPExcel[/URL] script.

Member Avatar for prem2
0
104
Member Avatar for cloud09

I would suggest looking at the [URL="http://au.php.net/manual/en/book.image.php"]gd library[/URL]. Then later on you might want to switch to the [URL="http://au.php.net/manual/en/book.imagick.php"]imagick library[/URL].

Member Avatar for cwarn23
0
122
Member Avatar for cwarn23

I thought I would suggest and ask "Why doesn't Daniweb have a IT wiki?" I'm sure there would be plenty of members to contribute. Is there any reason dani or is it a thing that's coming soon?

Member Avatar for jephthah
0
168
Member Avatar for niths

Could you please explain in more details what your problem is because I don't have a clue.

Member Avatar for cwarn23
0
59
Member Avatar for ja_lee_00

Welcome to daniweb and let me be the first to say do your own homework as it is called homework and not daniwebwork. The solution is fairly straight forward if your familiar with the language your using. I would suggest take a crack at it and if all fails then …

Member Avatar for ja_lee_00
-1
113
Member Avatar for cwarn23

Hi, I have made a chatroom but now want to make a bot for that chatroom. Does anybody know where I can find documentation as to the theory behind making the AI for a chatroom bot. Or even better, a simple open source PHP chat bot. The main goal is …

Member Avatar for chrishea
0
634
Member Avatar for mehak_soft

I thought the Java language was called Java because the people who programed Java ate/drunk a lot of Java to stay awake while programming. I will have to try that some day.

Member Avatar for cwarn23
0
186
Member Avatar for jamey8420

Use the following: [CODE]echo '<div class="mydiv">'; echo file_get_contents($sReportPath); echo '</div>';[/CODE] Then use css to add the scrollbars.

Member Avatar for cwarn23
0
103
Member Avatar for aliveina

I would suggest using a piece of javascript like the following. [CODE=javascript]<script> setTimeout('window.href="http://www.example.com/anotherpage.php";',5000); </script>[/CODE] The above redirects the user in 5 seconds and is echo'ed in the <head></head> section as javascript.

Member Avatar for aliveina
0
80
Member Avatar for virspy

I think he wants a link and I shall provide one. [URL="http://syntax.cwarn23.net/PHP/Making_a_search_engine"]http://syntax.cwarn23.net/PHP/Making_a_search_engine[/URL] [QUOTE=Will Gresham;1164339]How nice, what do you want us to do? Make it for you? I very much doubt that will happen. Show us the script you have now and we can suggest improvements or changes. Other than people …

Member Avatar for cwarn23
0
68
Member Avatar for fsmaniaka

Hi and welcome to daniweb. To start off with I noticed that you are asking us to answer your homework for you. Well unless you show reasonable effort then you won't get anyone elses replies. I would suggest having a go at it and if there are any troubles then …

Member Avatar for cwarn23
0
229
Member Avatar for sweetsasthi

[QUOTE=alfred901;1161552]Computer multitasking is the apparent simultaneous performance of two or more tasks by a computer's central processing unit. [I]<<snip>>[/I][/QUOTE] I agree with you there although this post will probably attract negative votes. Multitasking is basically when an operating system eg. windoze has multiple tasks running and the tasks windoze has …

Member Avatar for cwarn23
0
208
Member Avatar for DealthRune

Why not use the following? [CODE]$number='10000000000'; echo $number.'<br>'; //now some math echo bcadd($number,'500'); echo '<br>'; echo bcpow('2','2048');[/CODE] As you can see all numbers can be dealt with as strings using [URL="http://au2.php.net/manual/en/ref.bc.php"]the bcmath library[/URL]. So this means the size of the number is only limited to the computers ram and cpu …

Member Avatar for DealthRune
0
142
Member Avatar for cwarn23

Hi and I remember reading in a really old topic that somebody here was able to write a chatroom without using mysql or any other database system. Can somebody explain how this is possible with just javascript and ajax? What I want to do is to have a script that …

Member Avatar for cwarn23
0
156
Member Avatar for neha.khetan09

To clear the session simply use the following. [CODE]$_SESSION=array();[/CODE]

Member Avatar for cwarn23
0
72
Member Avatar for Exploded Fiber

If you want to insert into different columns different values then try the following. [CODE]$array=array('column1'=>'value1', 'column2'='value2', 'column'='another'); $sql='INSERT INTO `table` SET'; foreach ($array AS $key => $val) { $sql.=' `'.mysql_real_escape_string($key).'` = "'.mysql_real_escape_string($val).'",'; } $sql=substr($sql,0,-1); echo $sql;[/CODE]

Member Avatar for Exploded Fiber
0
122
Member Avatar for futhonguy

For making and reading excel files with php I have always used [URL="http://www.codeplex.com/PHPExcel"]PHPexcel[/URL] which is simple to use and effective. Enjoy.

Member Avatar for futhonguy
0
109
Member Avatar for Ir$had

Well no homework questions are allowed on daniwe BUT I will happily talk you through it *cough* answer *cough* via msn at [email]msn@cwarn23.info[/email]

Member Avatar for hashinclude
0
143
Member Avatar for mrcniceguy

There are several ways of doing it. The most common being using gd although the gd library is a tiny library that handles very few file formats. I would recommend using the imagick library and this can be viewed on the [URL="http://au.php.net/manual/en/function.imagick-resizeimage.php"]php documentation[/URL].

Member Avatar for cwarn23
0
67
Member Avatar for cwarn23

I thought I would let you's php gurus know that I am starting to come close to cracking the Sha1 algorithm. And surprisingly it is an easy one to crack. So I would recommend switching to something like the whirlpool algorithm.

Member Avatar for cwarn23
0
653
Member Avatar for cwarn23

I have been designing a security system to stop bots from spamming my forum. Basically, it will check if there is any isp name detected from the ip address then if there is no detected isp, the submitted post will not be made. I know to detect the ip address, …

Member Avatar for kvprajapati
0
2K
Member Avatar for cane23

Then you would need to do something like [CODE]if ($_POST['val']!='0' && $_POST['val']!=0) { $q="SELECT sum(credits) FROM courses WHERE course_code='$val'"; if ($result2=mysql_query($q)) $count2= mysql_num_rows($result2); $row = mysql_fetch_row($result2); $first=$row[0]; } else { $first=0; }[/CODE]

Member Avatar for liamfriel
0
84
Member Avatar for cwarn23

Hi and I have a mysql table that gets a few million records inserted per day and it seems to get corrupted very often. The current database structure is myisam but it keeps on getting corrupted. Are there any mysql data structures that won't corrupt even when restarting the mysql …

Member Avatar for cwarn23
0
112
Member Avatar for niths

Your sql syntax should be as follows [CODE]$sql="SELECT * FROM `Users` WHERE `Username`='$Username' and `Password`='$Password'";[/CODE] Notice the change in quotes. I would give you a line number but you didn't use code tags so I can't.

Member Avatar for cwarn23
0
151
Member Avatar for Barrett1

Try the following: [CODE]$r=mysql_query('SELECT * FROM `comments`, `messages` WHERE `comments`.`msg_id_fk` = `messages`.`msg_id`') or die(mysql_error()); while ($row = mysql_fetch_assoc($r)) { echo $row['comment']; echo '<br><br>'; echo $row['message']; echo '<hr>'; } [/CODE] I think that is what you mean but I haven't tested it for bugs.

Member Avatar for cwarn23
0
176
Member Avatar for khr2003

Google is your friend. I would suggest using preg_match_all to retrieve the data then display the data in the proper formatting with loops.

Member Avatar for khr2003
0
114
Member Avatar for lightningrod66

Below is an example of how to do so. [CODE]// To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail($to, $subject, $message, $headers);[/CODE]

Member Avatar for ImMoRtAl-
0
141
Member Avatar for cwarn23

Hi, we all know we would love to have more ram or more graphics but if you could decide the specs even if such specs don't exist yet what would they be. So for example, I think my computer with 4GB of ram is terribly slow so below are the …

Member Avatar for Biker920
0
139
Member Avatar for drewpark88

The classic question with no code. I would like to try and debug it but can't see any code to debug. Could you please post your code and your errors so that we at least have a chance of solving this. [QUOTE=drewpark88;1156976]Hey Everyone, I am getting an error with a …

Member Avatar for drewpark88
0
302
Member Avatar for cwarn23

Hi and this function I wrote as part of a larger project and acts exactly like the php explode function. Although there a few slight differences between this function and the php explode function it can easily be tweaked to act identical. Also with this function it does not use …

Member Avatar for tetron
1
666
Member Avatar for cwarn23

I have been googling around but can't seem to answer this question. Where do I find the windows drivers (c++) for the macbook built-in webcam. Does anybody know where I can find c++ drivers for the macbook built-in webcam? Basically I need to be able to write software that can …

Member Avatar for cwarn23
0
67

The End.