Jump to content

common

Members
  • Posts

    58
  • Joined

  • Last visited

Everything posted by common

  1. common

    mail()

    HI all! I am writing a script for email and i am using the mail() function. It works perfectly and sends the email. But now i want to change the appearance, say using html to put the email message in a table with a header, 2columns and a footer! I am not sure how to do this! Can anyone help please attached is my script (the first page is only to make the form bit more userfriendly) [attachment deleted by admin]
  2. Hi everyone I was wondering if there is anyone who have created a facebook app? I want to create an app, but i am not sure where to start... can anyone help me by pointing me in the right direction please? Thanx
  3. Hi all I am trying to create a pdf file by adding a img, but when I run the code I get this error message: "Fatal error: Uncaught exception 'PDFlibException' with message 'Handle parameter 'image' has bad value 0' in C:\xampp\htdocs\root\Voorbeeld\CreatePDF\pdf_file.php:24 Stack trace: #0 C:\xampp\htdocs\root\Voorbeeld\CreatePDF\pdf_file.php(24): pdf_place_image() #1 {main} thrown in C:\xampp\htdocs\root\Voorbeeld\CreatePDF\pdf_file.php on line 24" This is the code om using for the image: $pdfimage = pdf_open_image_file($mypdf, "jpeg", "img.jpeg", 'images',1); pdf_place_image($mypdf, $pdfimage, 10, 10, 0.6); I have tried pdf_open_jpeg, pdf_open_image. And all give the same result [that the image parameter has a bad value] but the image location is correct and everything. Everywhere I look on the internet I get this code and it doesn't work! Please someone help!
  4. Hi all I want to create a page where i can upload a zip folder (containing images) and place the images in a folder in a folder on the server. (As in Joomla!'s joomgallery batch upload) Can anyone help me on how to do that, so that the the zip folder gets extracted and the images is moved to the folder.. Thanks!
  5. Hi everyone I have a databse and in one of the columns I have date values such as 2009-March-27. If i have a php interface and want to use a query to select all the rows that is in say october. how would the query look like?? Because i know how to check the whole date, but I want a query that only checks the months... Please help! Thanks
  6. if there is a way yes...I just don't know of an easy way, just a long way... So i was wondering if there is not an easy way
  7. Hi everyone! I was wondering if anyone could help me?? I have a database and one of the column have values like 3, 7, 31, 4, 6 and so on. Is there a php mysqli function that can call these values in a array?? Because I have a variable that can contain a number between 1 and 31 and I want to check if it matches to a value in the column... thanx
  8. Hi all I have a few tables in a database and each have a different number of records. Say one has 10 records, another 34records, and another 8 records. I can display this in a page,but then I have all the records at once on that page. How can I create the page with a sort of a counter that I only display 10 records at a time, so if there is 34 records in a table, that the same page is used 4 times, and the on the first display it show record 1-10 and on the next it show 11-20 and so on... Can someone please help me with this?? ???
  9. Hi all, Im struggling with arrays.Say I have two arrays: array1 = array('one','two','three','four','five'); array2 = array('a','b','c','d'); If I want to choose random combination of these two arrays, but want to keep the combinations unique, for example I have 'one' from array1 and 'c' from array2, but I want many combinations... but not the same as 'one' from array1 and 'c' from array2...does anyone know how to do this??
  10. Hi all, I am trying to set up a email form through php. I do not want the emailaddress to whom it is send be visible, so I constructed this code, but it does not seem to work...can any one tell me why(the mail account inserted does not exist, but I have entered mine and uploaded it to a host, but the code runs through but I never get the mail...) if (isset($_POST['submitted'])) { if (!empty($_POST['name']) && !empty($_POST['subject']) && !empty($_POST['message']) ) { $headers = "From: ".$_POST['name']; mail('mymail@me.com',$_POST['subject'], $_POST['message'],$headers); print "Your message has been send"; // Clear $_POST (so that the form's not sticky): $_POST = array(); } else { print "Error: You havn't filled in all the fields!<p/>"; include('emailform.php'); } } else { print "<table border='0' cellpadding='0' cellspacing='5'><tr> <form action='index.php' method='post'> <td style='vertical-align:top;font-familiy:calibri;font-size:12px;'>Name: </td> <td><input type='text' name='name' size='30' value='<?php if(isset($_POST['submitted'])){print $_POST['name'];}?>'/></td></tr><tr> <td style='vertical-align:top;font-familiy:calibri;font-size:12px;'>Subject: </td> <td><input type='text' name='subject' size='30' value='<?php if(isset($_POST['submitted'])){print $_POST['subject'];}?>'/></td></tr><tr> <td style='vertical-align:top;font-familiy:calibri;font-size:12px;'>Message: </td> <td><textarea name='message' cols='40' rows='5'><?php if(isset($_POST['submitted'])){print $_POST['message'];}?></textarea></td></tr><tr> <td><input type='hidden' name='submitted'></td> <td style='text-align:right;'><input type='submit' value='Send'/></form></td></tr></table>"; }
  11. Hi all! Can i connect to an .mdb file, created in MS Access, from a php file, and how do i do it?? I know about the ODBC way, but for that i need to connect to the .mdb file through the computers control panel/administrative tools... but that would be a problem if I want to upload the files on a host server. Please help Thanx
  12. Hi all! I want to create a login interface but i am not sure whats the right procedure. When the person login, for example with a username and password, its been checked by an if else statement,correct? But to where do i direct the the user? because if I only direct it to another page,its not really secure, because I can only put the other page name in the address bar...so how do I secure it?? Thanx
  13. Hi all How do you create a search function with php when you have a database connected? Thanx
  14. Hi yeah i guess thats whats missing, thanks.
  15. Hi I am new at connecting a DB to a website. The only DB program that I have is MS Access, I know many people don't like it, but I am just starting with it. I have visited w3schools and tried something out. I want to view all the data in one table, like for a hardware company, and I got that right, but know I want to create a page that inserts data into the table. This is my code: if(isset($_POST['inserted'])) { $table=$_POST['table']; $name=$_POST['p_name']; $descript=$_POST['p_descript']; $price=$_POST['p_price']; $conn=odbc_connect('wk','',''); if(!$conn){exit("Connection Failed: ".$conn);} $sql="INSERT INTO $table (P_CODE,P_NAME,P_DESCRIPT,P_PRICE,P_PIC) VALUES (12,'$name','$descript','$price','12')"; print "1 record added!"; odbc_close($conn); } else { include('include/insertForm.php'); } The form I insert only gets the info to insert in the name, description, price collumns. I have XAMPP on my computer, and according to w3schools I have to go in my control pannel to add th database(named 'wk') to the odbc... When I run the code it goes through and show that one record is added, but nothing change in the database?? Can anyone help me with that please, and if you know about an other program than MS Access can you tell me please? And weather this will still work on a host server.
  16. common

    Layout

    Hi everyone I was wondering how to make a layout that fits to all screen resolutions? For example it doesn't matter if you have a 15'' or 17'' monitor, facebook's website is always over the whole screen and it does not give a left to right scrollbar? How do you do that? Thanx
  17. Hi I want to add a calendar to a website. But as I understand i need to download and install stuff on my server. Then I can add the calendar. Can anyone help me, by telling me how and what exactly I must do and where I can find a website where I can Download the stuff. Please Thanx
  18. yeah that will work, thanks...
  19. hey i have a .txt file but want to convert the text into a string, i am not quite sure how to do that. Can anyone help me...
  20. common

    Array

    Hey I have an array where the keys are words in a string and the value of the array is amount of times each word comes up in the string. I want to count all the values(which are numbers). Can anyone tell me how i can do that?? Thanks
  21. Hi everyone I am strugling with something! I want to create a page with a login function. And after you have logged in, i want to make a textarea. The text created in the textarea must be visible on another page(page 2), but when you exit your browser,and open it again & go to page 2 the text should still be there untill i log in on the first page and change the textarea input. Can anyone tell me how to do that?? I want it to work like facebook's status update...
  22. Hi I have a string but want to remove all the punctuation... I know that str_replace() function works, but can only remove one kind of punctuation mark. Thanks
  23. common

    Array

    Hi everyone Ive got a textarea on one page, and on the next page i change it to an array. I want to count each word that occurs in the text, but i dont now what text would be. Can anyone help me, i thought of using an in_array??
  24. common

    Arrays

    Hey I have a string and need to break it up so that the words are the values in a array. Then i want to create a list of the words, but i want to give the array key next to each word. For example if i have "Hallo my name is Jan". I want the words in a list and numbers form 0 to 5 next to each word. How do i get the numbers because i've got the words in a list.
  25. common

    forms

    ok ok i am with you but what is the coding look like for a hidden input??
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.