1,741 Posted Topics
Re: Hi, Check out [url=http://www.w3schools.com/php/php_intro.asp]w3schools. [/url] for basics of php. If you want the whole package of php, apache and mysql, try [url=http://www.wampserver.com/en/download.php] wamp [/url] (for windows platform) or [url=http://www.apachefriends.org/en/xampp.html] xampp. [/url] Just install it and lo! you will have all the 3. All the best. Cheers, Naveen | |
Re: [QUOTE=niladri.user;532394]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php echo"Your posted name is\t".$_POST['name']; echo"Your posted roll is\t".$_POST['roll']; ?> <?php $con=mysql_connect("localhost","root",""); if(!$con) { die("could not connect:".mysql_error($con)); } mysql_select_db("form",$con); [COLOR="Red"]mysql_query("insert into submit values('$_POST['name']','$_POST['roll']')");[/COLOR] echo"1 record added"; mysql_close($con); ?> </body> </html> error is … | |
Re: [QUOTE=hax_hp;530040]hey yo I am sorry but that is very dumb..Why use PHP + MS Access that is a sucky combination. You see php is much much better with MySql. If you really need to use MS Access then I recomend you start getting into Asp.Net which just happens to be … | |
![]() | Re: Welcome to Daniweb :) |
Re: How do you make out whether a user is an admin, a student or a staff member ? | |
Re: You need to escape "\" by adding another "\". Eg. [code=php]<?php $path="C:\\Documents and Settings\\User 123\\My Documents\\"; ?> [/code] | |
Re: Have 3 textboxes in your form. Call it firstname, lastname and date_of_birth. The page submits to 'somepage.php'. In somepage.php, you can access the form variables like, [inlinecode] $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; .... [/inlinecode] Then in your query, you can use these posted form variables. [inlinecode] $query="select * from … | |
Re: Did you execute your query in phpmyadmin/mysql ? Is it just not printing any values or is it giving any error ? Can you show us your query ? | |
Re: umm..As far as I know, you cant do that without using frames. Even if you use include or require, whenever the page is loaded, it will include the banner page again. Lets see if someone has a solution for this ! | |
Re: Check the path of the images in your template. Maybe its hardcoded. Welcome to Daniweb btw. | |
Re: [code=mysql] update members set members.sponsor_program_id=sponser.program_id where sponser.id_num=members.id_num; [/code] This will update the members by setting sponser_program_id to the program_id of sponser when id_num of sponser is equal to id_num of members. | |
Re: [code=javascript] function showimage() { if (!document.images) return document.images.pictures.src= document.forms.os0.options[document.mygallery.os0.selectedIndex].value2 }[/code] .value2 ? | |
Re: LOL.. Great thread ! I think it should be bookmarked. *Tips to find a girlfriend* ! :P | |
Re: I dont see anything wrong with your script. I even doubt if its a php problem. Try out with simple examples to check if you get mails instantly ! The problem might be with smtp server ? | |
Re: :) Welcome to Daniweb.. Please read the guidelines before posting! | |
Re: lol.. Thats a very late intro ! I cant really say welcome to Daniweb because you are already "in" with 400+ posts :P | |
Re: That doesn't check for blank. Try [code=php] if(empty($_POST['username'])){ echo "Empty username!"; } //or you can also do it this way if($_POST['username']==""){ echo "Empty username!"; }[/code] | |
Re: Dude, I didn't understand your first part. But here's the answer for your second part. [code=php] <?php $url = 'http://www.directcosmetics.com/detail.cfm?code=15362'; $html = file_get_contents($url); $reg = '/<td class=\"rrp\"><strong>RRP<\/strong>(.*)<strong>SAVE<\/strong>/s'; preg_match($reg,$html,$matches); $rep_array=array("£","|"); print str_replace($rep_array,"",$matches[1]); ?> [/code] Cheers, Naveen | |
Re: [code=mysql] select staff.name, review.date, promotion.date from staff left join review on review.staff_id=staff.id left join promotion on promotion.staff_id=staff.id group by staff.name [/code] Wouldn't that work ? | |
Re: Welcome to Daniweb ! :) But what does this mean ? [quote]Glad fi know seh wi deh yah to![/quote] | |
Re: What do you mean by update a html page ? Can you be more specific ? | |
Re: Why dont you assign the value to a variable and then use that variable ? Eg. [code=php] <?php //page1.php session_start(); $_SESSION['eid']="1234"; // rest of your code... ?> <?php //page2.php session_start(); $eid=$_SESSION['eid']; $query = "SELECT eid, title, content, image, image2 FROM diary WHERE eid ='$eid'"; // rest of your code ?> … | |
Re: On line 23, [inlinecode] mysql_select_db($database, $administration); [/inlinecode] What are you trying to do ? If administration is the database name, you should give, [inlinecode]mysql_select_db('administration'); [/inlinecode] Read more on mysql_select_db [url=http://in.php.net/mysql_select_db] here[/url]. | |
Re: [code=php]<?php //test.php if(isset($_POST['submit'])){ $area=$_REQUEST['area']; $fd=fopen("test.txt","w+"); fwrite($fd,$area); fclose($fd); $file_contents=file_get_contents("test.txt"); print $file_contents; } ?> <html> <body> <form method="post" action="test.php"> Enter something: <textarea cols=40 rows=10 name="area"></textarea><br /> <input type="submit" name="submit" value="submit"> </form> </body> </html> [/code] file_get_contents reads the entire file into a string. Cheers, Naveen |
The End.