nav33n 472 Purple hazed! Team Colleague Featured Poster

So it both pains, and burns/stings/scratches you there? Hmm...

No. It only pains. I thought even you felt the same after reading that. But I guess, I was wrong. Oh, btw, I only said it pains, I wonder how you felt burns/stings/scratches!

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) You are welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yep, possible. Use nl2br ! Eg.

<?php
print nl2br($_POST['textarea']);
?>
<html>
<body>
<form method=post action=test.php>
<textarea name=textarea cols=20 rows=20></textarea>
<input type=submit name=submit value=submit>
</body>
</html>

Cheers,
Nav

nav33n 472 Purple hazed! Team Colleague Featured Poster

Well, leet/l33t/l337/... came from the word 'elite'. Replacing alphabets by 'look-alike' numbers and other characters was the key. For example, using 4 as A, 3 as E, 7 as T, 5 as S and so on. Hackers, crackers, etc used to use this term. But not anymore. That's because, reading something written by/in leet is not only irritating, but also, a pain in the err.. 455 (pun intended!)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Wow, sos that was horrible.
|33t? It's 1337 dude. Pipe (|) is an I. And if you didn't know all the 1337 letters to that word, why didn't you just type leet? 0|-| /\/\'/ 90|)
7|-|47 5|_|<|<5 73|-| |\||_|75 |=0|2
j00!

hmmm.. Now i m cursing myself for using two 3's in my name. (naveen was already taken and i couldn't come up with any jazzy/weird name !) but bah ! i hate l337 talks !

nav33n 472 Purple hazed! Team Colleague Featured Poster

What I don't understand is, why does it show the 'server side scripts' !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb! Please post your questions in java forum !

nav33n 472 Purple hazed! Team Colleague Featured Poster

After you login to your site using cuteftp, you will probably find a list of folders. Search for the above path. Well, If you can't find the path, then there is no path ! Create a folder called images, with path, /var/www/vhosts/cyberpetcity.com/httpdocs/. Put all your images inside that folder.

nav33n 472 Purple hazed! Team Colleague Featured Poster

As cfroese has mentioned, its the path where you have all your images. You can login through your ftp credentials and check where your images are. Then edit the path in this script.

nav33n 472 Purple hazed! Team Colleague Featured Poster

select * from members where between '//' and '//' and mbranch=''

The variable $qw isn't holding any value. Check out the value of $qw during the execution of this part.

(if($radio=='sreg') { $qw="mdate";}
if($radio=='sexpir') { $qw="mend";} )

nav33n 472 Purple hazed! Team Colleague Featured Poster

You are new to php and you have written a lengthy script ! Interesting ! anyway, I would suggest you to put the query in a variable, then pass the variable to mysql_query. Eg. $query="select * from members where $qw between '$dfrom' and '$dto' $q1 $q2 $q3 $q4 $q5 $q6 $q7"; and then, $result=mysql_query($query); instead of, $result=mysql_query("select * from members where $qw between '$dfrom' and '$dto' $q1 $q2 $q3 $q4 $q5 $q6 $q7"); Print $query variable. Execute the 'echoed' output in phpmyadmin. The bottomline is, echo the query, execute it in phpmyadmin, debug your error (cuz thats where the error is!)

nav33n 472 Purple hazed! Team Colleague Featured Poster

