Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
~55.1K People Reached
Favorite Forums
Favorite Tags

53 Posted Topics

Member Avatar for HanFromNL

How about that. I've been using Date("l F d, Y",time()); thinking that I had to supply the time. Learn something new everyday.

Member Avatar for Nour_6
0
37K
Member Avatar for aixlu

You'll probably have to be more specific, and posting your code is what is normally needed. If you mean, how do you write an HTML with radio buttons and the PHP to read it, I'm going to put it all in one file here to make it easier. poll.php [CODE] …

Member Avatar for Natalia_3
0
3K
Member Avatar for Dartz654

In line 7 of /Functions.php in your post you put: mysql_select_db(database, $con); In this context the keyword database is neither a name or a variable. Perhaps you meant "database" or $database when you typed it? In my connect function I use the name of my database there: mysql_select_db('ecusersdb',$con);

Member Avatar for Asromi rOmi
0
931
Member Avatar for sourab

Try using imagecopyresampled() instead of imagecopyresized() to lessen the degradation of quality. The process takes a little longer but if you aren't doing a large number of images on one page it shouldn't be all that noticeable.

Member Avatar for cereal
0
255
Member Avatar for DavidB

Well, the answer I have didn't work for me but it's how you are supposed to do it. At the beginning of your file you need to set the default timezone. [CODE] date_default_timezone_set ("Eastern/New_York"); [/CODE] Or you could [CODE] echo date("l, F d, Y h:i:s P",time()+(3*3600)); [/CODE] If I got …

Member Avatar for DavidB
0
105
Member Avatar for cliffcc

[QUOTE=adkhan;1558784]Or you can do something like this [CODE]<button><a href='export.php?'>Export</a></button>[/CODE][/QUOTE] I've used this method, but unless you include a type in your button tag it acts as a submit button. I recommend this small modification: [CODE] <button type='button'><a href='export.php'>Export</a></button> [/CODE] edit: oops, didn't see Zagga's post. I've used the onclick solution …

Member Avatar for cliffcc
0
107
Member Avatar for dietdew12z

Hi, I'm normally over on the PHP board but this one is definitely a javascript issue. The thread title doesn't quite cover my issue, so I'll try to explain a little further. I built a website for a client who tells me that when he hovers over a word on …

Member Avatar for twiss
0
211
Member Avatar for umeshMCA

Javascript [CODE] function limiterOnChange() { document.limiterForm.submit(); } [/CODE] PHP [CODE] // near the top $val='2'; if ($_POST['limiter']) { $val=$_POST['limiter']; if ($val==2) { $db_data=mysql_query("select * from yourtable"); } else { $db_data=mysql_query("select * from yourtable where activated='$val'"); } // right above the area that displays the database info (is in HTML) $lsel=array("","",""); …

Member Avatar for diafol
0
220
Member Avatar for dietdew12z

I tried searching for an answer, but I'm not sure how to word the question so that it fits into a search box. I found out a month or so ago that if you are accessing variable data like $_POST['user'] or after a mysql_fetch you can use $row['id'] but it …

Member Avatar for dietdew12z
0
149
Member Avatar for Kniggles

What output are you actually getting? Some of that code is deprecated but what stood out to my eye was '($myusername)' which given the username of 'Bob': What you expect: PLAYER: (Bob) What you'd get: PLAYER: ($myusername) Reason being that using single quotes prevents PHP from substituting the variable's contents …

Member Avatar for Kniggles
0
208
Member Avatar for gazzy1

It would be better if you could post code, but I've dealt with this and will see if my solution works for you. Using javascript you can redirect using location.replace(URL) or location=URL, location.replace will not create an entry in the browser history, the other will. So here's an off the …

Member Avatar for dietdew12z
0
97
Member Avatar for leemp5

I'm not sure I can get you an answer, but I think I can get you closer. In line 89 is the first place you reference the $_FILES variable that was just posted but you don't have a file index. So instead of $_FILES[image][name] I believe it should be $_FILES[image][name][0] …

Member Avatar for dietdew12z
0
111
Member Avatar for n00b_in_need

