Jump to content

mga_ka_php

Members
  • Posts

    134
  • Joined

Everything posted by mga_ka_php

  1. what do i need to be able to compress and uncompress files with RAR in website? do you know a script? tnx.
  2. created a website which it can compress and uncompress files such as zip, tar and tgz. the problem is. when i compress files it will save in the server if after the script i will delete the files, users cannot download the files.how do i make the delete the files after a period of time?
  3. i've seen in wordpress, the anchor of post title something like this http://www.yourdomain.com/test-me-again my question is if <a href="http://www.yourdomain.com/test-me-again" />Test Me Again</a> how do you use the $_GET[]? $_GET["?"] = what is the name?
  4. additional to this, if your going to use the id of first sql query, $sql="insert into personal(name,age)values('$_POST['name']','$_POST['age']')"; $query=mysql_query($sql) or die(mysql_error()); $last_id=mysql_insert_id(); $sql="insert into hobbies(hobbies,personal_id)values('$_POST['hobbies']','$last_id')"; $query=mysql_query($sql) or die(mysql_error());
  5. $myname = $_POST["myname"]; $mymail = $_POST["mymail"]; $msubj = $_POST["msubj"]; $mbody = $_POST["mbody"]; $mcompany= $_POST["mcompany"]; // INSERT THIS $mphone= $_POST["mphone"]; // INSERT THIS ////////////////////////////////////////////////////////////////////////////////////// $fpmanager = popen("/usr/sbin/sendmail dmcnzl@gmail.com","w"); fputs($fpmanager,"Content-Type: text/html; charset=iso-8859-1\n"); fputs($fpmanager,"From: ". $mymail ."\n"); fputs($fpmanager,"Subject: Website Enquiry > $msubj"); ////////////////////////////////////////////////////////////////////////////////////// fputs($fpmanager,"\n\nMessage Subject > $msubj\n\n"); fputs($fpmanager,"Message Content > \n"); fputs($fpmanager,"$mcompany\n\n"); // INSERT THIS fputs($fpmanager,"$mphone\n\n"); // INSERT THIS fputs($fpmanager,"$mbody\n\n"); fputs($fpmanager,"\n\nMessage From > $myname ($mymail) \n\n"); fputs($fpmanager,"User IP Address > ". $_SERVER['REMOTE_ADDR'] ."\n");
  6. $name=stripslashes($_POST['name']); $email=stripslashes($_POST['email']); $company=stripslashes($_POST['company']); $phone=stripslashes($_POST['phone']); $subject=stripslashes($_POST['subject']); //Let's start our headers $header="MIME-Version: 1.0\n"; $header.="Content-type: text/html\n"; $header.="From: Free Form Blister Pack Customer: $name<$email>"; $message="<table width='100%' cellpadding='0' cellspacing='0' border='0'>"; $message.="<tr><td>Name</td><td>$name</td></tr>"; $message.="<tr><td>Email</td><td>$email</td></tr>"; $message.="<tr><td>Company</td><td>$company</td></tr>"; $message.="<tr><td>Phone</td><td>$phone</td></tr>"; $message.="<tr><td>Subject</td><td>$subject</td></tr>"; $message.="</table><br /><br />"; // send the message mail("email address","Contact Form",$message,$headers);
  7. This is correct. cause i use this. $SelectThis = mysql_query("SELECT * FROM Table_Name WHERE PostID = '" . $_GET['PostID'] . "'", $Connection);
  8. while($a = mysql_fetch_object($result)) { $images[] = array("img " => $a->table_image, "title" => $a->table_title, "imgId" => $a->table_id);
  9. debug your if statement in your function checkLogin if your $access value is change to true.
  10. got a problem like that before, but mine was limited only to view 3x4 per page. so what i did was i used css left and top for positioning it into every column and row. if someone has a better solution please post.it can help me too.
  11. use mysql_insert_id. like this $album = clean_full($_POST['album']); $artistid = $_POST['artist']; $year = (int)($_POST['year']); $review = clean_body($_POST['review']); $user_id = $_SESSION['user_id']; $query = "INSERT INTO albums SET id = '', // This id will auto-increment in the database but I need to get the number it is assigned artist_id = '$artistid', title = '$album', year = '$year', user_id = '$user_id', created_at = NOW() "; $result = mysql_query($query); $prev_id=mysql_insert_id(); $query1 = "INSERT INTO reviews SET id = '', artist_id = '$artistid', album_id = $prev_id // I need to get the id from the previous insert and place it here body = '$review', user_id = '$user_id', created_at = NOW() "; mysql_insert_id() = get the id from the previous sql statement
  12. can you show the output you want to achieve?
  13. select concat(column1,column2) as column3 from table1 where column3 like '%$str%' ??????? coz i want to search in a concatenated column, how do i do that?
  14. would like to know what does this symbol do " -> "? is it different from " => "?
  15. how do you explode string with two conditions, space and newline? i use strtok but i could only use 1 condition i cannot use the 2 condition space and newline i want to explode a string with if a string has a space and newline? how do i do that? thanks in advance.
  16. how do i input textarea value to mysql database that will preserve the format? ex. if i input a text in textarea ---------------------------------- line one line two ---------------------------------- and transfer it to mysql database and retreive it the text will look like this ---------------------------------------------------- line one line two ---------------------------------------------------- it will not put it to the next line. thank you.
  17. i used this script but it doesn't work?
×
×
  • 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.