function getnextt($result,$qwery){
global $uid,$msex,$mgsm,$memail,$mstep,$mname,$medu,$mcheq,$msale,$amm,$mtitle,$mfirst,$mmiddle,$mlast,$mtype,$tott,$mlogin,$mrefer,$mcountry,$mbranch,$mnation,$mnation2,$mdate,$mend,$mphone,$midno,$midnodate,$midplace,$mbirtharabic,$mbirthplace,$mbirth,$mmarital,$domain,$domainx;
if(!$qwery){
$row=mysql_fetch_array($result);
if($row)
{

The parameter $result. Check where you are passing the parameter to this function. Also check $result value before calling the function.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Well, thats because, the variable $result is empty or doesn't have a valid mysql resource. Try printing $result value. If it prints null(ie., if it doesn't print anything!), then you know where your problem is.
Btw, Next time you post your question, please put your code within [c o d e] [/ c o d e] tags.

nav33n 472 Purple hazed! Team Colleague Featured Poster

dont know. Iamthewee is a bit wierd sometimes, just ignore it

ditto.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I have my PHP inserting into Oracle 9i.
But how do I prevent duplicate record entries?

I only have 3 fields in the insert in the action page and my below attempt doesnt output anything or insert anything even if not a duplicate:

There are some errors in your script. $mydupcheck = "select * from personTable where firstname = $_POST[firstname] and lastname = $_POST[lastname] and emailaddress = $_POST[emailaddress]"; Since firstname, lastname and emailaddress are strings, you should put them in quotes. And btw, you are not executing that query.

if($mydupcheck)
{
echo "Duplicate entry";
}

nav33n 472 Purple hazed! Team Colleague Featured Poster

This is a really common problem that occurs when using php to redirect users. The header must be at the top of the page (first thing the browser reads).

Wrong. The header can be anywhere in the script. The only thing is, you shouldn't output anything before the header function(not even a html tag). header("location: http://whatever.com/thankyou.php"); is just as good as echo("<script>location.href = 'http://whatever.com/thankyou.php';</script>"); P.S. header is comparatively faster since its a php function, where as in the other case, it should first 'echo' the redirect script.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I have used this one and its good (Perl, php and javascript).

nav33n 472 Purple hazed! Team Colleague Featured Poster

3. right click on mycomputer\manage\services and applications\services. find the wampapache and wampmysql then start them.Also, make starttype property "automatic" not the "manuel".

When you start wamp server, it will automatically start these services for you.

nav33n 472 Purple hazed! Team Colleague Featured Poster

To build a web application, you should have the skills of a web developer !

nav33n 472 Purple hazed! Team Colleague Featured Poster

php has a library that can handle it too (the GD library), however I can't get it to work on my system, but definitely not in fopen.

You are right..

nav33n 472 Purple hazed! Team Colleague Featured Poster

Check this out.

@ryan_vietnow, How can we use fopen to create a thumbnail ? It can be done using css( and maybe javascripts, I m not sure).

nav33n 472 Purple hazed! Team Colleague Featured Poster

Are you starting apache service ? Is it configured properly ? (servername=localhost and stuff like that ?) Check error.log in logs folder of apache to check if there are any errors. I have never used sokkit, but a similar software called wamp. You don't have to do configure anything in wamp.

nav33n 472 Purple hazed! Team Colleague Featured Poster

In your oscommerce, check for the file which connects to the database. Check hostname, username and password. Hostname should be localhost, specify the username and password if you have created any (by default, username is root).

nav33n 472 Purple hazed! Team Colleague Featured Poster

Word games are boring sometimes.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I use windows because of its simplicity. I also find linux lil boring. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb Tim. But this isn't the right forum to post your question ! Try here.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Nope. There is nothing wrong with the php version you are using. Did you take off the refresh part of your code and tried again ? I would suggest you to split your code into small parts and make those small parts work first.

nav33n 472 Purple hazed! Team Colleague Featured Poster

window.location='url.php?user=blah&password=blah'

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Teacher ! Didn't I ask you to leave the kids alone. Why are you irritating them again ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

i want to shoot my printer

:D Shoot it if you have a gun !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Battlefield 2 and 1942
Operation Flashpoint and Armed Assault
Guild Wars
The Movies
Sim City 4
Civilization 3
Command and Conquer Generals
Command and Conquer 3
Fallout 1/2

Wow dude ! You play alot of games ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

I was playing Driver-parallel lines some days ago. Now i am playing NFS-UG2. I will be playing Bioshock soon.

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb Daniel. If you know java, then i am sure it won't be difficult for you to learn php.
Cheers,
Nav

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

... I have been drinking this water for umm.. 24 yrs ...

If we're going to be sticklers for accuracy, please accept this correction: You may have been drinking water for 24 years--but definitely not THIS water. "This water that you have drunk has left your body in many forms--as sweat, exhaled vapors, urine, and more yet. It is highly unlikely that you drank the same molecule of water more than once. Yes most of the worlds water is recycled, but there is so much of it that we don't usually get the pleasure of drinking the same water more than once.

[Don't let the above comment disturb you, is is said with a simple smile :).]

Okay! If you say so, I drink new water everyday. The above comment didn't disturb me. It was taken with a simple smile :)

nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="test";
$tbl_name="users";
mysql_connect($host, $username, $password)or die("cannot connect");
mysql_select_db($db_name)or die("cannot select DB");
$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
?>
<table width="400" border="0" cellspacing="1" cellpadding="0">
<tr><td><form name="form1" method="post" action="">
<table width="400" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC"><tr>
<td bgcolor="#FFFFFF">&nbsp;</td>
<td colspan="4" bgcolor="#FFFFFF"><strong>Delete multiple rows in mysql</strong> </td></tr>
<tr><td align="center" bgcolor="#FFFFFF">#</td>
<td align="center" bgcolor="#FFFFFF"><strong>Id</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>Name</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>Lastname</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>Email</strong></td></tr>
<?php while($rows=mysql_fetch_array($result, MYSQL_ASSOC)){ ?>

<tr><td align="center" bgcolor="#FFFFFF">
<input name="checkbox[]" type="checkbox" id="checkbox[]" value="<? echo $rows['user_id']; ?>">
</td><td bgcolor="#FFFFFF"><?php echo $rows['user_id']; ?></td><td bgcolor="#FFFFFF">
<?php echo $rows['login_name']; ?></td><td bgcolor="#FFFFFF"><?php echo $rows['first_name']; ?></td>
<td bgcolor="#FFFFFF"><?php echo $rows['email']; ?>
</td></tr>
<?php } ?>
<tr><td colspan="5" align="center" bgcolor="#FFFFFF">
<input name="delete" type="submit" id="delete" value="Delete"></td></tr>
<?php
if($_POST['delete']){
for($i=0;$i<count($_POST['checkbox']);$i++){
$del_id = $checkbox[$i];
$sql = "DELETE FROM $tbl_name WHERE id='$del_id'";
print $sql;
$result = mysql_query($sql);}

if($result){echo "<meta http-equiv=\"refresh\" content=\"0;URL=h_delete.php\">";}}
mysql_close();
}
?>
</table></form></td></tr></table>

This works for me. Umm.. I have also printed the query and it prints ,

DELETE FROM users WHERE id='1'
DELETE FROM users WHERE id='2'
DELETE FROM users WHERE id='3'

I have no clue why your code is 'losing' checkbox array values.


Try taking out this part if($result){echo "<meta http-equiv=\"refresh\" content=\"0;URL=h_delete.php\">";} and then check. Maybe the page is getting refreshed, so its losing the posted values. Lets see if that works.

Cheers,
Nav

nav33n 472 Purple hazed! Team Colleague Featured Poster

Republicans, politicians, nationalists are some words that I find hard to understand.

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) you are welcome!

tirivamwe commented: Dont give up, keep the spirit of helping. Sometimes i wish if i was like you +3
nav33n 472 Purple hazed! Team Colleague Featured Poster

Simple. By using fgetcsv.

iamthwee commented: I approve! +13
nav33n 472 Purple hazed! Team Colleague Featured Poster

I am not sure if you are replying to my post or another.
There are two problems:
Problem 1:
I have created a form, you can view it at: www.lifespringnaz.com/form/lifegroup.html
I want to redirected it to a "thank you " at www.lifespringnaz.com/form/confirm.html.
What code would I use here? And where do I put it?

By using a header function. Your page should be a php page and not html. I mean, www.lifespringnaz.com/form/lifegroup.html should be www.lifespringnaz.com/form/lifegroup.php to use the php functions. Or you can configure apache so that it parses html files using a php parser(which is lil complicated for time being). After doing whatever you wanna do with the posted form values, use this. header("location: www.lifespringnaz.com/form/confirm.html"); This will redirect the user to "Thank you" page.

Problem 2:
When filling out the form in Explorer, after I hit the the submit button I get a message "am I sure I want to send this from my email address"? ...it brings up the person’s email application and creates a message then you hit send. Is that going to work with everyone’s email apps? What if they just used web-based email?
I would like to eliminate those extra boxes, is there a way to have it generate that email il message internally without having the additional step of launching the email application.
Most forms I submit online like that don’t have the additional step/s …

nav33n 472 Purple hazed! Team Colleague Featured Poster

hmm.. can you show your latest script ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

no thanks. I don't want a free account.

nav33n 472 Purple hazed! Team Colleague Featured Poster
<html>
<body>
<form name="form" method="post" action="test.php">
Number: <input type="text" name="number"><br />
<input type="submit" name="add" value="+"><input type="submit" name="subtract" value="-">
</form>
</body>
</html>
<?php
$conn=mysql_connect("localhost","username","password");
mysql_select_db("dbname");
if(isset($_POST['add'])){
	$add=$_POST['number'];
	$query="update goods set stock=stock+$add where id=1";
	mysql_query($query) or die("Cannot update");
}
if(isset($_POST['subtract'])){
	$subtract=$_POST['number'];
	$query="update goods set stock=stock-$subtract where id=1";
	mysql_query($query) or die("Cannot subtract");
}
?>

Umm.. you forgot to put your code in [ c o d e ] [ / c o d e ] tags. Anyways, I hope this helps.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb. This isnt the right forum to post your code. Post it in php forum. Cheers!
Oh, and one more thing. when you post your code, please use [ code] .. [/ code] tags.