I haven't tried it(I will, though) but on line 8 I wonder if you did this: [CODE] $genre = implode("','",$_POST['genre']); [/CODE] I'll go try that and see if I gave you crappy advice. :) David

Member Avatar for dietdew12z
0
163
Member Avatar for BleepyE

I responded before looking at the code in depth. Let me look and I'll tell you more, I've already found three problems. :)

Member Avatar for BleepyE
0
341
Member Avatar for tiggsy

I may not be understanding the question. Are you wanting to produce a list of all possible values that a field could be set to? Like field_name int(8)? That would be quite a list for just about any field except maybe a bool field.

Member Avatar for diafol
0
165
Member Avatar for dhairyaguptha

I hesitate to say this, but. . . From the look of your code, if you uploaded kitty.jpg it should be stored as /uploadskitty.jpg. Was that your intent? A couple of other items, just for your amusement. :) 20k is really small for an image, you might consider making it …

Member Avatar for dhairyaguptha
0
128
Member Avatar for dyla123

Well, you aren't really looking for one tool. There would be an HTML script with an embedded object(the flash player) and a PHP script to do the uploading at the very least. Now, you might be able to do the whole thing in actionscript(flash), I'm not really familiar with actionscript. …

Member Avatar for dietdew12z
0
71
Member Avatar for printman55

2011-02-02? Which one is the day and which is the month? :P Assuming it's sql standard it's y-m-d [CODE] // assuming $sqldate came from the database $tmpdate=explode("-",$sqldate); $newtime=mktime(0,0,0,$tmpdate[1],$tmpdate[2],$tmpdate[0]); $newdate=date("F j, Y",$newtime); [/CODE] That's the long way around, I'm sure others know a shorter/quicker way but this should work. David

Member Avatar for paulrajj
0
138
Member Avatar for Sarao

Unless there's more code somewhere, you aren't setting $pagenum when you load the script. At line 7 maybe you should try something like: [CODE] if (isset($_GET['pagenum'])) { $pagenum=$_GET['pagenum']; } else { $pagenum=1; } [/CODE] Hope that helps. David

Member Avatar for Sarao
0
125
Member Avatar for ilikesimple

[CODE] //Create User settings $file = "user.php"; if (!is_dir($username)) { mkdir($username); } $handle = fopen("$username/$file", "w"); $data = '<?php $userid = "' . $username . '" ?>'; fwrite($handle, $data); fclose($handle); [/CODE] I used the simplest form of mkdir here but you have to create the directory first, then create the …

Member Avatar for ilikesimple
0
151
Member Avatar for ON_Jtharpe

In your line: [CODE]$test = mysql_query("SELECT * FROM Movies WHERE Mov_ID = '$_POST['text']'") or die(mysql_error()); [/CODE] I'm not terribly sure how PHP deals with ' inside of ' but you might be safer to add a line so it looks like: [CODE]$Post_text=$_POST['text']; $test = mysql_query("SELECT * FROM Movies WHERE Mov_ID …

Member Avatar for lyrico
0
244
Member Avatar for Siege

You'll need to store the in/out status somewhere, if you already have a mysql database set up that's probably the best route but if not storing the information on disk might be an easier alternative. So the process is basically just this: - Code to change the status of the …

Member Avatar for dietdew12z
0
194
Member Avatar for shuipint

The only thing I see in the code you posted was that you aren't setting $email_from to anything. I seem to be missing obvious stuff tonight, though, so that might not be the problem. David edit: I don't see $formWheelchair being set anywhere either.

Member Avatar for shuipint
0
172
Member Avatar for abelingaw

Remember that PHP code gets evaluated and the echo/print statements are sent to the HTML file that gets delivered to your browser. If you view the page you have there(for a successful login) it would read: [CODE] <html> <head> ACCESS GRANTED. WELCOME!! </head> <body bgcolor="#FFFFFF"> <center> <form method="POST" action="login.php"> <input …

Member Avatar for dietdew12z
0
99
Member Avatar for samsons17

