
geroid
Members-
Posts
94 -
Joined
-
Last visited
Everything posted by geroid
-
Hi Jessica As I say, the folder 'Fillable' does indeed exist not only on the real server but on my home development server and this problem persisted on both platforms. The filenames are correct (not only did I double check them but I actually copy and pasted the filenames into my html page to be sure I was not making any mistakes) and the 'Fillable' folder shows up on the server when I upload into it from my ftp client. I'm not saying that I really know the answer but when I carried out the steps I mentioned (i.e. removing those form elements and resaving as .doc 97-2007 word document) it started working. it is now working for the 8 different documents I needed. I would love to have used the original docs I created but I didn't want to spend another 8 hours on this. Thanks for your suggestions
-
Hi Christine F Thanks for the help. I finally found the solution and it was not related to incorrect URl or folder names or filename. As I said, I created a fillable form in Microsoft Word under the 'Developer' tab (one must enable this). I created fillable text boxes, date fields and drop down menu choices. All this was easy enough but I simply could not download these docx document from the page. I don't know why. I tested ordinary Word documents and they worked fine but these .docx fillable forms simply would not budge. They led me straight to a 404. So I think the reason was to do with some of the form elements (date field etc.) of the form doc, I was having compatibility issues. I removed these elements and replaced them with ordinary text boxes and I then saved the doc as a 97-2003 Word doc (.doc) and it worked. I didn't change any html as I was sure I did not have incorrect URL or filenames/paths. So it works now and I'm not really sure why not before but as I say, all I did was save as earlier version and remove some form fields. I'm now almost 8 hours finding this solution and I thought I'd be out of here in 2. Thanks again for all your suggestions
-
I'm having a big problem that I just can't seem to solve. I have links in my web pages to word docs in the following format: <a href="http://www.panceltic.ie/media/Fillable/2013/Piping.doc" title="Camogie Entry Form" >Download Entry Form</a> My problem is that the doc will not open. It does not lead to the standard 'open with (Microsoft Word) or Save as' dialogue box. It simply lead to a 'Page cannot be found' web page. The URL is correct, the doc name and location is correct. I just cannot figure it out. I have created microsoft word docs with form elements on them (text boxes etc.) that can be filled out by the user and saved then as ordinary word documents. This is a facility in word to allow me to create fillable forms andsave them as ordinary word docs. This is normal. I don't see how this could effect them downloading to a users PC. I have tested other docs and they are indeed downloading OK but not these newly created ones. Is there a way I can overcome this issue?? Can anyone help???
-
How to import a comma seperated values file to a mysql table - please help
geroid replied to geroid's topic in MySQL Help
Thank you mikosiko I solved the problem by copying the word table into excel and simply using the import option in phpMYAdmin (from spreadsheet) and it brought in all the records as I wanted it. In the end it was really simple Thanks again -
How to import a comma seperated values file to a mysql table - please help
geroid replied to geroid's topic in MySQL Help
I forgot to mention that my mysql version is 5.5.8 Thanks -
Hi I have a table (names_eng) created with the following fields: order family species_name common_name species_author I also have a list of 10,000 records with five fields each that I have converted to a csv file in excel. The list looks something like this in excel (the first 8 records - 40 lines): STRUTHIONIFORMES Struthionidae Struthio camelus Common Ostrich Linnaeus, 1758 STRUTHIONIFORMES Struthionidae Struthio molybdophanes Somali Ostrich Reichenow, 1883 STRUTHIONIFORMES Rheidae Rhea americana Greater Rhea (Linnaeus, 1758) STRUTHIONIFORMES Rheidae Rhea pennata Lesser Rhea Orbigny, 1834 STRUTHIONIFORMES Casuariidae Casuarius casuarius Southern Cassowary (Linnaeus, 1758) STRUTHIONIFORMES Casuariidae Casuarius bennetti Dwarf Cassowary Gould, 1858 STRUTHIONIFORMES Casuariidae Casuarius unappendiculatus Northern Cassowary Blyth, 1860 STRUTHIONIFORMES Casuariidae Dromaius novaehollandiae Emu (Latham, 1790) Can anyone tell me the sql syntax to import this data from the csv file into the names_eng table so that the first 5 entries from the csv file become the first record in the names_eng table and the next 5 entries from the csv file become the 2nd record in the names_eng table etc. as shown below: order family species_name common_name species_author STRUTHIONIFORMES Struthionidae Struthio camelus Common Ostrich Linnaeus, 1758 STRUTHIONIFORMES Struthionidae Struthio molybdophanes Somali Ostrich Reichenow, 1883 STRUTHIONIFORMES Rheidae Rhea americana Greater Rhea (Linnaeus, 1758) STRUTHIONIFORMES Rheidae Rhea pennata Lesser Rhea Orbigny, 1834 STRUTHIONIFORMES Casuariidae Casuarius casuarius Southern Cassowary (Linnaeus, 1758) STRUTHIONIFORMES Casuariidae Casuarius bennetti Dwarf Cassowary Gould, 1858 STRUTHIONIFORMES Casuariidae Casuarius unappendiculatus Northern Cassowary Blyth, 1860 STRUTHIONIFORMES Casuariidae Dromaius novaehollandiae Emu (Latham, 1790) Any help would be great Thanks
-
Hi I have a table called docs with 2 columns 'id' and 'text' and have inserted the following information INSERT INTO docs VALUES (1, ‘Oracle stuff’); INSERT INTO docs VALUES (2, ‘more Oracle stuff’); INSERT INTO docs VALUES (3, ‘SQL Server stuff’); COMMIT; I then run the following query as part of a college lab. I can't understand the output or what this query is asking. Can you help? The query is: SELECT SCORE(1) FROM docs WHERE CONTAINS (text, ‘Oracle’, 1) > 0; The output is: SCORE(1) ----------- 4 4 I don't understand what the two 4s refer to.
-
Hi I was wondering if anyone knows about something I noticed on websites. I have just uploaded a website to the host that I designed for an organisation. If you hover over any link, the full address appears on the bottom left of the screen. This is normal. Like: http://www.domainname.com/index.php However I have noticed that on other site they seem to be able to hide the page name somehow so that whatever link you hover over all you get is e.g.: http://www.google.ie/services/ or http://office.microsoft.com/en-gb/products/ As you can see there is no html or php page name. I would like to do this as it seems to me a better security feature. Any ideas how it's' done? Thanks
-
Thanks I just added those lines to my login and admin pages and it works great. I thought that would be a nightmare but it was really easy. Should I add the code to all of the other admin related pages too?
-
Thanks I'm trying to understand this. Are you saying that when admin logs in I should include the following code at that successful login stage: <?php $_SESSION['logged_in'] ?> Then if anyone tries to go directly to the admin page I should have this code at the top of that admin page: <?php if(!$_SESSION['logged_in']) { // redirect header("Location: http://www.yourdomain.com/login.php"); exit(); } ?> Is that the idea? With the first line, <?php $_SESSION['logged_in'] ?>, am I just creating a session variable (logged_in). What will this do exactly? Sorry for seeming stupid
-
Hi I'vé just created my first website and uploaded it to a hosting site today for the client. It's working very well but I have a problem. There is an admin area that admin can log into via the site. Obviously I don't want anyone else to be able to see the admin pages. Admin can login with a username and password (encrypted with md5). However I have notice that if you just put the address into the address bar of the admin page (i.e. www.domainname/adminpage.php), it allows immediate access to anyone, bypassing the login. This is a major problem. I'm relatively new to this so I would appreciate some help. Thanks gerry
-
Hi Thanks for the replies. I had previously had my query like this $query = "select event_num, event_name, venue_name, streetaddress1, town, county, event_description_ire, event_description_eng, date_format(event_date, '%M %D, %Y ') as formatteddate, event_time from $table where event_date >= '$todaydate' order by event_num desc"; but I changed it to this: $query = "select event_num, event_name, venue_name, streetaddress1, town, county, event_description_ire, event_description_eng, event_date, event_time from $table where event_date >= '$todaydate' order by event_num desc"; I would like to use the date_format function but when I used it the query didn't retrieve the date. It could not compare the formatted date (November 18 2009) with the contents of the variable $todaydate (2009-11-18). Any suggestions how to get around this problem
-
Maybe the strtotime function is not the right one to use. I just want to format that date in row->event_date to a nice look
-
I'm trying to format a date extracted from my table. The date is in the following format 2009-11-18 which is typical. I want it to display on the webpage as November 18 2009. I can't use the date_format function directly in the query because I'm comparing the date with a variable for selection during the query. So this means I have to format the date field (event_date) after it has been retreived from the table. I tried the following code and it works to a degree $row->event_date = date("M j Y" ,strtotime($row->event_date)); The above code returns Nov 18 2009 but I want the full month as in November 18 2009. Any ideas? I just want to convert the $row->event_date to the format November 18 2009 (or whatever the date may be)
-
That did the trick again. Thanks cags. I hate to be so forgetful. I should have known that by now.
-
Hi again cags The column is date not datetime and I get the variable content with the following: $todaydate = date("Y-m-d"); but it's not working
-
Hi I have records in a table that I want to select by their date. I only want records to be extracted that are equal to or greater than todays date. I have the following statement but it's not working. The variable $todaydate literally holds todays date. So I'm comparing the event_date with the variable. Is this how I should do it? At the moment, all the records are being extracted. Can you help? $query = "select event_num, event_name, venue_name, streetaddress1, town, county, event_description_ire, event_description_eng, event_date, event_time from $table where event_date >= $todaydate order by event_num desc";
-
Thanks again cags. Much appreciated.
-
Thanks Guess I'll just have to wait until the script is on the host and iron out any problem then with the support people. That's ok. Could I just ask you to have a quick look at the script and tell me if you think it looks ok. I just need a simple mail script for the users to email the website people . <b><font size=2 color=green> Please complete the email form below and select '</font><font size=2 color=red> Send Mail</font><font size=2 color=green> '. All fields are required.</font><BR><BR> <form name="contact" method="post" action="contactprocess.php"> <strong>Name:</strong><br/> <input type="text" name="ename" size="30"><br/> <strong>Email:</strong><br/> <input type="text" name="eemail" size="30"><br/> <strong>Subject:</strong><br/> <input type="text" name="esubject" size="30"><br/> <strong>Message:</strong><br/> <textarea name="emessage" cols="30" rows="10"></textarea><br/><br> <input type="submit" name="esubmit" id="submitinput" class="highlightit" value="Send Mail" style="cursor:pointer"> <input type="hidden" name="eip" value="<?php echo $_SERVER["REMOTE_ADDR"]; ?>"> </form> Processing page: <?php //Some variables $mymail = "[email protected]"; //Not the real thing here, just an example $ename = $_POST['ename']; $eemail = $_POST['eemail']; $esubject = $_POST['esubject']; $emessage = $_POST['emessage']; $eip = $_POST['eip']; //Function to check email address function checkemail($eemail) { if(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$",$eemail)) { return true; } else { return false; } } //Mail Processing if ($_POST['esubmit']) { //Check for blank fields if ($ename == "" || $eemail == "" || $esubject == "" || $emessage == "") { ?><b><font size=2 color=green> Please complete the email form below and select '</font><font size=2 color=red> Send Mail</font><font size=2 color=green> '. All fields are required.</font><BR><BR><? echo "<p><Font color=red>It appears that you have left a <em>blank field</em>.<br/> Please make sure you fill everything in.</font></p>"; ?> <form name="contact" method="post" action="contactprocess.php"> <strong>Name:</strong><br/> <input type="text" name="ename" size="30" value="<?echo $ename?>"><br/> <strong>Email:</strong><br/> <input type="text" name="eemail" size="30" value="<?echo $eemail ?>"><br/> <strong>Subject:</strong><br/> <input type="text" name="esubject" size="30" value="<?echo $esubject?>"><br/> <strong>Message:</strong><br/> <textarea name="emessage" cols="30" rows="10"><?echo $emessage?></textarea><br/><br> <input type="submit" name="esubmit" id="submitinput" class="highlightit" value="Send Mail" style="cursor:pointer"> <input type="hidden" name="eip" value="<?php echo $_SERVER["REMOTE_ADDR"]; ?>"> </form><? } //Check to see if the email address is valid else if (checkemail($eemail) == false) { ?><b><font size=2 color=green> Please complete the email form below and select '</font><font size=2 color=red> Send Mail</font><font size=2 color=green> '. All fields are required.</font><BR><BR><? echo "<p><font color=red>It appears that you have entered an <em>invalid</em> email address.<br/> Please check your email again.</font></p>"; ?> <form name="contact" method="post" action="contactprocess.php"> <strong>Name:</strong><br/> <input type="text" name="ename" size="30" value="<?echo $ename?>"><br/> <strong>Email:</strong><br/> <input type="text" name="eemail" size="30" value=""><br/> <strong>Subject:</strong><br/> <input type="text" name="esubject" size="30" value="<?echo $esubject?>"><br/> <strong>Message:</strong><br/> <textarea name="emessage" cols="30" rows="10" ><?echo $emessage?></textarea><br/><br> <input type="submit" name="esubmit" id="submitinput" class="highlightit" value="Send Mail" style="cursor:pointer"> <input type="hidden" name="eip" value="<?php echo $_SERVER["REMOTE_ADDR"]; ?>"> </form><? } //Send the email if there's no error else { $body = "$emessage\n\nName: $ename\nEmail: $eemail\nIp: $eip"; mail($mymail,$esubject,$body,"From: $eemail\n"); echo "<p>Thank you for your email $ename ($eemail)!</p>"; } } ?>
-
Thanks cags i'm''néw to this and am a little confused. I'vé opened my php.ini file and found the following lines: [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. ;sendmail_from = [email protected] ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ;sendmail_path = "C:\xampp\sendmail\sendmail.exe -t" ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters = I'm running the mercury mail server on xampp. I really have no idea how to set this up or how to configure it. Do you think the email code will work? what changes do I need to make? I had forgotten to turn mercury on last attempt but have done so now. The error message now is: SMTP server response: 553 We do not relay non-local mail, sorry.
-
Hi I'm trying to write my first email script. Well actually I've downloaded the following one to see how it all works. The form page looks like this: <form name="contact" method="post" action="contactprocess.php"> <strong>Name:</strong><br/> <input type="text" name="ename" size="30"><br/> <strong>Email:</strong><br/> <input type="text" name="eemail" size="30"><br/> <strong>Subject:</strong><br/> <input type="text" name="esubject" size="30"><br/> <strong>Message:</strong><br/> <textarea name="emessage" cols="30" rows="10"></textarea><br/> <input type="submit" name="esubmit" value="Send Mail" style="cursor:pointer"> <input type="hidden" name="eip" value="<?php echo $_SERVER["REMOTE_ADDR"]; ?>"> </form> The processing page looks like this: <?php //Some variables $mymail = "[email protected]"; $ename = $_POST['ename']; $eemail = $_POST['eemail']; $esubject = $_POST['esubject']; $emessage = $_POST['emessage']; $eip = $_POST['eip']; //Function to check email address function checkemail($eemail) { if(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$",$eemail)) { return true; } else { return false; } } //Mail Processing if ($_POST['esubmit']) { //Check for blank fields if ($ename == "" || $eemail == "" || $esubject == "" || $emessage == "") { echo "<p>It appears that you left a blank field.<br/> Please make sure you fill everything in.</p>"; } //Check to see if the email address is valid else if (checkemail($eemail) == false) { echo "<p>It appears that you enter an invalid email address.<br/> Please check your email again.</p>"; } //Send the email if there's no error else { $body = "$emessage\n\nName: $ename\nEmail: $eemail\nIp: $eip"; mail($mymail,$esubject,$body,"From: $eemail\n"); echo "<p>Thank you for your email $ename!</p>"; } } ?> Now I'm just testing this on my xammp server at home and I get the following error message: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\glorcar\contactprocess.php on line 60 Thank you for your email!. Will the mail function work from home (I'm' developing this site to be uploaded to a hosting company. How can I test it to see if it works from home? Thanks
-
Thanks for the help. I'll take a look at that stuff and begin my first email script. Here goes!!!
-
Hi I'm just about to start my email section of the website I'm working on. I don't know much about this and I was looking for some advice. All I'm doing is allowing the user to send an email to the site administrator from the website. That's all. Any ideas what function I should be looking at? Gerry
-
Firefox/Explorer upload problem. Images won't upload in explorer
geroid replied to geroid's topic in PHP Coding Help
That also worked a treat Bricktop Thanks a lot -
Firefox/Explorer upload problem. Images won't upload in explorer
geroid replied to geroid's topic in PHP Coding Help
Hi Thanks for the advice. This seems to have worked for jpg files Bricktop. That's great. However, I have the same problem for png files. Can you suggest a fix for that. I allow only jpg, gif and png.