cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Below is a paragraph based on a true story of how floods rule the world 2011 to 2012.

[story]
The year is 2010 and everybody seems to be on top of the moon with great wealth when scientists monitoring the sun discover a potential solar burst from the sun which may or may not effect us.
January 2011 it is discovered that this solar burst will pass by the earths atmosphere but not collide with the earth itself. Calculations are done to prepare this data for the media and who is may concern.
Around February 2011 unusual weather patterns start to appear all around the world including record cyclones and record catastrophes. Then Floods and Cyclones devastate millions in Australia.
March 2011 an earthquake appears in Japan causing damage to infrastructure and shaking up the market.
2012 the biggest part of the solar burst arrives with record storms and flooding as well as blackouts and earthquakes appear all around the globe over a period of time.
Is this all a coincidence or is the mein calender more accurate than some thought.
[/story]

Perhaps 2012 is when climates change and species who don't adapt will not survive including humans. So my guess is while it's not the end of the world many species are due to extinct in 2012 and we might be on the chopping list depending on how bad this solar flare is. All of the information in the story …

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Don't you just get sick of hash algorithms constantly been brute forced or even cracked. Well here is an algorithm I have created in my spare time to help out the little guy who just wants a secure hash. This hashing algorithm uses many different techniques including ones used in sha1 to prevent a reversal algorithm and uses a lot of math to help reduce the speed of brute forcing the algorithm.

An example of the brute force done on common algorithms today is like I myself have got a website to brute force sha1, sha256, sha512, md4 and md5. Currently I am using a i7 3.2GHz 4 core 8 threads but in just over a year I will have in addition to that, another machine with an Xeon 2.27GHz 16 core 32 threads where there are 2x 8 core cpu boards connected to the motherboard doubling the performance along with 18TB of harddrive space and 9 individual hard drives. And I'm not the only one doing this. I have seen people who own 6 servers each with an Xeon processor 2.27GHz 8 core each. The conclusion, don't use a staight foward pre-made algorithm that has been around for a while. Instead hash a substr() of a hash or make a custom algorithm like this so that nobody can use pre-existing databases to reverse a hash.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just got some open source code from an irc member at internode and the code they provided works great. http://seattle.cs.washington.edu/svn/seattle/trunk/seattlelib/sha.repy
That is the link they gave me but I would love to here more on how to do it for sha256 sha512 and md4. Love the power of open source.

Gribouillis commented: nice link +4
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I guess I'll be the first to say this and I'll say:
"I'm a super geek!"

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

PS. I have had this working on another site put was using the form function POST instead of GET. Would that make a difference?

Let me be the first to say welcome to daniweb. Also I would like to give you some credit as a first time poster as it is little comments like that which makes our lives so much easier.
The answer of the question lays in when you changed the data submission method from get to post. When changing this piece of html code you will need to adjust the php code accordingly. Why? Because when the method get is used, the data will be stored in the $_GET array. However when the post method is used, the data will be stored in the $_POST array. And because you changed from get to post you need to change $_GET to $_POST. Below is the corrected version of the code you have posted.

$submit = $_POST['Submit'];
$id = $_POST['Id'];                       
echo getuser($submit, $id);

A very simple problem and also note that the names inside the quotes are case sensitive.