When I share the link on my FB page I get this: [ATTACH]18809[/ATTACH] Have you fixed it? Maybe you could post your facebook link.

Member Avatar for samsons17
0
193
Member Avatar for dietdew12z

I'm editing someone else's code and I have a vague idea of what it does, but if anyone has seen this kind of thing and can explain it to me. [CODE] function mkdir_recursive($pathname, $mode) { is_dir(dirname($pathname)) | mkdir_recursive(dirname($pathname), $mode); return is_dir($pathname) || @mkdir($pathname, $mode); } [/CODE] I don't understand why …

Member Avatar for dietdew12z
0
111
Member Avatar for cheekycroak

I may not be understanding the questions exactly, but here goes anyway. . . 1. When you enter a URL such as [url]www.tamilfmroot.com[/url] the server has in it's setup a line that looks for index.*** which you can specify as html/htm, php, and maybe asp(can't swear to that one). So, …

Member Avatar for cheekycroak
0
253
Member Avatar for left19

In line 5 you are specifying a directory, I think you'll have to put the filename in that parameter along with it's relative or absolute path.

Member Avatar for left19
0
145
Member Avatar for Senefelder

Looks for all the world like a permissions problem. If you have no control over the servers then you probably can't change the access permissions for the directory you are storing the files in either. If you are sure that the permissions aren't the issue, you might try not just …

Member Avatar for Senefelder
0
179
Member Avatar for Moderns

[QUOTE]Now functions inside the tags are accessing the mysql database and fetching data from there using the AJAX.[/QUOTE] Without seeing the code it's difficult to advise you, but when I saw this I cringed. This is probably what is slowing the page down. If possible, try to grab the values …

Member Avatar for diafol
0
243
Member Avatar for tbowlsby

Hopefully someone with Wordpress experience can get you closer than I, but I believe you will wind up having to research the Wordpress API. When you add a page manually, it likely calls the API to create the page. That's the API call you will be needing. While waiting for …

Member Avatar for chrishea
0
182
Member Avatar for newbi11

Put the variable $text in quotes as well, "$text". I don't know why you would be getting the word $text unless you had it in single quotes in your code. Someone told me that PHP will eval variables in double quotes but not variables in single quotes. I've never really …

Member Avatar for newbi11
0
161
Member Avatar for tcollins412
Re: Help

