450 Posted Topics

Member Avatar for ghostrecog

[QUOTE=ghostrecog;646037]In javascript we can swap only jpg images? Then what about the gif images. Please help me. By answering my first post so the second post will be solved automatically.[/QUOTE] It's just plain text either way, image type has nothing to do with it. I mean it's not like you …

Member Avatar for ghostrecog
0
108
Member Avatar for ishlux

You can treat a session var just like a regular var, so creating a session array follows the same syntax as a regular array. [CODE=php] session_start(); $_SESSION['varname'] = array("cell0", "cell1", "cell2"); $_SESSION['varname'][] = "cell3"; $_SESSION['varname'][] = "cell4"; $_SESSION['varname'][5] = "cell5"; $_SESSION['varname'][6] = "cell6"; print_r($_SESSION['varname']); [/CODE] output = "Array ( [0] …

Member Avatar for nav33n
-1
101
Member Avatar for MDGM

Someone will probably blow me away with some regular expression but this is what I would do for the domain extension: [CODE=javascript] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="javascript" type="text/javascript"> function getExtension() { var domainname = document.getElementById('txtDomain').value; …

Member Avatar for R0bb0b
0
100
Member Avatar for steveg1965

Damn look at all that junk, just to send an email. Sorry, I don't have an answer as I am a php dev. I was just surprised that's all.

Member Avatar for steveg1965
0
148
Member Avatar for adaykin

[QUOTE=adaykin;646247][CODE] var rowItem = document.createElement("<input type=text id=['up' + i]>"); [/CODE][/QUOTE] try this: [CODE=javascript] var inputid = "up" + i; var rowItem = document.createElement('<input type="text" id="' + inputid + '">'); [/CODE] and according to what I've read here, you need to provide valid html for ie, yet that will throw an …

Member Avatar for adaykin
0
156
Member Avatar for charlesbw

I would recommend a javascript solution so it is less hands on. [CODE=javascript] <html> <head> <title>none</title> <script language="javascript" type="text/javascript"> function alterLinks() { links = document.getElementsByTagName("a"); for(i = 0; i < links.length; i++) { if(links[i].href.indexOf("localhost") != -1) { links[i].target = ""; } else { links[i].target = "_blank"; } } } </script> …

Member Avatar for R0bb0b
0
80
Member Avatar for ctuga

OK, so the user enters the url into a textbox, hits some type of submit button and a link will then appear on the page referring to that url? How would you like to do this, do you want to save the url to a db and then populate the …

Member Avatar for jakesee
0
75
Member Avatar for punithapary
Member Avatar for ditty

May I present my greatest work utility, let me know if you need help using it: [URL="http://us2.php.net/manual/en/function.fread.php"]http://us2.php.net/manual/en/function.fread.php[/URL] [URL="http://us2.php.net/manual/en/function.fclose.php"]http://us2.php.net/manual/en/function.fclose.php[/URL]

Member Avatar for tanha
0
140
Member Avatar for blackbird29
Member Avatar for fiddler80

I or several others here could build it for you if you are looking to contract it out. For a good job, I'm guessing about 6 weeks for development and 2 weeks for testing.

Member Avatar for R0bb0b
0
100
Member Avatar for R0bb0b

Don't know if this has already been reported but I am using ff3 and on the home page the add in the middle is overlapping the drop down menus. It appears to be only that one add. Screen shot attached.

Member Avatar for MidiMagic
0
107
Member Avatar for wdev

You can use a php loop to fill a javascript array, something like this: [CODE=php] <script language="javascript" type="text/javascript"> var jsarray = Array(<? $jsarray = ""; while ($row = mysql_fetch_assoc($result)) { $jsarray .= "\"" . $row['id'] . "\", "; } $jsarray = substr($jsarray, 0, -2); //eliminate the last ", " echo …

Member Avatar for wdev
0
144
Member Avatar for Shanti C

faq.php [CODE] <a href="faqview.php?faqpk=12">FAQ Title</a> [/CODE] faqview.php [CODE=php] <? if(!is_numeric($_GET['faqpk'])) { header("location: faq.php"); exit(); } $faqpk = $_GET['faqpk']; $query = "select title, description from faq where faqpk = " . $faqpk; $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { echo "<p>".$row["title"]."</p>"; echo "<p>".$row["description"]."</p>"; } ?> [/CODE]

Member Avatar for Shanti C
0
121
Member Avatar for R0bb0b

This is actually a combination js, php, htaccess question so it could go in either one of those categories. I, like every combo server/client/ajax programmer like to mix my php with my js. I'm just curious about something, I know that you can configure .htaccess to refer to new extensions …

Member Avatar for R0bb0b
0
116
Member Avatar for besart

If you actually want to delete the cookie at the time the user clicks your log out button, use this: [CODE=php] setcookie("user", "Current User", time()-3600); [/CODE] You're actually modifying the expiration time to be negative instead of positive.

Member Avatar for R0bb0b
0
103
Member Avatar for ibrahimssani

There should be enough examples here: [URL="http://us.php.net/features.file-upload"]http://us.php.net/features.file-upload[/URL]

Member Avatar for ibrahimssani
0
94
Member Avatar for marsh4u

Something like this should work [CODE=php] <? $query = //query $result = mysql_query($query); $total = mysql_num_rows($result); for($i = 0; $i < $total; $i++) { if(!file_exists($_SERVER['DOCUMENT_ROOT'] . mysql_result($result, $i, "filename")) { echo mysql_result($result, $i, "filename") . " does not exist<br />"; } } ?> [/CODE]

Member Avatar for marsh4u
0
109
Member Avatar for pedramphp

maybe this? [CODE=php]<?php $output=<<<HEREDOC <div> HEREDOC; if($i==2) { $output.=<<<HEREDOC $i is 2 </div> HEREDOC; } echo $output; [/CODE]

Member Avatar for R0bb0b
0
110
Member Avatar for php_azar

There are two ways that I know of and that is ajax with javascript and Curl with PHP. Ajax has recently gotten a lot of attention and here is some sample code: Ajax object:(do not modify) [CODE=javascript] //the ajax object for all ajax functions function ajaxObject() { var objectsuccess = …

Member Avatar for R0bb0b
0
96
Member Avatar for php_azar

Any kind of submission, to another page or iframe, using post or get is exposed to the possibility of attacks. The only thing that you can do is validate that the data is in the right format. The most effective form of validation is server side because that occurs after …

Member Avatar for R0bb0b
0
52
Member Avatar for enim213

Dude, that is a lot of code for pagination and with no code tags. Here is a simple pagination script, try incorporating that. [code=php]<? $conn = mysql_connect("localhost", "test", "test"); if(!$conn) { echo "could not connect to db<br />"; } mysql_select_db("mydev", $conn) or die("could not select db<br />"); $rowsperpage = 100; …

Member Avatar for enim213
0
106
Member Avatar for isomillennium

php.net [quote]Note: HTML comments and PHP tags are also stripped. This is hardcoded and can not be changed with allowable_tags .[/quote] You'll have to create your own function.

Member Avatar for isomillennium
0
92
Member Avatar for harinatt

The only thing that you can do with php in this area pull the data down from the database, you are looking for some type of DHTML solution which will include a combination of css and javascript. If you do a google search for DHTML drop down menu, you will …

Member Avatar for Shanti C
0
83
Member Avatar for friedguy

Do the pdfs already exist or are they actually going to dynamically generated?

Member Avatar for friedguy
0
130
Member Avatar for heels

Here are some examples for textboxes, checkboxes, radio buttons and select drop downs: [code=php] <? session_start(); //collect text box values $txtFname = isset($_POST['txtFname'])?$_POST['txtFname']:""; $txtLname = isset($_POST['txtLname'])?$_POST['txtLname']:""; $txtMI = isset($_POST['txtMI'])?$_POST['txtMI']:""; //values for ages select element $ages = array(); $ages[] = "1 - 10"; $ages[] = "11 - 20"; $ages[] = "21 …

Member Avatar for casper_wang
0
174
Member Avatar for MDGM

Break the process into small segments. [LIST=1] [*]handling form submissions with php [*]smart database design structure tutorials [*]mysql sql query structures [*]connecting to a database with php [*]working with strings in php [*]looping through database results in php [/LIST] and use google for each step, you can literally copy the …

Member Avatar for MDGM
0
153
Member Avatar for PcPro12
Member Avatar for phpmine

This is how I would generate those arrays [CODE=php] //$keywordsarray is the array that contains said keywords $twowordphrases = array(); //generate two word phrases for($i = 0; $i < count($keywordsarray); $i += 2) { if(isset($keywordsarray[$i + 1])) { $twowordphrases[] = $keywordsarray[$i] . " " . $keywordsarray[$i + 1]; } } …

Member Avatar for digital-ether
0
216
Member Avatar for veledrom

[QUOTE=veledrom;636984][code] UPDATE def_1 SET Valid = 'Yes' WHERE id IN (SELECT id FROM def_2) AND paid IN (SELECT paid FROM def_2) AND valid IS NULL [/code][/QUOTE] I assume your are talking about the sub-queries. Inner join def_2 to what table, on what condition, in which sub-query? If you can answer …

Member Avatar for varmadba
0
77
Member Avatar for scorpionz

[QUOTE=scorpionz;637210]10:12 AM or 10:12 PM[/QUOTE] This should answer all your questions: [URL="http://us.php.net/manual/en/function.date.php"]http://us.php.net/manual/en/function.date.php[/URL]

Member Avatar for scorpionz
0
78
Member Avatar for raj2476

Also, most of those libraries are designed to make IE more consistent with firefox, firefox is a lot more standards compliant than IE. I usually develop for firefox first, then adjust my code for IE.

Member Avatar for R0bb0b
0
80
Member Avatar for chocciies

You should probably use implode, something like this: [CODE=php] foreach($_POST['userid'] as $userid) { if(!is_numeric($userid)) { header("location: " . $_SERVER['PHP_SELF'] . "?error=true"); exit(); } } $query = "delete from table where userid in(" . implode(",", $_POST['userid']) . ")"; [/CODE]

Member Avatar for nav33n
0
91
Member Avatar for deepaksworld

did you already check at the software development > c++ forum yet because unless it is web-based, I don't think that you will get much help from a web development forum.

Member Avatar for ~s.o.s~
0
83
Member Avatar for manor

[CODE=php] <?php // Database variables $remoteServer = "XYZ"; $remoteuser = "****"; $remotepass = "******"; $remoteDB = "***"; //connection to the database $dbhandle = mysql_connect($remoteServer, $remoteuser, $remotepass) or die("Couldn't connect to SQL Server on $remoteServer"); //select a database to work with $selected = mysql_select_db($remoteDB, $dbhandle) or die("Couldn't open database $remoteDB"); //declare …

Member Avatar for R0bb0b
0
113
Member Avatar for yournamehere

I usually group them into arrays and enter them into the database as a comma separated list which would be a varchar. [CODE=php] <form action="<? echo $_SERVER['REQUEST_URI']; ?>" method="post"> <p><input type="checkbox" name="sports[]" value="football" />&nbsp;football<br /> <input type="checkbox" name="sports[]" value="hockey" />&nbsp;hockey<br /> <input type="checkbox" name="sports[]" value="baseball" />&nbsp;baseball</p> <p><input type="checkbox" name="soda[]" value="pepsi" …

Member Avatar for nav33n
0
210
Member Avatar for cyberjorge

The only way to be sure is to get a copyright, which you can get pretty easily now days from sites like godaddy.

Member Avatar for sDJh
0
130
Member Avatar for punithapary

I've looked into this before and my final solution was to use a standard text field, use javascript to replace the characters with the desired character and store the actual password to a hidden field.

Member Avatar for R0bb0b
0
36
Member Avatar for Andrew F.

or maybe this will help [URL="http://www.110mb.com/forum/howto-send-emails-using-phpmailer-and-gmail-t14144.0.html"]http://www.110mb.com/forum/howto-send-emails-using-phpmailer-and-gmail-t14144.0.html[/URL]

Member Avatar for Andrew F.
0
196
Member Avatar for php4ever
Member Avatar for guruOfCool

I guess that I don't understand. If you were to make a temporary table out of the data that you want pulled down, what would it look like?

Member Avatar for stephen84s
0
85
Member Avatar for a4tech

A datagrid is simply an html table, modified by css to look pretty and could have added functionality with javascript and ajax for autoupdates and what not. It just depends on what kind of functionality you would like to have in your datagrid.

Member Avatar for R0bb0b
0
104
Member Avatar for harrence

I would say you probably want to do something like this: [CODE=sql]select min(visit_date), recordid, fname, lname from artist_details inner join attendance using(recordid) where visit_date < '2008-06-25' and visit_date > '2008-06-23' group by recordid, fname, lname[/CODE]

Member Avatar for harrence
0
91
Member Avatar for The Dude

[QUOTE=itdupuis;634507]It seems as though I have been a stronger person having to go through the situations I did, and I am happy with the results.[/QUOTE] I kind of went through the same thing, not death but abandoned by my father at 2 and a hard case latch key from that …

Member Avatar for R0bb0b
0
382
Member Avatar for chriscapetown

[CODE=javascript] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script language="javascript" type="text/javascript"> var timerid = 0; function startTime() { if(timerid) { clearTimeout(timerid); } var tDate = new Date(); if(tDate.getHours() == "12" && tDate.getMinutes() == "00" && tDate.getSeconds() == "00") { …

Member Avatar for R0bb0b
0
105
Member Avatar for servis

This is how I usually do it. Below you will find my main ajax object and then two different functions, one for get and one for post. [CODE=javascript] //the ajax object for all ajax functions function ajaxObject() { var objectsuccess = true; var xmlHttp; try { // Firefox, Opera 8.0+, …

Member Avatar for R0bb0b
0
112
Member Avatar for jencinas69

You'll probably find all the documentation right here [URL="http://us.php.net/manual/en/function.fputcsv.php"]http://us.php.net/manual/en/function.fputcsv.php[/URL]

Member Avatar for R0bb0b
0
208
Member Avatar for gargg321

I wouldn't guess that this is the place to look for help for a PHP generating tool. But you will find support for that product [URL="http://www.hkvstore.com/phpmaker/support.asp"]here[/URL]

Member Avatar for R0bb0b
0
93
Member Avatar for mrcniceguy

if you're using a database, you could use something like this. [CODE=php] <? /* this script is for a postgre database, for mysql replace "pg_" with "mysql_" */ //connection here if(count($_POST) > 0) { if(is_array($_POST['chkCommments'])) { $commentpks = ""; foreach($_POST['chkCommments'] as $commentpk) { $commentpks .= $commentpk . ", "; } …

Member Avatar for R0bb0b
0
91
Member Avatar for mustafaneguib

I've never used that script but it sounds like this type of error: I don't see <div>s that match up to these two lines: [CODE=javascript] Rounded("div#second","#EFF6F9","#9BD1FA"); Rounded("div#third","#EFF6F9","#9BD1FA"); [/CODE] :-/

Member Avatar for mustafaneguib
0
161

The End.