kvprajapati commented: (: +11
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

To be honest, simply doing www.domainname.com/username/ would be much simpler.

I beg to differ and say it's just as simple to get a subdomain for the user as it is for a subdirectory. I just happened to come across this issue a couple of years ago and already know the answer provided you use cpanel. In cpanel delete all of the subdomains for the domain your going to use for this project then create a subdomain called '*' (without the quotes). So just a * is the subdomain. Then point the subdomain to a directory which will process all of the subdomains. In that directory you should have a brand new blank index.php ready to create. Now with that one subdomain, any subdomain you enter will point to that index.php file. All you need to do is find out what the subdomain is and fetch relative content from the database. To make things easier, php stores the domain information in $_SERVER; Or at least one of those $_SERVER variables. So using that variable you can substr() to your subdomain and find out from the database which user owns the subdomain and which content should be displayed for that subdomain.

So that's a brief overview of how it works and any questions just post away.

showman13 commented: This is EXACTLY the kind of response I was looking for... thank you +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Here is 2 examples of how to do it in the one script. Just delete the Option A section or the Option B section to view each example individually. As they both share the code at the top.

<?php
$items=array('apple','apple','poison','fruit','fruit','banana','veg','veg','veg','strawberry');
$count=array();
foreach($items AS $val) {
    if (!isset($count[$val])) {
        $count[$val]=1;
        } else {
        $count[$val]++;
        }
    }

    
    
    
    
//Above is required for both of below
////////////////////////////////////////////////
//Option A
    
foreach ($items as $product ) {
echo $product;
?><input type="text" size="2" value="<?php  
//display quantity here
echo $count[$product];
  ?>" name="quantity" /><?php
}

echo '<hr>';////////////////////////////////////
//Option B
foreach ($count as $product=>$counts ) {
echo $product;
?><input type="text" size="2" value="<?php  
//display quantity here
echo $counts;
  ?>" name="quantity" /><?php
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

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.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster
print "&nbsp;<a href='$_SERVER['PHP_SELF']?s=$prevs&q=$var'>&lt;&lt; Prev 10</a>&nbsp&nbsp;";

php5
unexpected t_variable:: $PHP_SELF does not exist in php5

I was a bit suspect about that variable. It is $PHP_SELF only when globals are enabled. However as of php5 globals have been depreciated. Also almost bob's script has a bug. You forgot the {} brackets around the array. But here is the corrected example (my version).

if ($s>=1) {
  $prevs=($s-$limit);
  print '&nbsp;<a href="'.$_SERVER['PHP_SELF'].'?s=$prevs&q=$var">&lt;&lt; Prev 10</a>&nbsp&nbsp;';
  }

Here is almost bobs script corrected.

print "&nbsp;<a href='{$_SERVER['PHP_SELF']}?s=$prevs&q=$var'>&lt;&lt; Prev 10</a>&nbsp&nbsp;";
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

hi, may i know the step u do it. My problem is how to save url on database...
thanks in advance.

To save into the database simply have a column named url and maybe a column named title then to insert use the following syntax.

mysql_query('INSERT INTO `movies` SET `title`="matrix reload", `url`="1647.flv"');

And to select it all you need to do is mysql_query('SELECT `url` FROM `movies` WHERE `title`="matrix reload"');
Very simple. Then of course you pass the url to a client side flv/movie player.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

When your mobile phone is more powerful then your first computer.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

To limit it to 4 records then in addition to what I said before do the following sql query as well.

$query_latestJobPost = "SELECT * FROM tbljobad ORDER BY postDate DESC LIMIT 4";
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

...bourgeois shenanigans.

I will have to use the dictionary for that.

jephthah commented: i win. :P +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Edit: Didn't read the previous post and said the same thing

Carrots commented: Thanks for the help :) +2
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following.

<?php
include ("dbConfig.php");
require ("check.php");

if($_GET["cmd"]=="edit" || $_POST["cmd"]=="edit")
{
   if (!isset($_POST["submit"]))
   {
      $id2 = $_GET["id2"];
      $sql = "SELECT * FROM contacts WHERE id2=$id2";
      $result = mysql_query($sql);        
      $myrow = mysql_fetch_array($result);
      ?>
	  
      <form action="<?php $v=explode('?',$_SERVER['PHP_SELF']); echo $v[0]; ?>" method="post">
      <input type=hidden name="id2" value="<?php echo $myrow["id2"]; ?>">
   
      Name:<INPUT TYPE="text" NAME="name" VALUE="<?php echo $myrow["name"]; ?>" SIZE=30><br>
      Email:<INPUT TYPE="text" NAME="email" VALUE="<?php echo $myrow["email"]; ?>" SIZE=30><br>
      Who:<INPUT TYPE="text" NAME="age" VALUE="<?php echo $myrow["age"]; ?>" SIZE=30><br>
      Birthday:<INPUT TYPE="text" NAME="birthday" VALUE="<?php echo $myrow["birthday"]; ?>" SIZE=30><br>
      Address:<TEXTAREA NAME="address" ROWS=10 COLS=30><?php echo $myrow["address"]; ?></TEXTAREA><br>
      Number:<INPUT TYPE="text" NAME="number" VALUE="<?php echo $myrow["number"]; ?>" SIZE=30><br>
   
      <input type="hidden" name="cmd" value="edit">
   
      <input type="submit" name="submit" value="submit">
   
      </form>
      
<?php      
   }
}
   if (isset($_POST['submit'])) {
   	  $id2 = mysql_real_escape_string(stripslashes($_POST["id2"]));
      $name = mysql_real_escape_string(stripslashes($_POST["name"]));
	  $email = mysql_real_escape_string(stripslashes($_POST["email"]));
	  $age = mysql_real_escape_string(stripslashes($_POST["age"]));
	  $birthday = mysql_real_escape_string(stripslashes($_POST["birthday"]));
	  $address = mysql_real_escape_string(stripslashes($_POST["address"]));
	  $number = mysql_real_escape_string(stripslashes($_POST["number"]));
 
	  $sql = "UPDATE contacts SET name='$name', email='$email', age='$age', birthday='$birthday', address='$address', number='$number' WHERE id2=$id2";
 
      $result = mysql_query($sql) or die(mysql_error());
      echo "Thank you! Information updated.";
	}
?>
kunyomi commented: Patient and just simply genius! +1
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Nice picture and can't wait until I get to the white chocolates. They taste so good. I wonder if a rabbit trap will catch the bunny this year.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

As well explained your post was I didn't exactly get the problem. From my understanding you want to use regex to extract links from html input. If that is correct then the following would be your solution.

<?php
$html_input='<img class="a" title="htc-pure-1" src="http://www.site.com/wp-content/uploads/2010/03/htc-pure-1.jpg" alt="">';

preg_match_all('@\<img[^\>]+src\="([^"]+)"[^\>]+\>@Uis',$html_input,$output);

$output=$output[1];
print_r($output);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

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 post a topic with your current progress asking for hints/clues and not the answer. A good programmer can easily work off hints and clues like I do every day. But if this is php or c++ then I may be able to help you a little but until you show reasonable effort there is not much we can do.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It seems the policies on publishing tutorials on daniweb are very strict but is there any reason why they need to be unique (eg. SEO) It would be nice if daniweb had a wiki that everybody could contribute to.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If you want to insert into different columns different values then try the following.

$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;
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

how to restrict if a particular url came , some of the condition that should not to execute...

So you want to check if the url is a specific location? Is that correct? Also I have found a nice tutorial for you at http://corz.org/serv/tricks/htaccess2.php

logonchristy commented: nice +1
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Also on line 10 you need to change to the } type bracket.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have completed the script and is as follows:

