
natalieG
Members-
Posts
63 -
Joined
-
Last visited
Never
Everything posted by natalieG
-
Does anyone have a small piece of code that wil reformat a string, by breaking it up into lines of a defined length, separated by "<BR>" We have a string that can be uo to 300 charc=acters and want to reformat into eight lines,or so.separated by <BR>. Jennifer
-
we are trying to make a popup window in javascript to run under php. This is our first stab at it and it does not popup. Thanks, Annabelle <?php function mywin() { ?> <script language="JavaScript"> debugWindow=new window; debugWindow = window.open("","debugWin","toolbar=no,width=600,height=400"); debugWindow.document.writeln('<html>'); debugWindow.document.writeln('<head>'); debugWindow.document.writeln('<title>PHP Remote Debug Window</title>'); debugWindow.document.writeln('</head>'); debugWindow.document.writeln('<body><font face="verdana,arial">'); debugWindow.document.writeln('abcd'); debugWindow.document.writeln('</body></html>'); self.focus();\n; </script> <? } mywin(); ?>
-
is there an easy way to get the name of the current running script withput the ath infprmation? we tried $_SERVER['SCRIPT_FILENAME'], but that includes the path. Karen
-
we use the below line in a form to initialize a textarea with $NOTE which is the gotten from a database query in mysql. the first line is indented about 1/2 the textarea width. all other lines are fine. As far as we know, there are no tabs or other formatting characters in the textarea. we tried to use echo trim($NOTE) but that does not solve the issue. the contents of the field is not indented. we get the value by $NOTE=$ROW[NOTE}; [!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--][b]<tr><td width="664" COLSPAN="2"><textarea name="NOTE" rows="20" cols="85" tabindex="1"> <?php echo $NOTE;?></textarea></td>[/b][!--colorc--][/span][!--/colorc--] We tried the php forum, but dod nopt got what we expected, so perhaps it is an html issue. Thanks, Jennifer
-
when we use the below code, the text in the testarea is indented about half the textarea width instead of starting at the left margin. we have tried changing $NOTE to: trim($NOTE) and this does not solve the problem. ______________________________________________________________________________________ [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--][b]<tr><td width="664" COLSPAN="2"><textarea name="NOTE" rows="20" cols="85" tabindex="1"> <?php echo $NOTE;?></textarea></td>[/b][!--colorc--][/span][!--/colorc--] _________________________________________________________________________________ Chjarlotte-
-
we want to backup our database with a CRONTAB and need to geenrate the php script file. We don't know the PHP configuration as to if it is stanfdalone or not, but we will sort that out later. The filename will haver the date of backup in it. We have not tried the below scripot, but could you take a quick look and tell us of this should work? Thanks, Jennifer [b]<?php $todaydate=date('m-d-Y'); $dbname=my database name; $user = username $password=mysql password $filename='backup' . $todaydate .'.dmp' ; $dumpstr="mysqldump $dbname -u $user -p $password > /home/msdsimg/backup/$filename"; shell($dumpstr); ?>[/b]
-
we tried a very simple script to email from a php script and it times out. <?php $to = "[email protected]"; $from = "[email protected]"; $title = "TEST"; $body = "this is a mail test"; $success = mail($to,$from,$title,$body, "From:$from\r\nReply-To:$from"); if(success){print 'Mailok';}else {'print mailfailure';} ?> thanks. jennifer
-
we have two two tables, PASSWORD and TEST. The only difference between the two is that TEST has an auto_increment column named [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]PINDEX integer auto_increment[!--colorc--][/span][!--/colorc--]. we want to move all the data from PASSWORD to TEST by the following: INSERT INTO TEST SELECT * FROM PASSWORD and we get a mysql error=1136. we then tried: INSERT INTO TEST SELECT REPFIRM,SUPERVISOR,PASSWORD,EMAIL FROM PASSWORD; we get another error number and the mysql monitor says" Doesn't match column at row 1. Is there a way to accomplish this? Thanks, Jennifer
-
Any idea why this will not redirect? <html> <head> <title></title> <script LANGUAGE="JavaScript"> <!-- VAR awidth=screen.width; VAR aheight=screen.height; location.replace("http://msdsimaging.com/atmelpim/showscreen.php?sch=awidth&sch=aheight"); //--> </script> </head> <body> </body> </html>
-
we have an indexfile [index.php] with a form in it. we want to pass the screen height and width as URL parameters in the form ie: action="http://aaaaaa.php?height=scnwidth&width=scnwidth"; getting the screen parameters in Javaxcript is simple enough, but how do we pass them to the form We can put them in hidden controls if thats easier and can put them in session variables if that is the best way. Thanks, Jennifer
-
Sorry, guys-another session question, but we have been throuygh the manual and could not get what we needed- If we use session_start() in our login page and never close it and never let the script terminate, passing control to other pages by either an http request or a header location, is the session still alive so we can use session variables in other pages? Thanks, Charlotte
-
Hi- We tried the code and it gave us a message that initMo was an undeclared variable in each line of the selkectbox
-
WE have a sewlect box in a form that we are trying to initialize in an edit foirm. The code we tried is below. The select box window does not change when we set the selected value,Is there a way to have it change and thgen transmit the new vakue when firm is submitter? Thanks, Natalie <select name="MONTH" size="1"> <option selected value="<?php echo $MO ?>">Jan</option> <option value="02">Feb</option> <option value="03">Mar</option> <option value="04">Apr</option> <option value="05">May</option> <option value="07">Jul</option> <option value="07">Jul</option> <option value="08">Aug</option> <option value="09">Sep</option> <option value="10">Oct</option> <option value="12">Dec</option> <option value="11">Nov</option>
-
When we initialize a textarea control as below, the text on the first line is indented approximately one-hald the texrea width. It is not centered, it goes to the end. Suceeding paragraphs start fine, at thr left margin. Is there a way to eliminate the indenting oin Line #1? [!--coloro:#3366FF--][span style=\"color:#3366FF\"][!--/coloro--][b]<textarea name="NOTE" rows="20" cols="85" tabindex="1"><?php echo 'AAAAA';?></textarea> [/b][!--colorc--][/span][!--/colorc--]Thanks, Jennifer
-
we have a frorm we want to initalize the fields, edit the fields, and then uipdate thew database.We have tried a buch of things and cannot get there for a tgextarea control. Our latesst attempt is below. [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]<td width="664" COLSPAN="2"><textarea name="NOTE" rows="20" cols="85" tabindex="1" CONTENT="<?php echo 'AAAAA';?>"></textarea></td>[!--colorc--][/span][!--/colorc--] Thanks, Jennifer
-
we have a TABLE with column descrived as DATE1 DATE if we store strings in this field as yyyy-mm-dd =2006-07-12 can this colum be used foir sorting as: SELECT * FROM TABLE ORDER NY DATE1 DESC
-
Thanks, we found the problem and it works. It was a dumb error and we are sorry to bother you. Nancy
-
we have a table with a column called NOTEDATE which is of type DATE. We are calcuating the column value by the followingL [b]$NOTEDATE= $YEAR . '-' . $MONTH . '-' . $DAYARRAY[$DAY]; [/b] where $DATARRAY[] returns the string vakuer for the form daee in YYYY-MM-DD format. We checked this put and it does indeed pront the desired string. But, when we use the string in an Insert query by putting '$NOTEDATE' in the inseert query, the date shows up invalid'0000-00-00'. I thought this format was legal. Janie
-
we have a table with a column called NOTEDATE which is of type DATE. We are calcuating the column value by the followingL [b]$NOTEDATE= $YEAR . '-' . $MONTH . '-' . $DAYARRAY[$DAY]; [/b] where $DATARRAY[] returns the string vakuer for the form daee in YYYY-MM-DD format. We checked this put and it does indeed pront the desired string. But, when we use the string in an Insert query by putting '$NOTEDATE' in the inseert query, the date shows up invalid'0000-00-00'. I thought this format was legal. Janie
-
The reason the image did not dosplay is that the image was in CMYK format before it wasa stored as a JPEG. Corel will open that, but a browser will not. when we converted the image to RGB color space, everything worked fine. I do not know why we did not get anb error messafe, except that we were openiong the file in PHPEdit and it may do as extensive a syntax check. Thanks again Melanie
-
Thanks very much for the help. We have corrected our syntax a you reccomended, but the main issue was that the jpg file was corrupted. It is really strange, the image opened and displayed fine on Corel Photopaint, but in Adobe Goliove, the image icon indicated a torn image. we changed to another image file and everything is cool. Thanks again Natalie
-
We have this code to display an image in a Table of an HTML section of a php file. The image does not display, the browser showing the little square for a missing image. The image file is in the same directory as the source file. Thanks, Michelle <TD COLSPAN="2" WIDTH=<?php echo $TABLEWIDTH ?> ALIGN="center"> <img src=<?php echo "title.jpg" ?>></td>
-
How do set up a query so that on a date column which contains ther record date, the data arrives last entry first? Thanks, Natalie;
-
Hi Folks- We cannot seem to insert rows into a mysql table. Thje table create definition is below. immediately below that is the Insert query. Below that is the html form drivineg the iINSERT code. Below that is the code assigneing the insert values And finally, in the last block is the mysql error message.[in RED]; We filled in all fields in the form and the SHOW COLUMNS for $COMPANYTABLE shows every column can have a NULL value. We then ran a small cgi utility we wrote to show the fields names and values and they are all correct. Hope this isn;t too much data to describe the problem, but we are getting exasperated and want to document clearly ------------------------------------------------------------------------------------------------------- [!--coloro:#3333FF--][span style=\"color:#3333FF\"][!--/coloro--]$COMPANYS_QUERY="CREATE TABLE IF NOT EXISTS $COMPANYSTABLE( COMPANY_INDEX INTEGER AUTO_INCREMENT, COMPANY_NAME VARCHAR($FIELD_LENGTH), COMPANY_REP VARCHAR(25), COMPANY_ADDRESS1 VARCHAR($FIELD_LENGTH), COMPANY_ADDRESS2 VARCHAR($FIELD_LENGTH), COMPANY_CITY VARCHAR($FIELD_LENGTH), COMPANY_STATE VARCHAR(10), COMPANY_ZIPCODE VARCHAR(12), COMPANY_PHONE VARCHAR(20), COMPANY_ADMIN VARCHAR($FIELD_LENGTH), COMPANY_EMAIL VARCHAR($FIELD_LENGTH), COMPANY_WEBSITE VARCHAR($FIELD_LENGTH), COMPANY_DATE VARCHAR(30), COMPANY_ENTRYDATE TIMESTAMP($TIME_FORMAT), PRIMARY KEY (COMPANY_INDEX))";[!--colorc--][/span][!--/colorc--] ------------------------------------------------------------------------------------------------------ [!--coloro:#3366FF--][span style=\"color:#3366FF\"][!--/coloro--]$COMPANYADDQUERY="INSERT INTO ATMELPIM_COMPANYS( COMPANY_INDEX, COMPANY_NAME, COMPANY_REP, COMPANY_ADDRESS1, COMPANY_ADDRESS2, COMPANY_CITY, COMPANY_STATE, COMPANY_ZIPCODE, COMPANY_PHONE, COMPANY_ADMIN, COMPANY_EMAIL, COMPANY_WEBSITE, COMPANY_DATE, COMPANY_ENTRYDATE)VALUES( NULL, $COMPANY_NAME, $COMPANY_REP, $COMPANY_ADDRESS1, $COMPANY_ADDRESS2, $COMPANY_CITY, $COMPANY_STATE, $COMPANY_ZIPCODE, $COMPANY_PHONE, $COMPANY_ADMIN, $COMPANY_EMAIL, $COMPANY_WEBSITE, $DATESTR, $NOWDATETIME)";[!--colorc--][/span][!--/colorc--]- ---------------------------------------------------------------------------------------------------------------- $COMPANY_REP=$REQUEST['COMPANY_REP']; $COMPANY_NAME=$_REQUEST['COMPANY_NAME']; $COMPANY_ADDRESS1=$_REQUEST['COMPANY_ADDRESS1']; if (isset($_REQUEST['COMPANY_ADDRESS2'])) {$COMPANY_ADDRESS2=$_REQUEST['COMPANY_ADDRESS2'];} ELSE {$COMPANY_ADDRESSS2='';} $COMPANY_CITY=$_REQUEST['COMPANY_CITY']; $COMPANY_STATE=$_REQUEST['COMPANY_STATE']; $COMPANY_ZIPCODE=$_REQUEST['COMPANY_ZIPCODE']; $COMPANY_PHONE=$_REQUEST['COMPANY_PHONE']; $COMPANY_ADMIN=$_REQUEST['COMPANY_ADMIN']; $COMPANY_EMAIL=$_REQUEST['COMPANY_EMAIL']; $COMPANY_WEBSITE=$_REQUEST['COMPANY_WEBSITE']; $DATESTR=strftime('%A,%B %d'); $NOWDATETIME=time(); ------------------------------------------------------------------------------------------- <form action="http://msdsimaging.com/atmelpim/addcompany.php" method="get" name="addcompany"> <table width="590" border="0" cellspacing="=" cellpadding="1" bgcolor="#DDDDDD"> <tr><td colspan="2" align="center" width="588"> <div class="headerclass">ADD COMPANY TO PIM</div> </td></tr> <tr><td width="165"> <div class="firstclass">NAME</div></td> <td width="421"><input type="text" name="COMPANY_NAME" size="50" maxlength="50"order="0"> </td></tr> <tr><td width="165"><div class="firstclass">REP COMPANY</div></td> <td width="421"><input type="text" name="COMPANY_REP" size="50" maxlength="200" border="0"></td></tr> <tr><td width="165"> <div class="firstclass">ADDRESS-1</div></td> <td width="421"><input type="text" name="COMPANY_ADDRESS1" size="50" maxlength="100" border="0"></td></tr> <tr><td width="165"><div class="firstclass">ADDRESS-2</div></td> <td width="421"><input type="text" name="COMPANY_ADDRESS2" size="50" border="0" maxlength="100"></td></tr> <tr><td width="165"><div class="firstclass">CITY</div></td> <td width="421"><input type="text" name="COMPANY_CITY" size="40" border="0"> </td></tr> <td width="165"><div class="firstclass">STATE</div> </td> <td width="421"><input type="text" name="COMPANY_STATE" size="10" maxlength="10" border="0"></td></tr> <tr><td width="165"><div class="firstclass">ZIPCODE</div></td> <td> width="421"><input type="text" name="COMPANY_ZIPCODE" size="10" maxlength="10" border="0"></td> </tr><tr><td width="165"><div class="firstclass">PHONE</div></td> <td width="421"><input type="text" name="COMPANY_PHONE" size="20" maxlength="20" border="0"></td></tr> <tr><td width="165"><div class="firstclass">ADMIN</div></td> <td width="421"><input type="text" name="COMPANY_ADMIN" size="50" maxlength="50" border="0"></td></tr> <tr><td width="165"> <div class="firstclass">EMAIL</div></td> <td width="421"><input type="text" name="COMPANY_EMAIL" size="50" maxlength="100" border="0"></td></tr> <tr><td width="165"> <div class="firstclass">WEBSITE</div></td> <td width="421"><input type="text" name="COMPANY_WEBSITE" size="50" maxlength="100" border="0"></td></tr> <tr><td colspan="2" align="center" width="588"><input type="submit" name="submitButtonName" border="0" value="Add"><input type="reset" border="0"></td></tr> </table></form> ------================================================================ [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]Cannot Insert Into COMPANY TableYou have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' address1, address2, dallas, tx, 75080, 972-437-999[!--colorc--][/span][!--/colorc--]
-
can someone tell me why these two queries for generating tables dot execute properly? Thankss, Jennifer $CONTACT_QUERY="CREATE TABLE ATMELPIM_CONTACT( CONTACT_INDEX INTEGER, CONTACT_ENTRYDATE INTEGER, CONTACT_DATESTR VARCHAR(20), CONTACT_REP VARCHAR(20), CONTACT NAME VARCHAR(40), CONTACT_PROJECT VARCHAR(25), CONTACT_ADDRESS1 VARCHAR(50), CONTACT_ADDRESS2 VARCHAR(50), CONTACT_CITY VARCHAR(50), CONTACT_STATE VARCHAR(10), CONTACT_ZIPCODE VARCHAR(12), CONTACT_PHONE VARCHAR(20), CONTACT_EXTENSION VARCHAR(10) )"; $NOTE_QUERY= "CREATE TABLE ATMELPIM_NOTES( NOTE_INDEX INTEGER, NOTE_ENTRYDATE INTEGER, NOTE_DATESTR varchar(20), NOTE_COMPANY VARCHAR($FIELD_LENGTH), NOTE_CONTACT_NAME VARCHAR(40), NOTE_TEXT VARCHAR(8192) )";