619 Posted Topics

Member Avatar for gamefreak5678

Debug with this below code. post your output and current error you are getting. [CODE] <? $source = "../upload/".$img; $destination = "../gallery/pic/".$img; if(file_exists($source)) echo '<br />Source exists'.$source; if(file_exists($destination)) echo '<br />Destination exists'.$destination; copy($source , $destination); ?> [/CODE]

Member Avatar for vibhaJ
0
134
Member Avatar for vibhaJ

Hi all, My site is on dedicated server by fasthosts.co.uk. i get email from host server that my site has been placed on the Spamhaus SBL. below is the content for that: [CODE] >> Web bot: port 80 >> IP address 217.174.241.205: on fasthosts.co.uk/live-servers.net >> Canadian Pharmacy spammer[s] are using …

Member Avatar for Stefano Mtangoo
0
157
Member Avatar for doctorphp

I have integrated it once as below. register.php is page where user register to the site. and forum is a sub folder for phpbb placed at root. [CODE] <? /*====================================== my register.php code goes here ========================================*/ //--- phpbb code start ------ echo '<form method="post" style="display:none;" name="frmfrm" id="frmfrm" action="forum/ucp.php?mode=login"> <label for="username">Username: …

Member Avatar for doctorphp
0
629
Member Avatar for sainigks

When your data is inserted to table you should redirect user to new page. [CODE] header("Location:success.php"); exit; [/CODE] Because if you wont then when you press refresh form will be again submitted and again data will be inserted to table. So its better practice to use header when php code …

Member Avatar for metalix
0
142
Member Avatar for Acute

Hi, [URL="http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/"]Check this.[/URL] It might help you.

Member Avatar for Acute
0
116
Member Avatar for magunkey

If you are new to PHP better you use downloaded script. [URL="http://www.reconn.us/scripts.html"]Here[/URL] is a php script with demo and download.

Member Avatar for boorsekala
0
115
Member Avatar for shivaniaroraji

What you exactly want? Does your posted code works? even partially? And where is html portion?

Member Avatar for boorsekala
0
92
Member Avatar for Awah Mohamed

lets say list.php is a page where all article title are shown. [CODE] <? $q="select * from article"; $rs = mysql_query($q); while($sar = mysql_fetch_assoc($rs)) { ?> <a href="article.php?aid=<? echo $sar['id'];?>"><? echo $sar['title'];?></a> <? } ?> [/CODE] When user click on that title you can redirect user to article.php with some …

Member Avatar for vibhaJ
0
68
Member Avatar for doctorphp

Echo query below and run in sql window. Does it returning result?? [CODE] echo "SELECT * FROM albums WHERE userid='".$_SESSION['id']."'"; [/CODE]

Member Avatar for doctorphp
0
112
Member Avatar for Rewired

-> You can read your text file and from text file's content you can take first three or four words and use it as file name. -> or use php random function to create random name. [CODE] function getRandomAlphaNumeric($intpLength = 16) { $arrAlphaNumeric = array(); $arrAlpha = range('A','Z'); $arrNumeric = …

Member Avatar for Rewired
0
181
Member Avatar for ekseks

