Jump to content

bladez

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bladez's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. it was jus the ' " ' ... bloody programming.. hahahaha. thanks man .. for at least trying n looking
  2. Here is the partial codes k... the ajax code & the relating javascript.. <script type="text/javascript"> var http = false; if (typeof XMLHttpRequest != "undefined") { http = new XMLHttpRequest(); } else if (typeof ActiveXObject != "undefined") { http = new ActiveXObject("Microsoft.XMLHTTP"); } else { throw new Error("XMLHttpRequest not supported"); } function approval_param(obj) { var poststr = "eventid=" + encodeURI( document.getElementById("eid").value )+ "&comment=" + encodeURI( document.getElementById("comment").value )+ "&clicked="1"; send_approval(poststr); } function send_approval(parameters) { http.abort(); http.open("POST", "ajax_pdf_approval.php", true); http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", parameters.length); http.setRequestHeader("Connection", "close"); http.onreadystatechange=function() { if(http.readyState == 1){ document.getElementById('approval_comment').innerHTML = "<img src='images/loader.gif' width=16 height=16> Loading..."; } else if(http.readyState == 2){ document.getElementById('approval_comment').innerHTML = "<img src='images/loader.gif' width=16 height=16> Loading..."; } else if(http.readyState == 3){ document.getElementById('approval_comment').innerHTML = "<img src='images/loader.gif' width=16 height=16> Loading..."; } else if(http.readyState == 4) { document.getElementById('approval_comment').innerHTML = http.responseText; setTimeout("display_comment_hide()",5000); } } http.send(parameters); } function display_comment_hide(){ document.getElementById('approval_comment').style.display='none'; } </script> <script language=javascript> function display_comment_area(eid){ document.getElementById('approval_comment').style.display='inline'; document.getElementById('eid').value = eid; } </script> Here is the corresponding body : <div id='approval_comment' style='background-color:#c7c7c7;border:1px dotted black;position:absolute;top:290px;left:250px;width:500px;display:none;'> <form name='appr_form' id='appr_form' method="post" action="javascript:approval_param(document.getElementById('appr_form'));"> <table width=100%> <tr><td align=left> <font size=2>Comment:</font> </td> <td align=right><a href=# onClick=document.getElementById('approval_comment').style.display='none';>X</a></td></tr> <tr><td colspan=2> <textarea name=comment id='comment' style='width:100%;'></textarea> </td></tr> <tr><td align=right colspan=2> <input type=hidden name='eid' id='eid'> <input type=submit name=submit value='Submit Comment'> </td></tr> <tr><td></td></tr> <tr><td colspan=2 bgcolor=#E7E7E7> <b><font size=1><i>**This is irrevesible. Submitting this will cause event to be approved.</i></font></b> </td></tr></table> </form> </div> this is trigger by : <center><a href=# onclick=display_comment_area('$eid')>Yes</a> <a href=# onclick=''>No</a></center> now the question ... why isnt my ajax working.. ?.. huhu .. I am using in php ..so u might see some php codes.. such as $eid ...
  3. hi guys, i need help on php - pdf. currently i am doing a generation pdf for my project .. well everything goes well it generates file nicely but now i came to this problem n am stuck here. i managed to do PHP -> PDF ... but now i need to reverse it .. As in read text from PDF n display it on the input box... how can i do tat?.. someone pls help.. Jus like those companies job pages.. whereby u upload ur resume and they pick the certain text and display it back to u from the pdf... hopefully someone can gif me idea on this .. thank you alotsss.. hoping someone will help me on this.. need help badly..
  4. its ok i manage to find the solution myself... Here is how i do it.. Jus thought of sharing i use preg_replace () thanks guys .. anyway moderator u can close this topic
  5. i got the solution but now am hving another problem...sorry... i am using : $connect = mysql_connect($_POST['dbhost'],$_POST['username'],$_POST['password']); if ($con !== false){ if ($_POST['dbcreate'] == 1){ $sqlFileToExecute = "UCMSSQLCreateDB.sql"; $f = fopen($sqlFileToExecute,"r+"); } else{ $sqlFileToExecute = "UCMSSQL.sql"; $f = fopen($sqlFileToExecute,"r+"); $db = mysql_select_db($_POST['dbname']); } $sqlFile = fread($f,filesize($sqlFileToExecute)); $sqlArray = explode(';',$sqlFile); foreach ($sqlArray as $stmt) { if (strlen($stmt)>3){ $result = mysql_query($stmt); if (!$result){ $sqlErrorCode = mysql_errno(); $sqlErrorText = mysql_error(); $sqlStmt = $stmt; break; } } } if ($sqlErrorCode == 0){ echo "Installation was finished succesfully!<br><br>"; } else { echo "An error occured during installation!<br>"; echo "Error code: $sqlErrorCode<br>"; echo "Error text: $sqlErrorText<br>"; echo "Statement:<br/> $sqlStmt <br><br>"; } } else{ echo "Connection to SQL File Failed!"; } mysql_close($connect); it works.. but now am hving another problem is tat how do i include the table prefix tat i prefer.. instead of compiled during sql export?
  6. i would like to execute a .sql file thru php.. without using telnet / mysql console. i have tried Source <filename.sql> << doesnt work i am not sure why .. basically i am running on windows box.. and i would like to make it compatible to work on linux for also ... therefore i would wan to use absolute path .. does SOURCE accept relative paths ? such tat installation/filename.sql ?? i have also tried LOAD DATA INFILE... bla bla bla.. again absolute path dun wan .. is there anyway i execute .sql file like how we open file. or more like execution thru relative path mayb say a thru a web url ? or any better idea?
  7. hi thx for the answer yea tat somewhat gv me the idea but can explain more for solution no.1? no.2 can be the backup idea
  8. hi, currently i am doing something which deals with pdf ,php & html forms.. i would appreciate if someone can help me with my problem I would like to create a pdf at the end of the process. Well wat i would like to do is .. create multiple html forms... at the end of the form there will be a button to generate pdf.. so when it is clicked.. wat ever was the input starting from the first form till the last form will written in the pdf... so my question is how can i fetch the inputs from the first form till the last if every each time we go next it appear next form ?
  9. like sourgeforge some mirrors of sourgeforge .. not all ... exactly which url is hard for me to gif .. but if can pls do help me out on this .. if u hv any simple program or so tat can help to filter this or even like the wan u said abt javapplet i dun mind also coz i am using it on internal LAN so it will be fast anyway ...
  10. ok if its java applet how is the way around it?... how bout javascript? But if u see some website they hv direct download but my download accelerator (REGEX) wont be able to download a single file from there... it only downloads wen i switch to normal way of downloading thru browser..how is tat possible?
  11. How can i block users who are using download accelerator from being able to download from my site in php pr any other softwares or servers tat i can use to block? Download accelerator as in any type of download accelerators
  12. I am somewhat beginner, I am using PHP 5.1.1, according to php.net i need to activate the php_zip library which i have already done. Oh btw i am using windows, wamp5 server. Here is my problem. I have lots of music files, therefore i would like to create a filelist using php which will allow users to browse through folders & files (not streaming the files jus downloading only) but i would like them to mix and match the files that they wan n zip it n then download them. Can anyone help me with the codes (in details coz i really trying to learn here)? or does any codes like this already exist.. pls specify whr i can download them. Thank you...
  13. i have a form for login n password i want to validate on server site to check if the content are either characters or numbers only ... Example : Username : bladez - accecpted Username : bladez99 - accecpted Username : *>dsa*dad - Rejected Username : <?php bla ?> - rejected Which means if it doesnt meet those pattents its an error ..how do i do that in PHP?
  14. well tat statement u put i knew it b4 this...my problem is comparing todays date n the date in the database ... abt deleting i know how to do it ...
  15. ok i am going straight to the point. i have a db that stores a date in a table with a specific column. db=test table=test_date_compare column name=date_inserted ok i hv a php form that allows user to input date and it enters in the above column (date) as in format eg: 21/03/2007 now i wat i would like to do is i would like to compare date of today and the date in the database if it is lesser then todays date it deletes that row of data. deleting the row of data i know how but the problem comes wen coparing the date i dunno how to ... so can anyone assist me on this pls ...thank you very much.
×
×
  • 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.