279 Posted Topics

Member Avatar for asong

I believe you don't understand what DaniWeb Community is about; we are here to support people with IT problems. We are not your little slaves you can command and expect us to write an entire script for you. Atleast have the decency to try to make the script yourself. When …

Member Avatar for Graphix
-1
83
Member Avatar for serendipity

Perhaps try something like this?: [code] ... ...Header HTML ... <script type="text/javascript"> function entersubmit(event) { if (window.event && window.event.keyCode == 13) { return false; } else { if (event && event.which == 13) { return false; } else { return false; } } } </script> <form> <p> 1. The fundamental …

Member Avatar for serendipity
0
178
Member Avatar for NigelT

I know 2 reliable ways to redirect visitors: [code] <script type="text/javascript"> window.location.href="http://example.com/redirect.html"; </script> [/code] or you can redirect them using an .htacces file: [code] Options +FollowSymlinks RewriteEngine on RewriteRule ^(mypage.html)$ http://www.example.com/redirect.html [NC] [/code] So if someone visits [url]www.example.com/mypage.html[/url], he will be redirected to [url]http://www.example.com/redirect.html[/url] ~G

Member Avatar for NigelT
0
94
Member Avatar for Tryin2learn

Do you mean something like this?: [code] .... ....HeaderHTML.... .... <body> <?php if (!$_POST['submitbutton']) { ?> <form method="post" action="testform.php"> Text1: <textarea cols="30" rows="4" name="text1"></textarea><br /> Text2: <textarea cols="30" rows="4" name="text2"></textarea><br /> Text3: <textarea cols="30" rows="4" name="text3"></textarea><br /> <input type="submit" name="submitbutton" value="Submit the form" /> </form> <?php } else { // …

Member Avatar for Graphix
0
109
Member Avatar for mexabet

Something like this?: [code] $page = "mypage"; // You enter the page here if ($page == "list-album") { include('myfirst.tpl'); } elseif ($page == "list-image") { include('myfirst.tpl'); } else { include("somethingelse.html.inc"); } [/code]

Member Avatar for mexabet
0
149
Member Avatar for ilokana

It seems to me that you want to make a backup of your database. If you have acces to the mysql folder of the server and are able to open prompt: Then insert this into prompt: - Direct to the mysql folder: C: cd \xampp cd \mysql cd \bin Or …

Member Avatar for SoN9ne
0
72
Member Avatar for Graphix

I am currently working on a small script that allows people to insert BB-codes to edit their text. They are able to click a button (for example underline) and then the bb-code will appear at the end of the textfield-value. How can i retrieve the current position of the cursor …

Member Avatar for Graphix
0
182
Member Avatar for ENetArch

Instead of storing alot of code into a database and making extremely confusing code, couldn't you just make a file named "functions&objects.inc.php"? And then include this into your php-script: [code] <?php // // Filename: functions&objects.inc.php // function sayHi() { echo "Hi!"; } var x = new Array(); ?> [/code] [code] …

Member Avatar for somedude3488
-1
97
Member Avatar for tarunkhatri

Could you please post the full form? So we can adjust things so that it gets refreshed. ~G

Member Avatar for tarunkhatri
-1
112
Member Avatar for Graphix

I'm having a problem with IE, while it works in FF: the var doesn't save any \n aka enter. I have the following code: [code] <script type="text/javascript"> function addu() { var message = window.prompt("Enter the text that needs to be underlined below"); if (message != "" && message != "null") …

Member Avatar for ShawnCplus
-1
155
Member Avatar for Graphix

How do you acces a folder beneath the current folder? The upload script is at: htdocs/mysite/management/upload.php and i want the files to be uploaded at: htdocs/mysite/images/ What should the directory be?

Member Avatar for Graphix
0
116
Member Avatar for chupinette

Welcome to PHP :) To answer your question: There are multiple php processors, but i think XAMPP is the best (free!) option. I haven't had any problems with it so far, you can download it at: [url]http://www.apachefriends.org/en/xampp.html[/url] If you have created a php file, you need to copy it to …

Member Avatar for chupinette
0
110
Member Avatar for tarunkhatri

Try this? : [code] <?php if (!$_POST['submit']) { ?> <form action=test_insert.php method="post"> <table> <?php for($i=0; $i<10; $i++) { ?> <tr> <td><input type="text" name="employee_id<?php echo $i; ?>" value="0" size = "2" ></td> <td><input type="text" name="task_no<?php echo $i; ?>" value="0" size = "2" ></td> <td><input type="text" name="discription<?php echo $i; ?>" value="0" size …

Member Avatar for tarunkhatri
0
99
Member Avatar for JennyK

Ok i have found the solution :) , here it is: You make a file named "number.txt" in which you store the number. In PHP you retrieve the number and then +1's it if it isn't 4, else you set the number to 1. Then you save the new number …

Member Avatar for diafol
0
160
Member Avatar for BeckyAnne87

Let me first tell you: NEVER give a password through a SESSION UNCODED. I also recommend you simply do the following: - If a user has logged in (correctly) then a variable named $_SESSION['auth'] is set "true" or "yes" and if it is needed in the rest of the pages, …

Member Avatar for BeckyAnne87
0
135
Member Avatar for JayGeePee

I dont quite know what you mean with "auto-increment", do you mean the filename (e.g. the first user has unknown1.jpg and the second unknown2.jpg????)? Anyway, you can set a default value for a column by using DEFAULT in sql: [code] ALTER TABLE users ADD image DEFAULT 'unknown.jpg' [/code] or, [code] …

Member Avatar for diafol
0
214
Member Avatar for Graphix

Hi, I am currently writing a chatprogram, and it works fine in FF but it doesnt refresh as it should every 1500ms (set with setInterval("retrieve_messages()",1500) in body tag) in IE. The object ajax is made in previous code. I wrote the following code: [code] function retrieve_messages() { // Checks wether …

Member Avatar for Graphix
0
187
Member Avatar for davidjennings

First of all: use code tags? I dont quite understand the problem, i dont know alot of asp (your form-handler is a .asp file) or something but you want to pass down information through a form to a form-handlers i assume. First of all, there is NO url-output if you …

Member Avatar for davidjennings
0
175
Member Avatar for click here

You might want to look through the following daniweb page: [URL="http://www.daniweb.com/forums/thread59219.html#"]http://www.daniweb.com/forums/thread59219.html#[/URL]

Member Avatar for click here
0
98
Member Avatar for aashishn86

If your problem hasent been solved, I am personally very satisfied with XAMPP as it includes apache, mysql, filezilla and mercury in one. I haven't had any problems with it and you just place your files in the htdocs folder. You can download it at [URL="http://www.apachefriends.org/en/xampp.html"]http://www.apachefriends.org/en/xampp.html[/URL]. You can place your …

Member Avatar for aashishn86
0
247
Member Avatar for sssss01

This problem has been extensively discussed in the following thread: [url]http://www.daniweb.com/forums/thread214601.html[/url] ~Graphix

Member Avatar for Graphix
0
297
Member Avatar for veledrom

[code] <?php require_once("classes/class.session.php"); $sess=new SBase(); $values=$sess->getSession(); list($user, $loginlogout)=$values; if($loginlogout=="Logout"){ // assuming that this means you are logged in $response = "1"; }else{ // assuming that this means you are not logged in $response = "2"; } ?> <html> <head> <title>My php page</title> </head> <body> <?php if ($response == "1') { …

Member Avatar for EvolutionFallen
0
73
Member Avatar for Kfd

[code] <html> <head> <title></title> </head> <body> <?php // Here you do the calculations, for example + 2 if ($_POST['calculatebutton']) { $displaydata = $_POST['number']; $displaydate = $displaydate + 2; } else { $displaydata = 0; } // The form echo " <form> Number: <input type=\"text\" size=\"1\" name=\"number\" value=\"".$displaydata."\" /> <input type=\"submit\" …

Member Avatar for Kfd
0
91
Member Avatar for sam023

First of all: if you want to display text through php in the page you use either print() or echo().... The code: [code] <table> <?php while ($row = mysql_fetch_array($result)) { ?> <tr><td><?php echo $row['name']; ?></td></tr> <tr><td><?php echo $row['description']; ?></td></tr> <?php } ?> </table> [/code]

Member Avatar for somedude3488
0
98
Member Avatar for JayGeePee

This is what i suggest you could use as a upload page (named image_upload.php), you just need to insert what the max file size is,where the images should be stored (which folder) and which extensions are allowed: [code] if (!$_POST['uploadbutton']) { ?> The image needs to be under 2,5MB and …

Member Avatar for Graphix
0
500
Member Avatar for beanboy

It cant reset a form when there is no form.... Duh? [code] <html> <head> </head> <body> [B]<form method="post" action="myhandler.php">[/B] Text: <input type="text" name="textfield" /><br /> <input type="reset" name="resetbutton" value="Reset" /><input type="submit" name="submitbutton" value="Submit Text" /> [B]</form>[/B] </body> </html> [/code]

Member Avatar for anuj_sharma
0
156
Member Avatar for aerliana

At first: you need to have a record of somekind that registers when the users change their profile, for this you either need a very large file (not recommended) or a database. For example, you can create a table with MySQL: [code] CREATE TABLE users ( user_id INT(6) NOT NULL …

Member Avatar for almostbob
0
119
Member Avatar for agrophobic

[code] $query = "SELECT * FROM $table WHERE Suburb='$suburb'"; $result = mysql_query($query); [/code] But you will need to check wether the actual name of the column is Suburb and not suburb.

Member Avatar for Graphix
0
274
Member Avatar for kishou

I also had the problem using md5, it converts the password into random digits and alfanumeric characters. You need to compare the entered password md5 encrypted with the md5 encrypted in the database. For example: [code] $enteredpassword = "mypass"; $enteredusername = "me"; $query1 = "SELECT * FROM auth WHERE username='$enteredusername'"; …

Member Avatar for Graphix
0
310

The End.