In below code i have just make drop down selected as 'July'. You can set accordingly. Let me know for further help. [CODE] <html> <meta content= "text/html; charset= utf-8" http-equiv="Content-Type"/> <head> <script type="text/javascript" src="jquery-1.4.2.js"></script> <link rel="stylesheet" href="jquery.datepick.css" type="text/css" /> <script type="text/javascript" src="jquery.datepick.js"></script> <script type="text/javascript" src="fbDateTime.js"></script> <script type="text/javascript"> $(document).ready(function() { // …

Member Avatar for vibhaJ
0
233
Member Avatar for vibhaJ

Hi all, My site is on dedicated server by fasthosts.co.uk. i get email from host server that my site has been placed on the Spamhaus SBL. below is the content for that: [CODE] >> Web bot: port 80 >> IP address 217.174.241.205: on fasthosts.co.uk/live-servers.net >> Canadian Pharmacy spammer[s] are using …

Member Avatar for vibhaJ
0
191
Member Avatar for ijazkhattak

session is stored per user wise. So u can not store chat in session as the other user chatting with user can not use each other's session.

Member Avatar for ijazkhattak
0
206
Member Avatar for ekseks

Below is php code example. If $value is 'c' then it will remain selected .. same for 'a','c','d'. [CODE] <html> <body> <? $value = 'c'; ?> <select> <option <?=($value == 'a')?'selected="selected"':''?> >a</option> <option <?=($value == 'b')?'selected="selected"':''?> >b</option> <option <?=($value == 'c')?'selected="selected"':''?> >c</option> <option <?=($value == 'd')?'selected="selected"':''?> >d</option> </select> </body> </html> …

Member Avatar for ekseks
0
128
Member Avatar for nicnac23

I found this code.. test at your end. [CODE] function postit($host, $url, $postdata) { $fp = pfsockopen ( $host, 80, &$errno, &$errstr, 60 ); if( ! $fp ) return "$errstr ($errno)<br>\n"; fputs ($fp,"POST $url HTTP/1.1\n"); fputs ($fp,"Host: $host\n"); fputs ($fp,"User-Agent: Autopost demonstration script\n"); fputs ($fp,"Accept: */*\n"); fputs ($fp,"Content-type: application/x-www-form-urlencoded\n"); fputs …

Member Avatar for JenniC
0
1K
Member Avatar for مصعب علي

Check this function for more detail. [URL="http://in.php.net/manual/en/function.mysql-connect.php"]mysql_connect[/URL]

Member Avatar for pritaeas
0
1K
Member Avatar for swathi1234

What is [B]$form[/B] in insert query? Bcz it doesn't defined in above code.

Member Avatar for vibhaJ
0
80
Member Avatar for LRNPHP

create one session array. when user click on link you can pass veh_id to ajax page. where in ajax page you will add veh_id in session array. And when user checkout it will use session array.

Member Avatar for vibhaJ
0
96
Member Avatar for vibhaJ

Hi all, Here is my htaccess code for url rewrite: [CODE] RewriteRule ^(.*)/test.php$ test.php?language=$1 [NC] [/CODE] which will redirect [url]www.domain.com/english/test.php[/url] to [url]www.domain.com/test.php?language=english[/url] It is working fine... But when i have extra variable with that url then it doesn't work. e.g. [url]www.domain.com/english/test.php?name=abc[/url] should work like: [url]www.domain.com/test.php?language=english&name=abc[/url] But it is not working.. …

Member Avatar for vibhaJ
0
316
Member Avatar for nsandberg

mysql_query function must be inside foreach loop. [CODE] // Check if button name "Submit" is active, do this if($_POST['Submit']){ foreach($checkbox as $i){ $sql2 = "INSERT INTO assignments SET firstName = '$firstName[$i]', lastName = '$lastName[$i]', AP = '$AP[$i]', last_teacher = '$last_teacher[$i]', description = '$description', subject = '$subject'"; $result2=mysql_query($sql2) or die(mysql_error()); } …

Member Avatar for vibhaJ
0
3K
Member Avatar for creperz

Here i have posted code which will work for 5second, you can set urs. [CODE] <html> <head> <script type="text/javascript"> function timedMsg() { var t=setTimeout("redirect()",5000); } function redirect() { alert('5 seconds is completed!'); window.location.href='nextpage.php'; } </script> </head> <body onload="timedMsg()"> exam paper. </body> </html> [/CODE]

Member Avatar for vibhaJ
0
102
Member Avatar for EverWebby

This is example. [CODE] function highlight($str,$searchText) { return (eregi_replace($searchText, "<span class='highlight'>$searchText</span>", $str)); } $str = 'This is beautiful'; $searchText = 'is'; echo highlight($str,$searchText); [/CODE] Hope this helps.

Member Avatar for EverWebby
0
148
Member Avatar for Awah Mohamed

You can do this by htaccess file also. below is the code when user open non existed file then he is redirected to error.php. [CODE] ErrorDocument 404 http://localhost/project/error.php [/CODE]

Member Avatar for HemantPHP
0
61
Member Avatar for debow

where is starting of form tag in your last code? and where is $count in line no. 28? Post complete page and also error you are getting....

Member Avatar for debow
0
162
Member Avatar for phphit

This below code is working at my end. [CODE] <script type="text/javascript"> function GetIst() { var d = new Date() var gmtHours = -d.getTimezoneOffset(); document.write(+ gmtHours); } </script> <? $reminder ="<script language=javascript>GetIst();</script>"; echo $reminder; ?> [/CODE] Bcz your code is merging of js and php. Just refer this : [B]But whenever …

Member Avatar for vibhaJ
0
753
Member Avatar for nick3592

This is a php function to avoid sql injection. [CODE] <? function cleanQuery($string) { if(get_magic_quotes_gpc()) // prevents duplicate backslashes { $string = stripslashes($string); } if(phpversion() >= '4.3.0') { $string = mysql_real_escape_string($string); } else { $string = mysql_escape_string($string); } return $string; } // if you are using form data, use the …

Member Avatar for vibhaJ
0
67
Member Avatar for wiredtec

Just consider beta form as a login page. On home page is session is not set user is redirect to key enter page. If key is properly inserted you can set session and redirect back to home page. You can achieve your requirement by checking and setting simple php sessions.

Member Avatar for vibhaJ
0
333
Member Avatar for nick3592

This code shows simple example of query result and array. [CODE] <? $q="select * from user"; $res = mysql_query($q); while($sar = mysql_fetch_assoc($res)) { $arr[]['username'] = $sar['username']; } echo '<pre>'; print_r($arr); ?> [/CODE]

Member Avatar for vibhaJ
0
118
Member Avatar for vibhaJ

I have one link in my webpage where user can call to other skype user. [CODE] <a href="skype:skype_username?call">Call me</a> [/CODE] But when user have not skype installed in their pc one notification popup is coming. Is there any way in any manner i can detect is skype is installed or …

Member Avatar for vibhaJ
0
830
Member Avatar for anony

JS code runs on client side. If you will give href on "attach more files" that means page is changed. And you can not have count of click. you can add file element dynamically using JS. Below code will give number of click without href. [CODE] <script type="text/javascript"> var max_no_img …

Member Avatar for vibhaJ
0
3K
Member Avatar for haribo83

It might be some issue in query to passing 'Option Two'. Also check database with having value 'Option Two'.

Member Avatar for rajarajan2017
0
66
Member Avatar for fobos

Post this two values what you are getting at line # 107. -> $_SERVER['DOCUMENT_ROOT'] -> $real_dir;

Member Avatar for rajarajan2017
0
188
Member Avatar for niths

Images must be stored some where to get it display. It may be 3 case: - you can save image in folder - in database - you can directly use external link like [url]http://www.abc.jpf[/url] as a image src.

Member Avatar for vibhaJ
0
91
Member Avatar for backendcode

change line no. 26 to: [CODE] $result = mysql_query($sql) or die(mysql_error()); [/CODE] Check whats wrong in $sql.

Member Avatar for karuppasamy
0
140
Member Avatar for Smudly

Because your select query is not returning credits field. Change $drawquery as below. [CODE] $drawquery = mysql_query("SELECT id, credits FROM userstats WHERE `todaysurfed`>=250 AND DATEDIFF(NOW(),`wondaily`) > 30 OR `wondaily`='0000-00-00' ORDER BY rand() LIMIT 3"); [/CODE]

Member Avatar for karuppasamy
0
98
Member Avatar for faizabest

This is the simplest way to create doc file. This code is for example using users table. [CODE] <? $fp = fopen("export.doc", 'w+'); $sql = "select * from users"; $res = mysql_query($sql); while($sar = mysql_fetch_assoc($res)) { $str = "<br />Username : ".$sar['username']." Password : ".$sar['password']; fwrite($fp, $str); } fclose($fp); ?> …

Member Avatar for vibhaJ
0
63
Member Avatar for mastermind2

1) add new field as sendEmailAlert.make a simple php page where you check if difference between expired_date and current date is greater than 15 and sendEmailAlert is zero. 2) if is is greater than 15 then send a email to that username about expiration and make sendEmailAlert field to one. …

Member Avatar for mastermind2
0
140
Member Avatar for richhoggan

What you exactly like to do? You want to add new record in database? By java script you can show dynamic row and by clicking on submit button, using php you can insert that values in database.

Member Avatar for richhoggan
0
99
Member Avatar for Sucesso

try some different charset for HTML. [CODE] <meta http-equiv="Content-Type" content="text/html; charset=ISO 8859-1" /> [/CODE]

Member Avatar for Sucesso
0
1K
Member Avatar for vibhaJ

This is my two tables: [CODE] CREATE TABLE `subject` ( `id` int(11) NOT NULL auto_increment, `subjectName` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -- -- Dumping data for table `subject` -- INSERT INTO `subject` (`id`, `subjectName`) VALUES (1, 'Maths'), (2, 'Science'), (3, 'English'), (4, 'Chemistry'); …

Member Avatar for tesuji
0
313
Member Avatar for tunde011

This code will generate your requires output. [CODE] <? $reminder ="300"; // 5 minutes * 60 seconds (to convert to seconds) $timefromreminder = date('h:i:s', strtotime("-$reminder seconds")); // this will give 5 minutes minus the current time //but what i am looking for is to be able to do this $event_start_time …

Member Avatar for vibhaJ
0
125
Member Avatar for tunde011

Check this code. [CODE] <? function timeAfter($timestamp, $granularity=2, $format='Y-m-d H:i:s'){ $difference = $timestamp - time(); if($difference < 0) return '0 seconds ago'; // if difference is lower than zero check server offset elseif($difference < 864000){ // if difference is over 10 days show normal time form $periods = array('week' => …

Member Avatar for chrishea
0
758
Member Avatar for gunbuster363

What is exact problem? This form is not working? SigninSubmit function is not defined in current code. Add this code to submit form. [CODE] <script language="javascript"> function SigninSubmit() { document.SigninForm.submit(); } </script> [/CODE]

Member Avatar for vibhaJ
0
99
Member Avatar for Kadafiz

You can pass ItemID as a value. After form submitted you can again fire select query to fetch price of selected item from ItemID. [CODE] <select name="item2" id="item2" onchange="getPrice(this.id)" /> <option value="">Select medicine</option> <?php $sql = "SELECT ItemID, ItemName, Price FROM itemavail ORDER BY ItemName"; $rs = mysql_query($sql); while($row = …

Member Avatar for vibhaJ
0
127
Member Avatar for sparkles_links

$_POST[aspirant_photo] doesn't mean uploaded image will be directly attached.. you have to upload that photo to the server using move_uploaded_file. Then you can give <img src="url of uploaded photo"> in message.

Member Avatar for sparkles_links
0
112
Member Avatar for DarkBerzerk™

Hope this code will help.. u can modify it as per ur requirement. [CODE] <HTML> <HEAD>Try</HEAD> <BODY> <form NAME="myForm"> <input TYPE="button" VALUE="Line Break" ONCLICK="insertString('</br>')"> <input TYPE="button" VALUE="H1 Tag" ONCLICK="insertString('<h1></h1>')"> <br> <textarea NAME="myTextArea" ROWS="5" COLS="100"></textarea> </form> </body> </html> <script LANGUAGE="Javascript"> var globalCursorPos=0; // global variabe to keep track of where the …

Member Avatar for DarkBerzerk™
0
124
Member Avatar for hostmost

I have made a code... Try this. Hope this is what you want. [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <? if(isset($_REQUEST['submit'])) { $col1 = $_REQUEST['col1']; $col2 = $_REQUEST['col2']; $col3 = $_REQUEST['col3']; ?> <table width="100%" border="0" …

Member Avatar for rajarajan2017
0
134
Member Avatar for Tyler78701

Try this: [CODE] <?php /* $Id: contact_us.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $name = …

Member Avatar for vibhaJ
0
80
Member Avatar for cristi08

I found this list of perfomance tips : [URL="http://www.debianadmin.com/top-84-mysql-performance-tips.html"]Perfomance Tips[/URL] Hope it will help u.

Member Avatar for tesuji
0
144
Member Avatar for Awah Mohamed

Your php code sequence is not correct. [CODE] <?php $mysql_host = "mysql9.000webhost.com"; $mysql_database = "a2354076_db"; $mysql_user = "username"; $mysql_password = "*********"; $con = mysql_connect("$mysql_host","$mysql_user","$mysql_password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("$mysql_database", $con); if (isset($_REQUEST['name'])) { $email = $_REQUEST['email'] ; $pass = $_REQUEST['pass'] ; $country = $_REQUEST['country'] …

Member Avatar for rajarajan2017
0
106

The End.