<?php
session_start();
$dbhost = 'localhost';
$dbname = 'mydatabase';
$dbuser = 'root';
$dbpasswd = '';
$link_id = mysql_connect($dbhost, $dbuser, $dbpasswd);
mysql_select_db($dbname, $link_id);

$fl = "common.php";
$f = file_get_contents($fl);

$sql = mysql_query("SELECT langkey,cy,en FROM pl_terms2 WHERE filename = '$fl'");
$f = str_replace(array("\t",'  ','  ','  '),array(' ',' ',' ',' '),$f);
while($d = mysql_fetch_assoc($sql)){
   $key = $d['langkey'];
   $cy = $d['cy'];
   $en = $d['en'];
   $f=str_replace(' \''.$key.'\' => \''.$en.'\',',"    '".$key.'\''.str_repeat(' ',(40-strlen($key))).'=> \''.$cy.'\',',$f);
}

$f = str_replace("\r\n","\n",$f);
file_put_contents($fl,$f);
?>
diafol commented: To the rescue once again! +5
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well could you post as an attachment a sample text file this script may read. Then I may be able to do a better regex for you.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The following is an example of how to use my example.

$key='THIS_KEY';
$value='New value';
preg_replace("@'$key'.*=>.*\n@Us","'$key' => '$value'\n",$file_input);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Do you mean like this?

