Hi. I am new to CGI and am just starting out trying a few things. I am a PHP/MySQL developer and am comfortable writing XHTML, XML, CSS, JavaScript, and ASP.NET VB. I know pretty much nothing of CGI and would like to learn a bit more. Here are a couple of questions I have to start out with:
In...
I have a query where I'm trying to match 1 table's primary key to field in another table that holds multiple entries. For example, the field may have 1 value in it, and allows this to work:LEFT JOIN client_list ON client_domain.dom_id = client_list.client_dom however sometimes the field has...
Can someone take a look at this highlight function? It works pretty good, but I'd like to know how to tweak it so that it:
1. highlights an entire phrase (it already does this)
2. highlights each individual word
3. does not mess up words inside <html> tags
function...
I'm performing a search on a text file (to be more specific, the OFAC report on the US Treasury Site). Basically, what I'm doing is fetching the file and putting the contents into a variable via file_get_contents. Then performing a strstr with the search text and the OFAC variable. What I need...
I've got a Rule setup for my Inbox that moves certain mail to a local mail folder if the subject line matches certain criteria. I would like for it to also mark the message as "read", however in this version of Outlook, that is not listed as one of the options. I found a website that has a...
I have a function that is supposed to return "good" or "bad" if FTP credentials are working or not. Problem is:
1. It takes a rather long time and sometimes times out or something, causing it to break my page.
2. If it produces any sort of error, it displays the full error rather than the ones I...
I'm trying to modify a regular expression for an email address. It has recently come to my attention that the + is an acceptable character in the first part of an email address. Here's the expression as is:
^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$
I'd like to insert...
I've never created a stored procedure before, ever, and it appears it's the only safe way to pass variables to MySQL in ASP.NET. So i'm using SQLYog which pretty much writes most the Create Procedure statement for me, however, when I execute it, I get: Access Denied - Error Code: 1044
I have...
I'm trying to figure out how to extract the part between the 'href="' and '"' in the string:
'href="/pagename/?stuff"'
So basically I've gotten the position of 'href="', then added 6 so it starts after that string, but how do i get the substr from that position to the NEXT quote (")...
It's been a while since I wrote a "complicated" query and I can't figure out why this isn't work:
$querydate = "2007-07";
$query = "SELECT *,
DATE_FORMAT(`date`,'%M %e, %Y') AS disp_date,
DATE_FORMAT(`date`, '%m-%d') AS sDate,
DATE_FORMAT(`date`, '%Y-%m') AS querydate
FROM...
I'm trying to setup a validator, however i've run into an issue. When I reference formObject.name, I would expect to return the name of that form (<form name="myForm">).
Well, this isn't the case when you have an input field with the name of "name" (<input name="name"). In this case, it returns...
Is it possible to get the dimensions of an image by URL:
ex: getDimensions('http://www.somesite.com/img.jpg')
And if so, would it matter if the image was dynamically generated?
ex: getDimensions('http://www.somesite.com/img.aspx?text=some+stuff');
? Thanks.
This may sound confusing however throughout various parts of my script i'm writing, I need to reference different parts of a form element. Parts like name, id, type and tagName. I tried writing a function that will extract whichever one i'm looking for with only what i have to give it. Say for...
I'm trying to create an object similar to the one in this thread:
http://www.tek-tips.com/viewthread.cfm?qid=1389972
I am extracting a string from an HTML element that looks like this: {option1: 'var', option2: false, option3: 'stuff'}
I tried var options = myString, but then I cannot reference...
I've created a recursive function to find the form in which an object sits inside of. my function is: function getParentForm(el){
var parent_ref;
if(el.parentNode.tagName != "FORM"){
getParentForm(el.parentNode);
} else {
if(el.parentNode.name){
parent_ref...
If I have a function called submitAction() with no variables, can I get any information from the form, like the ID or name of the form if the function is in the "onsubmit" event?
Secondly, if I have a function submitAction() and attach it to the onClick event of a link, can I obtain information...
I'm having the hardest time getting this to work. I'm trying to generate a lot of stuff dynamically to allow for my script to be easily customizable and I can't figure out a way around this.
I have to store some objects in an array and i have several different arrays I need to keep them in. I...
Is it possible to create a multidimensional array that uses a string as the index instead of 0,1,2 (a number)?
I'm looking to do something like this:
var myArray = new Array(
new Array("index1"=>"value1","index2"=>"value2"),
new Array("index1"=>"value1","index2"=>"value2")
}
the main...
Is there a way to apply a filter to a dynamically created image to fix the IE6 PNG Transparency problem? A PNG is the only way my image looks classy but in IE6, it has that gray background. Any suggestions?
I'm creating a website with dynamically generated header graphics and I'm running into a problem with the server. I don't have all the specs on the server, but is there a more optimized way of creating images that doesn't take up so much CPU resources. The problem I'm having tends to be when...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.