
natalieG
Members-
Posts
63 -
Joined
-
Last visited
Never
Everything posted by natalieG
-
We want to access mysql table ad have row colors alternate, rows 1,3,5...=white and rows 2,4,6,8..=red. if we have a running row counter[$ROWCOUNT] Then we tried: if ($ROWCOUNT %2 ==0){color=red;}else {color=white:} $ROWCOUNT=$ROWCOUBNT + 1; but all rows are white Thanks, Jennifer
-
we have some paragraphs that have <BR>,<P> buried in them and want to modify them so that <BR> stars a new line and <P> begins a new paragraph. We tried the below: $NOTE = str_replace("<P>","n\r",$NOTE); $NOTE = str_replace("<BR>","\n",$NOTE); It looks like the 1st replace does not work and the second one does. We are outputting the paragraphs to a PDF generatorn and it needs a text file with proper line and paragraph codes. Thanks, Natalie
-
We have some blocks of text that have paragraphs and then sometoimes there are long stretches of blanks between words. How do we set up a pattern match so that it will remove all the blanks after the first?, that is, if I have 10 blank spaces, I want to remove nine blanks. Thanks, Natalie
-
we are looking for a simple piece of code that will send us an email whenever anyone accesses a particular directory on the server. we have a bunch of files that people will download by browser access. There is no index file in the directory. we could write an index.php file that would send an email on access, but on script termination, we want the file directory to show up so people can download. Jennifer
-
We are getting this error message periodically when we try to log onto our web site index.php page. Any ideas what this may be? ******************************************************************** Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in /home/msdsimg/public_html/index.php on line 2 ********************************************************************* Thanks, Jennifer Good
-
We are usinp PHP4.+ and are having a problew with cookies. We set the cookies after successful login we set cookies as: setcookie("ORG",$REPFIRM,time()+3600*24*30); setcookie("SPV",$SUPERVISOR,time()+3600*24*30); setcookie("RPLYTO",$EMAIL,time() +3600*24*30); and the next time we use the index page, we get the cookie as follows: if (isset($_COOKIE['ORG'])){$REPFIRM=$_COOKIE['ORG'];} else {$REPFIRM='';} if(isset ($_COOKIE['SPV'])){$SPV=$_COOKIE['SPV'];} else {$SPV='';} Our cookies workes perfectly until we seletedf all cookies in IE-6 and now it looks like the cookies do not get set and the index form does not have the fields filled in on entry. Is there enough infortmation here for you to help us, or shopuld IU send all three pages? Natalie.
-
I am looking for a script to play a movie in a client window- Thanks, Jennifer
-
we corrected the copmmas and tried again and eveything we try casues the same errro- "class does not support automatiopn". we then chan ged a bit and tried some code to do the same thing from a couple of javascript books and we get the same result. We are using IE6 under Windows SP4, and tghere must be soemething more fundamental at work hgere. any ideas? Natalie
-
In our window code beklow, when we try to open the window.document, we get an error message saying "onject does not support automation". we want to write HTML code to the window. Thanks, Jennifer <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <meta name="generator" content="Adobe GoLive 6"> <title>Welcome to Adobe GoLive 6</title> <script language="JavaScript"> function openWin(){ newWin = open("# ","window","height=400 width=400,top=200 left=200"); newWin.document.open(); }/* openwindow */ function closeWin(){ close(newWin); }/*close window*/ </script> </head> <body bgcolor="#ffffff"> <form action="#" method="get" name="FormName" > <button name="buttonName" type="button" onClick="openWin()">Open</button><BR> <button name="buttonName" type="button" onClick="closeWin()">Close</button> </form> <p></p> </body> </html>
-
The select box gets created fine, buit the alert does not function. Really weird, the code is much like one we use all the time. Thanks, Jennifer <?php if (isset($_REQUEST['INDEXA']) and (strlen($_REQUEST['INDEXA'])>0)) {$MYINDEX=$_REQUEST['INDEXA'];} else {echo 'NO INDEXA'; exit;} define('DB_HOST','localhost'); define('DB_USER','msdsimg'); define('DB_PASSWORD','misner01'); define('DB_NAME','msdsimg'); $conn=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die ('Did Not Connect'); mysql_select_db(DB_NAME) or die ('Cannot Set Database'); $CONTACTQUERY="SELECT CONTACTNAME,CLIENTINDEX,INDEXA FROM PIMCONTACTS WHERE CLIENTINDEX=$MYINDEX ORDER BY CONTACTNAME"; $CONTACTFIND=mysql_query($CONTACTQUERY) or die ('CONTACT QUERY ' . mysql_error()); $CONTACTCOUNT=mysql_num_rows($CONTACTFIND); if($CONTACTCOUNT >=5){$SIZE=5;} else {$SIZE=1;} $RESULTSTR="<SELECT ID=\"CONTID\" NAME=\"CONTSEL\" SIZE=\"$SIZE\">"; $RESULTSTR .= "<OPTION VALUE=\"0\">Select CONTACT</OPTION>"; while ($CONTACTROW=mysql_fetch_array($CONTACTFIND,MYSQL_ASSOC)){ $CONTACTINDEX=$CONTACTROW[INDEXA];$CONTACTNAME=$CONTACTROW[CONTACTNAME]; $RESULTSTR .= "<OPTION VALUE=\"$CONTACTINDEX\" onChange=\"alert('Hi')\">$CONTACTNAME</OPTION>"; }//while $RESULTSTR .="</SELECT>"; echo $RESULTSTR; mysql_close(); ?>
-
we are trying to have have the text in varsclass top align with the text in options class and have them both relkaative to outerclass. It looks like varsclass data is beoing displayed relative to optiuons class and not relative to outerclass. Is there a way to align these two relative classes to the outerclass? <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <meta name="generator" content="Adobe GoLive 6"> <title>Welcome to Adobe GoLive 6</title> <style type="text/css" media="screen"> <!-- #outerclass{ position:absolute; top:200px; left:200px; width:425px; height:120px; background-color:#aaaaaa} #optionclass{position:relative; top:10px; left:10px} #varsclass{ position:relative; top:10px; left:150px; width:200px; height:50px; background-color:Yellow; font-family:Arial,Helvetica; font-size:16; font-weight:600; color:red} --></style> </head> <body bgcolor="#ffffff"> <div id="outerclass"> <div id="optionclass"> <div id="optionsDiv">Options</div> </div> <div id="varsclass"> <div id="org">Organization</div> <div id="user">UserID</div> <div id="pwd">Password</div> </div> </div> </body> </html>
-
In the below html file, the optionclass positions the element fine, but the varsclass does not. ?? Thanks, Natalie <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <meta name="generator" content="Adobe GoLive 6"> <title>Welcome to Adobe GoLive 6</title> <style type="text/css" media="screen"> <!-- #optionclass{position:absolute; top: 150px; left:200px ;}//optionclass #varsclass{ position:absolute; top:200px; left:200px; width:150px; height:50px; background-color:black; font-family:Arial,Helvetica; font-size:20; color:blue; }//varsclass --></style> </head> <body bgcolor="#ffffff"> <div id=optionclass>This is option class</div> <div id=varsclass>This is vars class</div> </body> </html>
-
We are trying to set multiple cookies with this script and says on second cookie that headers are already sent. How do we set multiple cookies in one file? It also never prints out the cookie values-last line. Thanks, Jennifer <?php if (setcookie("ABC", $value, time()+3600)){echo 'Cookie-abc Sent';} else {echo 'cookie-abc not sent';} if (setcookie("DEF", $value, time()+3600)){'cokkie-def sent';} else {echo 'cookie-def not sent';} $ABC=$_COOKIE['ABC']; $DEF=$_COOKIE['DEF']; print "$ABC<BR>$DEF"; ?>
-
Is there a way to add options select control that is already on the page?. I have a page with the following: <select> <div ID="optiopns">..............................</div> </select> and I want to load options into options div from php via an AJAX function in thre page. If I just enter the text <option value=?>abcd</option> after the </select> is on the page, thge options do not show up in the select box. There may ne somethiong ewlse wrong, but it points to this and I was wondering if there was an "add option" method I could use?. Natalie
-
we are loading a selct box in ato an html page via AJAX weith this script. The select box shows up fine, but the alert box does not trigger when we select items. echo "<select name= \"MySelect\" onChange=\"Alert('Hi')\">"; while ($LBOXROW=mysql_fetch_array($LBOXFIND,MYSQL_ASSOC)){ $MYNAME=$LBOXROW[SPNAME];$PINDEX=$LBOXROW[PINDEX]; echo "<option value=\"$PINDEX\">$MYNAME</option>\n"; }//while echo "</select>"; Thanks, Jennifer
-
we have a listbox in a form and want to sent the selected value to a PHP page, but want to send it via an AJAX function as follows: <FORM> <SELECT NAME="MYSELECT" onChange="myfunction(??????????)"> <options>.......</options> </SELECT> </FORM> We cannot find what to put in to replace the ?????????????????. If there is a different forum that I should addrferss to, let me know and I will resubmit there. Natalie
-
Hello- We are working with Ajax nd have the below script: We keep getting an"error on page" mesage and cannot fgure why. We are not asking on AjaxGold help, just javascriupt help. Is thewre anything obvious here that we missed? Thanks Natallie ------------------------------------------------------------------------------------------------------------------------- <html> <head> <title>Posting data and returning text with Ajax Gold</title> <script type = "text/javascript" src = "ajaxgold.js"></script> <script language = "javascript"> function display(text) { document.getElementById('targetDiv').innerHTML = text; } </script> </head> <body> <h1>Posting data and returning text with Ajax Gold</h1> <form> <input type = "button" value = "Get the message" onclick = "postDataReturnText('shownotes2.php', 'INDEXA=12', display)"> </form> <div id="targetDiv">The fetched text will go here.</div> </body> </html>
-
In our script, we are trying to make a list box. The browser does not show the options. The box shows up, just no items. We did check that the right number pf rows are in the table and if we change the statement echoing the option[Line 4] to just echo $SPNAME, they display correctly. Thanks, NatalieG echo '<select name="USER">'; while ($LBOXROW=mysql_fetch_array($LBOXFIND,MYSQL_ASSOC)){ $SPNAME=$LBOXROW[SPNAME]; echo "<option value=\"$SPNAME\"></option>\n"; }//while echo '</select>';
-
The alert boX does not show even IF nrwpass1 <> newpass2 [font=Verdana]<head> <script Language="JavaScript"> function matchpwd(){ if (document.pwdform.NEWPASS1.value==document.pwdfrom.NEWPASS2.value) {return true;}else {alert("password mismatch"); return false;} }//matchpwd </script>........</head> <form action="http://msdsimaging.com/atmelpim/pim_main.php" method="get" name="pwdform" onSubmit="return (matchpwd())">[/font]________________________________________________________________________ <table width="300" border="0" cellspacing="0" cellpadding="0" bgcolor="#dddddd"> <TR><TD COLSPAN="2"align= "center"><div class="redclass">Change Password</div></td></tr> <TR><TD><div class="redclass">Index</div></td> <td><input type="text" name="PINDEX" size="2" maxlength="2" border="0" readonly VALUE="<?php echo $PINDEX; ?>"></td></tr> <TR><TD><div class="redclass">Organization</div></td> <td><input type="text" name="REPFIRM" size="10" maxlength="15" border="0" readonly VALUE="<?php echo $REPFIRM; ?>"></td></tr> <TR><td><div class="redclass">Supervisor</div></td> <td><input type="text" name="SUPERVISOR" size="10" border="0" readonly VALUE="<?php echo $SUPERVISOR; ?>"></td></tr> <TR><td><div class="redclass"> Old Password</div></td> <td><input type="text" name="PASSWORD" size="10" maxlength="10" border="0" readonly VALUE="<?php echo $PASSWORD; ?>"></td></tr> <TR><td><div class="redclass"> New Password</div></td> <td><input type="text" name="NEWPASS1" size="10" maxlength="10" border="0"></td></tr> <TR><td><div class="redclass"> Repeat Password</div></td> <td><input type="text" name="NEWPASS2" size="10" maxlength="10" border="0"></td></tr> <tr><td colspan="2" align="center"><input type="submit" name="submitButtonName" border="0" value="Post"><input type="reset" border="0"></td></tr> </table> </form> .
-
we tried to implement a popup window with javascript in a php script where downstream of the popup window we do a header(locatioon......) command and we get a headers already sent error as we wrote to the popup window. Is there a way to make a writable popup in a php script that will not have this problem?. Thanks, Jennifer
-
Is there a maximum length for the cyphertext returned by crypt?. we are using it to encrypt passwords that are at most 10 digits long with a six digit seed. We need to set the column length in mySQL. Thanks, Jennifer
-
we have a variable [b]$DIVHT='<?php echo "$AVAILHT";?>'; [/b] That we are using to set the height of a div tag as in: <div style="background : #ffffff; color : #ffffff; padding : 4px; width :930px; height : $DIVHTpx; overflow : auto; "> The div tag height doee not appear to be set=$AVAILHT Thanks, NatalieG
-
Is there a way to query the cleint browaer and see if cookies are enabled? Natalie
-
The email does not show up as an html fpormatted page. are we doiung sopmething wrone here? Thanks, Milena <?php $SENDEMAIL=1; if ($SENDEMAIL==1){ $SUBJECT ='PIMLogin'; $REPFIRM ='MSDS'; $SUPERVISOR ='DavidG'; $PASSWORD ='9999'; $MAILFONT ="<FONT FACE='Arial,Helvetica' color='Yellow' size='4'>"; $WHITEFONT ="<FONT FACE='Arial,Helvetica' color='white' size='4'>"; $MYADDRESS ='[email protected]'; $MSGRPLY ='[email protected]:'; $LOGINDATE =date('m-d-Y'); $MAILHEADER ="MIME-Version: 1.0\r\n"; $MAILHEADER .="Content-type: text/html; charset=iso-8859-1\r\n"; $MAILHEADER .="Content-Transfer-Encoding: 7bit\r\n"; $MAILHEADER .="From:$MYADDRESS\r\nReply-To:$MSGRPLY"; $MAILMESSAGE ="<HTML><HEAD><TITLE>LOGIN</TITLE></HEAD><BODY bgcolor=\"#dddddd\"><CENTER>"; $MAILMESSAGE .="<TABLE bgcolor=\"blue\">"; $MAILMESSAGE .="<TR><TD aliign=\"center\" COLSPAN=\"2\">$MAILFONT Login</TD></TR>"; $MAILMESSAGE .="<TR><TD>$WHITEFONT Repfirm: </TD><TD>$MAILFONT $REPFIRM</TD></TR>"; $MAILMESSAGE .="<TR><TD>$WHITEFONT Supervisor:</TD><TD>$MAILFONT $SUPERVISOR</TD></TR>"; $MAILMESSAGE .="<TR><TD>$WHITEFONT Password</TD><TD>$MAILFONT $PASSWORD</TD></TR>"; $MAILMESSAGE .="<TR><TD>$WHITEFONT Login Date: </TD><TD>$MAILFONT $LOGINDATE</TD></TR>"; $MAILMESSAGE .="</TABLE></BODY></HTML>"; $MAILSENT=mail($MYADDRESS,$SUBJECT,$MAILMESSAGE,$MAILEADER); if ($MAILSENT){print 'MailOK';exit;} else {print 'MailErr';exit;} }//SENDEMAIL=1 ?>
-
wer posted a question the other day about code to word wrap long string into several lines, separated by a <BR>. WE did get an answer, but that we want is to only break at word boundaries, so we were probably not clear about the breakl criteria. We wrote an example, but we never see get the line breakl, even though the sting was longer than the word wrap boundary. Our code is below. Hope yopu can help us. Thnanks, Jennifer <?php function abc($instr){ return trim(preg_replace('/\s+/',' ',$instr)); }//abc $xyz= '345 Penninsuoa St olttown tommorrow any state usa ghg vbgv'; //eliminate multiple spaces with reg_replace spaces $xyz2=abc($xyz); function addressformat($add1,$line){ $len=0; $len2=0; $out=''; //remove multiple white spaces and concert to array.. $add1array=explode(' ',$add1); foreach($add1array as $str){ $str_len=strlen($str); $len=$len+$str_len; #$len2=$len2 + $str_len; #print "$len/$len2<BR>"; if ($len>=$line){$len=$str_len;$out="<BR>" . $out . ' ' . $str;} else{$out=$out .' ' . $str;} }//foreach return $out; }//addrressformat.. print "<P>"; print addressformat($xyz2,30); ?>