$result = mysql_query("SELECT Fieldvalue FROM kid_rsform_submission_values WHERE SubmissionId IN (SELECT SubmissionId FROM kid_rsform_submission_values WHERE FieldValue = '850830126317') LIMIT 14");
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I disagree. What your describing is you get a book written in french then translate it to english and have a uncopywrited work. Obviously that isn't how it works in the real world nor is it how it works in programming languages. So clearly changing it to another programing language with the same concepts and principles will make it illegal. The only thing in this world that is not copywrited is ideas. So therefore you may copy ones idea but how you go about doing that idea must be different or original. So in this case you have some open source or purchased code and you want to adapt it to your project, the only way you can really do it is study the code for the ideas then write your own version based on those ideas. Hope that helps as I have read all about the australian copywrite laws.

That's a tricky one. We all base our codes on stuff we learn from books, tutorials, help from forums etc. When one is sufficiently proficient, "original code" may be possible.

If you're producing 'drastically different' code from the original, but have used it as a 'resource' / 'idea' / 'starting point', you may be OK. Have you contacted the author to check whether this would be OK? Omission of the copyright symbol etc, on a website does not, *as far as I know* mean that there is no copyright. Any code written by the author and published online has "implied" …

nav33n commented: Interesting point. +6
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Why don't you use strip_tags like the following?

$input='input<br><b>string</b>';
strip_tags($input,'<p><br>');

That will strip every tag except the <p> and <br> tags. I believe that is the solution to your problem...

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If your going to do that then I would suggest the following:

<img src="http://<?php echo urlencode($_GET['code']); ?>.example.com/<?php echo urlencode($_GET['id']); ?>">

That will stop xss attacks.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hello Kyle, thanks a lot for your reply.

I'm not placing my php scripts in the cgi-bin/php folder, my scripts are inside the folder structure of my website. As you say, they were executed fine anywhere in the server when I had my website in another hosting so I thought this would be the case in this new hosting aso, but for some reason it isn't.

Anyway, I tried copying the php scripts in the cgi-bin/php folder, but still it's not working because it is trying to find the whole path following the folder. For instance, if the script is in:

www.mywebsite.com/edition/myscript.php

it is trying to execute:

cgi-bin/php/mywebsite.com/edition/myscript.php

which of course can't find.

I'm really lost here...

Why don't you move the php folder out of the cgi-bin and place it at the proper location so the url's dont need rewriting. Also having php files in a cgi-bin can cause problems as for example the server may treat the php files as cgi/perl files. And permissions are different in the cgi-bin directory resulting in possible productivity loss. So I would suggest moving those files to a place where they wont need rewriting to.

Altairzq commented: Thank you! +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

So my question is, "Does the browser have an effect on the type of a file uploaded?"

Yes because if you go into the Opera preferences you will see that Opera will only recognize web related mime types. Other mime types are not programmed into Opera where as a browser like firefox may use the windows file system to recognize file types.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Do you mean $_POST['text1']=$_POST['text2']; ?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Line 19 and 20 should be replaced with the following.

if (mail($to, $subject, $message, $headers))

Also if you want to check the results in your cgi script then it would be as simple as comparing the return value. Eg.