Well, the easiest way would be to use the $_GET and a switch case statement. Something like. . . [CODE] <!-- Header Stuff here --> <?php $here=$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; if (isset($_GET['page'])) { $page=$_GET['page']; switch ($page) { case "fun": echo "This is the fun page."; // You said you wanted them all in …

Member Avatar for tcollins412
0
153
Member Avatar for HelenLF

[CODE] $treplace = array("string1","string2","string3"); $twith=array("","",""); $done=str_replace($treplace,$twith,$origstring); [/CODE] Like that? Or do you want it only replaced if it's at the end of the string? If you're looking for extensions, you might use the strrpos function and look for the '.' then use substr to remove everything after it.

Member Avatar for HelenLF
0
92
Member Avatar for Mike516

Now when you say Java, do you mean Javascript or the actual Java language? I don't know diddly about the actual language but if you mean javascript, read on. Passing from PHP to Java isn't terribly difficult. [CODE] <script> myJSFunction(what) { alert(what); } </script> </head> <body> <?php $phpvariable=10; echo "<script …

Member Avatar for jkon
0
152
Member Avatar for javanew

or [CODE] echo "<center>Successfully sent</center>"; [/CODE] Either way works fine.

Member Avatar for dietdew12z
0
163
Member Avatar for fernando1

[CODE] <!-- Rules of conduct text here --> <center> <div style="width: 300px; text-align: center;"> Do you agree to the rules? <br /> <button onclick="location.replace('chatroom.php')">Yes</button> &nbsp;&nbsp; <button onclick="location.replace('home.php')">No</button> <br /> </div> </center> [/CODE] This might work for you.

Member Avatar for fernando1
0
3K
Member Avatar for T4gal

The last time I built a web site it was HTML 1.0 and there was no javascript or PHP, so I decided to re-learn web programming. When I started the web site I'm working on now I used all absolute positioned divs because that's what all the sites said to …

Member Avatar for localinternet
0
230
Member Avatar for Electricfan

Add a field to the table called 'allowable' and set the default value to 'unread'. When you log in it would do a query "select * from yourtable where allowable='unread'". If you click on allow you "update yourtable set allowable='allow' where id='id_of_message'" and also sends the mail. If you click …

Member Avatar for Electricfan
0
231
Member Avatar for azegurb

While it's not a terribly elegant solution, I've had a lot of luck with this method. call it testpost.php [CODE] <?php if (isset($_POST['submit1'])) { $var1=$_POST['var1']; $var2=$_POST['var2']; echo "Your information has been posted."; echo "<script>setTimeout(\"location.replace('testpost.php')\",2000)</script>"; } ?> <form action="testpost.php" method="post"> <input type="text" name="var1" /><br /> <input type="text" name="var2" /><br /> <input …

Member Avatar for azegurb
0
120
Member Avatar for zlloyd1

[CODE] function wordCheck($data, $fieldName) { global $errorCount; if (empty($data)) { displayError($fieldName, "Please enter $fieldName"); $retval = ""; } else { if (preg_match("/^[a-z]+$/i", $retval)==0) { displayError($fieldName, "Words must be letters only"); } return($retval); } [/CODE] As above, you aren't closing your function, also noticed that $retval is set to "" if …

Member Avatar for Dragonbaki
0
161
Member Avatar for shoykay

Try this: [CODE] $id=$subject['id']; $page_set=mysql_query("SELECT * FROM pages WHERE subject_id = '$id'", $connection); [/CODE]

Member Avatar for Mckcvision
0
216
Member Avatar for showman13

UPDATE position_table SET base_pos_id = (SELECT pos_id FROM position_table WHERE mem_id='$member' AND step='$new_step') WHERE mem_id='$member' AND step='$new_step' I don't see anything wrong with the syntax here. In this case it would probably be much easier to do: update position_table set base_pos_id = pos_id where mem_id='$member' and step='$new_step' But I used …

Member Avatar for showman13
0
324
Member Avatar for rakibtg

Can you give a little more detail? I'm not sure if you're wanting to fill in an HTML email with data from a form, or use a field in a form to create an HTML document, or use some kind of drag and drop HTML editor. You could do something …

Member Avatar for rakibtg
-1
263
Member Avatar for Naggelos

Lines 10-14 in your PHP file you're using braces instead of brackets for your array index? I didn't even know you could do that. Are you setting the array name associations there? Shows you how often I use arrays, huh?

Member Avatar for dietdew12z
0
179
Member Avatar for Robbastiaansen

I've used the post method to post html code before and didn't have a problem, but where I had to watch wasn't the page/code doing the posting, but rather the action page receiving the information. To be fair, it's not quite what you're doing. What I was doing was storing …

Member Avatar for dietdew12z
0
2K
Member Avatar for ayooshkasmth

Sorry, I'm still waking up this morning but I did catch one error: [CODE]echo "<option value=$row[contaminant]> $row[contaminant] </option>"; }[/CODE] should have quotes around the value: [CODE]echo "<option value='$row[contaminant]'> $row[contaminant] </option>"; }[/CODE] That would be enough to mess your day up. :)

Member Avatar for ayooshkasmth
0
109
Member Avatar for pallen

Also be sure to rename your file from *.html/*.htm to *.php or the PHP code will not execute, it'll display as text.

Member Avatar for Lsmjudoka
0
230
Member Avatar for benhowdle89

So, will Jill have an area that John can't see? or does John have membership privileges that Jill doesn't have? What I'm asking is: is this more a membership deal where one set of members goes to one 'part' of the site and another go to a different part, or …

Member Avatar for benhowdle89
0
161
Member Avatar for MDGM

Your links all give 404 errors. Are you wanting to link to the page via method one, but have the url show in the window as the second example?

Member Avatar for MDGM
0
142

The End.