181 Posted Topics

Member Avatar for Borderline

You need to connect to a database (Such as MySQL) then perform the queries in your arrays (You also need to unescape the quotes after the "tfr", it will stop the query from working). Try something like this: [CODE] <?php //Why do all three of these have the same name …

Member Avatar for Borderline
0
96
Member Avatar for R3Slick

You can check for a search by the employee's name. Then you can check for a space. If there is a space you can split the two names with explode and then perform a query that matches first and last name. If there isn't any spaces only perform a query …

Member Avatar for R3Slick
0
147
Member Avatar for sssss01

So you want to have a user upload an image that will be stored in a folder and then recorded in a database? Then you want code to be able to retrieve that image? Is that correct?

Member Avatar for Graphix
0
297
Member Avatar for pradeeprs

Since you didn't give your email address, nor did you specify the address to CC to I've just put a empty mail function there. If you can provide a email addresses I can help you out. For more on mail() see the [URL="http://www.php.net/manual/en/function.mail.php"]PHP.net documentation[/URL]. [code=PHP] <?php if($_POST['submit']=="Submit"&&!empty($_POST['name']&&!empty($_POST['phone'])&&strlen($_POST['phone'])>10&&!empty($_POST['email'])&&# preg_match('/^[^\W][a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\@[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\.[a-zA-Z]{2,4}$/',$_POST['email'])&&!empty($_POST['comments'])) { //Form …

Member Avatar for cwarn23
0
105
Member Avatar for servis

The proper use of this would be declaring the $link variable as an array [b]before[/b] you start looping through the array results of the query. Your code should look like this: [code=PHP] $result = mysql_query($sql); //Make sure to use a semicolon at the end of a line, not a colon! …

Member Avatar for servis
0
160
Member Avatar for koyel555

You need to look into JavaScript and DOM. Give you DIV an id and then you can import the DIV as an object with: [code=JavaScript] div = document.getElementById('div_id'); [/code] Then you can change the styles with: [code=JavaScript] document.getElementById('div_id').color = '#999999'; [/code] See [URL="http://www.w3schools.com/htmldom/dom_reference.asp"]this page for help with DOM and JavaScript[/URL].

Member Avatar for FlashCreations
0
745
Member Avatar for mrcniceguy

Well for one, I would use [icode]mysql_real_escape()[/icode] on any variable you are passing to MySQL. That should prevent any kind of MySQL injection. I would make sure that your passwords are hashed correctly (using [icode]md5()[/icode] or [icode]sha1()[/icode]). For added security I would salt your encryptions. See [URL="http://phpsec.org/articles/2005/password-hashing.html"]this page for more …

Member Avatar for mrcniceguy
0
299
Member Avatar for koyel555

It would help if you could use some clear and exact English so that we can all understand your question. First off, why are you placing DIV's inside of a table? TR's belong in a table and TD inside that. Why not use a bunch of DIV's? How is the …

Member Avatar for FlashCreations
0
172
Member Avatar for manojjena1982

Google Docs and HTML are two different things. Do you want a link that shows the HTML of a document or do you want a link to view the document in Google Docs?

Member Avatar for FlashCreations
0
144
Member Avatar for Gearspro

If you have no further questions, why not mark this thread as solved?

Member Avatar for Gearspro
0
85
Member Avatar for SKANK!!!!!

The backslashes are what make the query safe from MySQL injections. They prevent the user from placing quotes that end a string into the query without be escaped (Placing a backslash in front of the quote). To my best knowledge, the backslashes dissapear when you perform a SELECT FROM MySQL …

Member Avatar for somedude3488
0
93
Member Avatar for Mortez Maya

I'm not sure if this can be done in JavaScript, because printing involves browser-controlled dialogs and there can be other complications such as the printer being off. You could set a timer and estimate with [icode]setInterval()[/icode].

Member Avatar for FlashCreations
0
69
Member Avatar for Tivoilos

First off, I would [icode]mysql_real_escape()[/icode] any string you pass to MySQL. Secondly, your problem is once someone logs in, the [icode]$_POST[/icode] for the username and password are no longer passed to the page. You need to set a cookie using [icode]$_COOKIE['name']="value"[/icode] containing the username and password and get the username …

Member Avatar for FlashCreations
0
132
Member Avatar for Nathan Campos

Do you mean you want Google to index your forum? If so, this is a process that you will have to wait for. Google follows links on other sites, so when the Google Bot finds a like to your site it will follow it to your forum. Most people don't …

Member Avatar for FlashCreations
0
309
Member Avatar for Newbi

@Dukane You made the same error as Newbi..the correct code is below (Don't worry about it, I've made worse mistakes :D): [code=PHP] while($info = mysql_fetch_array($result)) [/code] The reason for this is as Dukane explained...When you perform a query the query string is executed with the [icode]mysql_query()[/icode] function. This function returns …

Member Avatar for FlashCreations
0
211
Member Avatar for Gerald19

Here is your problem area: [code=PHP] $checkbox = $_POST[checkbox]; //Problem #1 if($_POST['delete']){ //Problem #2 echo "test"; //Nice Debugging But This Should Fix It So We'll Remove It for($i=0;$i<$count;$i++){ $del_id = $checkbox[$i]; //Problem #3 $sql = "DELETE FROM $tbl_name WHERE id='$del_id'"; //And to save a line We'll condense this $result = …

Member Avatar for Gerald19
0
242
Member Avatar for jitender.ind

I believe you problem is you are looking in the wrong spot. It looks to me like the file in your screenshot was uploaded to /web/htdocs/m/s/41/f/793/f41-793.ogg, but I can't tell. Could we see some code so that we can determine where the files are going. Also, I would add an …

Member Avatar for FlashCreations
0
199
Member Avatar for AbsoluteCPP

How about this: [B]login.php[/B] [code=PHP] <?php if($_POST['submit']=="Login") { switch($_POST['t']) { case 1: header("Location: admin.php"); break; case 2: header("Location: faculty.php"); break; case 3: header("Location: student.php"); break; default: break; } } ?> <html> <head> <title>Login</title> </head> <body> <form action="login.php" method="post"> Username: <input type="text" name="u" /><br/> Password: <input type="password" name="p" /><br/> <select name="t"> …

Member Avatar for FlashCreations
0
104
Member Avatar for mrcniceguy

If your going to ask a question, please use clear English that we can all understand, and add some more detail. Explain exactly how to reproduce the problem. Then we will be able to help you.

Member Avatar for FlashCreations
0
69
Member Avatar for karin21

I believe you already asked this question...[URL="http://www.daniweb.com/forums/thread210224.html"]http://www.daniweb.com/forums/thread210224.html[/URL]

Member Avatar for FlashCreations
0
70
Member Avatar for danimal132

To start, HTTP_REFERER is not an IP address, but the URL of the page that sent the client to the current page. You need to use REMOTE_ADDR to get the users IP address (And just so you know clients can hide their IP address behind a proxy which will give …

Member Avatar for FlashCreations
0
104
Member Avatar for Atomika3000

You can do it pretty easily in PHP with the mail() function. To do this though you would need to change the action attribute on your form tag to your PHP script. Then construct the message in PHP and use the mail() function to send it. For more on mail() …

Member Avatar for MidiMagic
0
166
Member Avatar for woocha

Well at first glance it looks like your JS file contains some JQuery, so I would start by making sure you have the JQuery library included in your page. It would also help if you could give us the address of the gallery page as it might aid in finding …

Member Avatar for FlashCreations
0
317
Member Avatar for ArvindSharma

Nice article...though I must agree with the comments and say that rel isn't rarely used. And the wbr tag: never heard about it before! Sounds useful.

Member Avatar for FlashCreations
0
137
Member Avatar for DiyaMV

Well this wouldn't be PHP, it would be HTML and maybe JavaScript. You could create a link on your page like this: [code=PHP] <?php echo "<a href='mailto:email@domain.com?subject=Email Subject&body=Insert HTML table here and chart here' id='emailLink'>Send Email (Opens in Outlook)</a>"; ?> [/code] For more on [icode]mailto:[/icode] syntax [URL="http://www.ianr.unl.edu/internet/mailto.html"]see this page[/URL]. And …

Member Avatar for FlashCreations
0
123
Member Avatar for nigelburrell

Correct, unless these bots can register on your sites and access the page with your email. You can always protect your email simply by making it an image and putting that image on your page instead of using a plugin like this.

Member Avatar for FlashCreations
0
118
Member Avatar for sugumarclick

You don't need PHP to do this! All you need is some JavaScript: [code=HTML] <html> <head> <title>Gender Drop Down Test</title> <script type="text/javascript"> function selectGender(value, id){document.getElementById(id).value=value;} </script> </head> <body> I'm a <select name='gender' id='malefemale' onChange="selectGender(this.value, 'heshe');"> <option value='0'>Male</option> <option value='1'>Female</option> </select>.<br /> <p> <select name='gender' id='heshe' onChange="selectGender(this.value, 'malefemale')"> <option value='0'>He</option> <option …

Member Avatar for kireol
0
129
Member Avatar for cjay175

If you use [icode]wp_list_authors();[/icode] it should by default exclude the admin account. If not you could try: [code=PHP] Posted By: <?php wp_list_authors('exclude_admin=true&hide_empty=true'); ?> [/code] See [URL="http://codex.wordpress.org/Template_Tags/wp_list_authors"]The Codex Page for wp_list_authors()[/URL] and [URL="http://codex.wordpress.org/Author_Templates"]The Codex Page on Author Templates[/URL] for more.

Member Avatar for cjay175
0
228
Member Avatar for FlashCreations

Hi, I've been designing a web application that scales to fit the available window space in the web browser so that there is no need to use the scroll bar (and the whole point of the application is to fit the window). I've already figured out how to catch resizes …

Member Avatar for FlashCreations
0
422
Member Avatar for SKANK!!!!!

It looks like you need htaccess code. This will make a rule on your webserver to call a server file (I'll call it user.php) with details from your url. [code=htaccess] RewriteEngine On RewriteRule ^/user/([A-Za-z0-9]+)/?$ user.php?username=$1 [/code] With this code in user.php username would be a GET variable you could use. …

Member Avatar for SKANK!!!!!
0
203
Member Avatar for FlashCreations

Hello everyone....I've been working on the design for my forum on my website and while everything else has gone to plan...one thing hasn't. On my [URL="http://www.phpmycoder.net/forum/topic.html"]topic page[/URL], the DIV with class greybox and id navigationbox that displays the text Home, New Posts, Members, Stats, Rules, etc. just wont align to …

Member Avatar for Airshow
0
160
Member Avatar for Arne1983

Interesting site. Provides some good points. But one question, why do you need our emails?

Member Avatar for Arne1983
0
201
Member Avatar for iThaos

Well first off there is an error in your code: [code=PHP] $public $message = "..."; //Not correct what's the first $ for public $message = "..."; //Corrected! [/code] And yes there is a way to do this. Since the son extends the father I would say simply use [icode]echo $this->message[/icode]. …

Member Avatar for ShawnCplus
0
106
Member Avatar for Pado

Make sure that you have no html or other text written with echo before that or any html or text before the [icode]<?php[/icode] tag. This could be something as simple as a space: [code=PHP] <?php //Notice the space here header("Location: thiswillnotwork.html"); ?> [/code] And can easily be fixed by removing …

Member Avatar for leviathan185
0
325
Member Avatar for sunilsinha

Fist off a few questions before I start helping you with you code: [LIST=1] [*]Do you have any code yet? If so may we see it? [*]What file type do you want to save as? (You mention both PNG and GIF in your post) [*]Do you want to rotate the …

Member Avatar for beeerlover
0
141
Member Avatar for algo_man

So wait...you want a web application programmed in PHP that can monitor your activity on a website that will then simulate the activity again? By simulate do you mean to reproduce with the exactly same interactivity that you had before? (In that case, do your tests and note what you …

Member Avatar for FlashCreations
0
81
Member Avatar for FlashCreations

I currently have TrendMicro Pc-Cillin Internet Security 14 as protection for my computer. After reading some more, I have found that BitDefender might be a better (and free!) alternative. Do you think I should switch from Pc-Cillin Internet Security 14 to BitDefender? Why or why not? If not, can you …

Member Avatar for cohen
0
84
Member Avatar for swit
Member Avatar for jonow

Probably not, there is no simple way (or any way at all for that matter) to determine content height unless it is a style on the page (Ex. something like maybe: [code=CSS] .myDivThatIWantTheHeightFrom { height: 50px; } [/code] I'm not sure though even in that case if you could determine …

Member Avatar for FlashCreations
0
384
Member Avatar for vaideesh4u

Well the only way to do this would be to find a PHP extension that converts files to DOC Word files. Then create a PHP script that run when the save button is clicked that saves the text from the HTML page as a document and then converts it to …

Member Avatar for FlashCreations
0
115
Member Avatar for shasha821110

Well first it might help to actually list what is required instead of putting . and numbers. Also, we are not PHP contractors. We can help you with code that's already written (or in the process of) but we aren't here to write a full site and hand it over …

Member Avatar for shasha821110
0
635
Member Avatar for Trogan

Well for development purposes I would download [URL="http://www.apachefriends.org/en/xampp.html"]XAMPP[/URL], a simple and small application that turns your computer into a personal webserver. This way you can develop and do testing on a local server (which is much faster!). From here I would assume you know how to code in PHP (If …

Member Avatar for FlashCreations
0
225
Member Avatar for gangsta gama

Probably not too long. You would have to ask your host but it should take somewhere between 2-5 minutes. Also you should change [icode]$testname=$_POST[username];[/icode] so that it looks like this: [icode]$testname=$_POST["username"];[/icode].

Member Avatar for FlashCreations
0
251
Member Avatar for FlashCreations

Hey Everyone! I have come across a very interesting problem that seems to be impossible to solve. Basically a web application that I am working on relies on a JavaScript function called go to change the input named view to the page name and submit the form. This form's type …

Member Avatar for mschroeder
0
372
Member Avatar for azureblue

It probably is a problem with a file being used for the installation while you are trying to run the installer. Make sure to only install one program at one time and close all other applications when installing. You may also want to run the installer in Administrator mode (if …

Member Avatar for azureblue
0
125
Member Avatar for forzadraco

Well I'm assuming your trying to ask how to calculate the server uptime in PHP. Really there are not defined function of methods for this. You can ask your host, they should know. If you want to find out, you would have to have direct access to the servers. Take …

Member Avatar for FlashCreations
0
87
Member Avatar for serdas

[QUOTE=serdas;799905]can we please forget the previous posts, but could you please help me with this. i found this for deleting, but this does not work. [code]<?php /* * Change the first line to whatever * you use to connect to the database. * * Change tablename to the name of …

Member Avatar for serdas
0
306
Member Avatar for ALMGHARI

First off, I believe the site is illegal, to start. To get their code would require someone to hack their site (which is also illegal). So technically it would be double illegal to do something like that (You'd probably get in trouble if they find your IP involved with the …

Member Avatar for FlashCreations
0
255
Member Avatar for PinoyDev

Sure here's a suggestion. Find a host with MySQL (or ask your host to install it for you) and create a database for your site. Then create a table and call it years. In this table create three columns: a name column, a year column, and a code column (all …

Member Avatar for PinoyDev
0
123
Member Avatar for FlashCreations

Hey Everyone! I have a question about oop. I am trying to write a MySQL class for managing my MySQL db's and calls. So far I have almost completed it, but I am missing lots of functions. These are the result functions (ie. mysql_fetch_array() or mysql_num_rows() etc.). Instead of creating …

Member Avatar for mschroeder
0
121

The End.