if ($result=='Success the email was sent.') {
//success message
} else {
//fail message
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try make action="success.php" and in success.php place the following code.

$url = 'http://www.mywebsite.com/cgi-bin/cgiemail/form/form.txt';

//url-ify the data for the POST
foreach($_POST as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string,'&');

//open connection
$ch = curl_init();

//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);

//execute post
$result = curl_exec($ch);

//close connection
curl_close($ch);

That should forward the post to your other action.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

This is the most undocumented problem I have come across. All of the official documentation to the older versions of Imagick have been wiped and downloads are hard to find. But still after spending 9 hours flat finding peoples comments on old topics related to Imagick I manage to solve it and wrote a tutorial about it. My tutorial is the only one in existance which works with php 5.2.X and hope that helps future Daniweb posters. Surprising how undocumented this problem is and yet this problem is so common.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I think the reason why 0 is not isset is because the binary value of zero is 00000000. So any variable/array with the binary value 00000000 is said to be not isset. That is why zero is unset.

diafol commented: thanx for putting me straight on that +5
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Double post and no code tags. I wonder what the the mods will think of that. But as the the solution - replace your while loop with the following.

while($noticia = mysql_fetch_assoc($result))
{
if($bgcolor=='#f1f1f1'){$bgcolor='#ffffff';}
else{$bgcolor='#f1f1f1';}

echo "<tr >";
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>".$noticia['id'].'</font></td>'; 

echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>".$noticia['name'].'</font></td>'; 
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>".$noticia['class'].'</font></td>'; 
echo "<td align=left bgcolor=$bgcolor id='title'>&nbsp;<font face='Verdana' size='2'>".$noticia['mark'].'</font></td>'; 

echo "</tr>";
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The results of the three "echo" statements are as follows:
Regen remainder: 57
Current time: 1264322357
1.2643223E+09

This is a limitation in the computing world (64 and 32 bit processors). They can only store so many numbers before showing all weird things. Fortunately php has a way around this. When doing math for large numbers try using the bcmath library. This will store the numbers as strings and process the numbers as strings. Then you may have infinit sized numbers. If you like post your full code and I shall try to implement it for you.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

fast? how fast? microseconds? i dont care how fast it is. firefox speed is fast enough. it doesnt seem slow. maybe it dependent on the users computer speed. but to me, the speed of browsing experience in firefox is enough to satisfy my needs. and i dont think those add-ons are simple. they rocks! dude! and that makes them on the TOP! and so what if the opera can open unlimited tabs? is that an advantage? most people dont open so many tabs, especially organized people. so that advantage seem to be useless.

I always have around 20 tabs open and Firefox crashes when I try to do that. Opera is the only browser that can keep over 20 tabs open 24/7 as I do. Take a look at a screeny of my browser.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well, there goes Cancer research, disease control, pest control. Our world will be a better place when dangerous bacteria can run rampant because, as an organism, it's treated as a human. And mosquitoes...

lol. I never thought of it that way before. From what I am reading on this topic I guess some animals/organisms should have some rights but not the same rights as humans. Interesting to see how the world would be like with animal rights laws. But yea - from that quote I can see why other organisms don't have the same rights as humans.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

There's smoke coming out of my cpu again and I'm not sure what to do. I googled it and found the answer to be "your waffles are ready". I guess it's not a good idea to cook my waffles on the cpu.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Interesting thread and I thought vegetarians had all the answers.

Is this the underlying issue? Personally, I don't see a problem with treating clones the same as naturally born creatures of the same species. The end result is the same, so who cares what the process was?

Well as for why somebody would care about the process is that clones are like machines. They can be created and programmed then destroyed for spare parts. However they still are organisms but a low level organism and what does that describe - animals. However if every organism was treated as a human then there would be no problem with producing clones.

Do lions care how the zebra is feeling when they hunt it down and devour it?

Except there is one difference between lions and humans - intelligence. And it is intelligence that is going to doom us all because we mass hunt. So far it sounds like more people prefer evolution to go through its natural process until humans are the only species left on the earth. Now I think about it after reading this thread perhaps it is the concept of money that has made things terribly bad because people can buy as many hunted animals as they want where as in the olden days people would have to go into the fields and actually shoot some animals instead of buying. But anyways I am starting to see why animals don't have the same/similar rights as humans (Natural instincts).

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I borrowed a friends computer and needed to make an online payment. So I looked at the box then placed my credit card into the floppy drive to make the payment. The payment didn't work but now my credit card is stuck in a friends computer. Does anybody know how to fetch a credit card from a floppy drive?
I read this one on the net and if you have any statements like it then please share... So funny lol.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

What you are saying is that animals can own property, demand a trial by their peers, grow their hair long, marry your sister, sue you for cannibalism, demand a translator when applying for public assistance.

Animal rights = human rights is retarded and make no sense.

I was mainly referring to things like animal abuse and hunting of animals. Animals have emotions too you know. While they may not be the same as us humans, they should be treated with the same respect as a human is treated. And yes I would agree animals should be allowed to demand a trial by their peers when/if we can communicate with them. But as you know we can't talk to animals and vice versa so humans have to speak for the animals. And I suspect species like wales we will never see again due to this lack of respect. So if you think evolution should just take its toll then go ahead and vote no.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Do you believe international animal rights laws should be introduced just like how there are human rights laws? IMO, clones are like animals since their not a creation of god or evolution and giving animals the same rights as humans would mean clones would also have the same rights as humans. But there is also things like whale hunting which would never happen if animals had the same rights as humans. Hopefully there is a poll on this topic as it is my first voting poll and lets see what you have to say...

ahihihi... commented: (^.^)yes +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have been asking for some time to move forum28 to it's own main forum in web development instead of being a subforum of web design but it seems everybody has been confused about what I am talking about. So I've now started my own thread... Anyways, it seems that Graphics and Multimedia (forum28) is more than just web design but cover a wide area such as 3d modeling, cad, flash so that is why I was asking if it is possible to move forum28 (Graphics & Multimedia forum) up a level so it appears just below the web development category instead of the web design category. Then the forum will be more accessible and you might even get more visits in that forum since it would then be in the top grey menu.

Above is my main question but if you have the time to spare then please read the below...

In addition I thought I would mention about the php code tag. It could be improved a little while not urgent. I notice the php code tags do not notice the difference between html and php. Shouldn't the php code tags have in its algorithm set so that inside <?php and ?> is php code and all other code is html code? Also note both html and php can be used in the same script. Just would make some code cleaner on the php forums.

Thanks...
cwarn23

diafol commented: good idea +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Energy cannot be destroyed , it can only change forms, so universe was there before concept of time came in and it will continue to be there after concept of time vanishes.

While energy cannot be created or destroyed, there is nothing to say energy can't be transfered. What if our universe was the result of an ancient experiment in an alternate universe. I have heard of a theory where there are infinite universes containing every possible combination outcome and there is the other theory where there is only one alternate universe also called the parallel universe. So logically something in the parallel universe would have created time making the energy outside the timeframe/space of all alternate universes transform into a new universe. For all we know new universes could be created like new galaxies.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

hi and welcome to daniweb. Next time please start a new topic instead of bumping a really old topic. As for the problem, there is probably a bug in your query. So try replacing line 201 and 202 with the following

$query = mysql_query($sql) or die(mysql_error()); 
$nume = mysql_num_rows($query); // --> line 202
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi and I am making a dll but the dll won't accept pointers due to what it links to. So below is my code and does anybody know how to make a string array without pointers? Also I'm using Visual c++ 2008.

//#pragma warning(disable:4996) //disable "depreciated function" warnings
#include <windows.h> //required for dll
#include <sstream>
#define DLLEXPORT extern "C" __declspec ( dllexport )


BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}

 DLLEXPORT std::string *explode (std::string exploder, std::string original, int limit=0) {
	std::string tmp;
	tmp=original;
	int num, loc, x, limiter;
	limiter=0;
	num=1;
	while (tmp.find(exploder)!=std::string::npos) {
		if (limiter==limit && limit!=0) { break; }
		if (limit>0) { limiter++; }
		loc=tmp.find(exploder);
		tmp=tmp.substr(loc+exploder.length());
		num++;
		}
	std::string *result;
	x=(num+1);
	result = new std::string[x];
	/*std::string s;
	std::stringstream out;
	out << x;
	s = out.str();
	result[0]=s;*/
	result[0]="1";
	num=1;
	tmp=original;
	while (tmp.find(exploder)!=std::string::npos) {
		if (limiter==limit && limit!=0) { break; }
		if (limit>0) { limiter++; }
		loc=tmp.find(exploder);
		result[num]=tmp.substr(0,loc);
		tmp=tmp.substr(loc+exploder.length());
		num++;
		}
	result[num]=tmp;
	return result;
}

Thanks...

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Also while this topic is active could somebody mention why there isn't a forum for 3d modelling and digital artworks other then the web development multimedia. Would it be possible to create such a forum or perhaps move the multimedia forum to somewhere where it is more accessible by the menus.