619 Posted Topics

Member Avatar for turt2live

<?php include "class.php"; $account = new account(0); $id = $_GET['id']; $u = $_COOKIE['username']; $a = mysql_fetch_array(mysql_query("SELECT * FROM items WHERE id='$id'")); $path = $_SERVER['DOCUMENT_ROOT'].$a['actualPath']; // make sure file exists at this path $fullPath = $path.$_GET['download_file']; if ($fd = fopen ($fullPath, "r")) { $fsize = filesize($fullPath); $path_parts = pathinfo($fullPath); $ext = …

Member Avatar for vibhaJ
0
1K
Member Avatar for athulram

This is one of my favorite website: [Click Here](http://www.generateit.net/mod-rewrite/) Here htaccess code is generated based on your selection, you just need to add it in root of your project.

Member Avatar for vibhaJ
0
189
Member Avatar for manzoor.ilahi77
Member Avatar for jamojo

After urldecode you can use extract function, which will create variable based on array variable. <? $myArray['TIMESTAMP'] = '2012%2d05%2d01T17%3a19%3a07Z'; $myArray['L_LONGMESSAGE0'] = 'This%20transaction%20cannot%20be%20processed'; $myArray['CURRENCYCODE'] = 'Euro'; $myArrayFinal = array_map('rawurldecode',$myArray); extract($myArrayFinal); echo 'Time: '.$TIMESTAMP; echo 'Long Message: '.$L_LONGMESSAGE0; echo 'Currency: '.$CURRENCYCODE; ?> > This%20transaction%20cannot%20be%20processed

Member Avatar for diafol
0
235
Member Avatar for sammry

If you are adding your php age in cronjob and assuming it will run daily you can use '<=' as shown below query . select email from myusers where WHERE DATE_ADD(FROM_UNIXTIME(prelogin), INTERVAL 30 DAY) <= CURDATE()";

Member Avatar for vibhaJ
0
166
Member Avatar for vibhaJ

Hi All, Sorry if this question is already asked. After new changes i am not able to judge that if anyone has posted to the thread after me where i have posted. Previously judgement was easy based on circle infront of post title. Now circle remains white bordered even there …

Member Avatar for seosolutions84
0
157
Member Avatar for sowh4t

Your query is bit not clear. Do you want to save all 3 language names into one array. If user select any language then set selected language in cookie. when page is loaded check cookie value and based on that fetch content.. Is that so??

Member Avatar for Biiim
0
98
Member Avatar for mangel.murti

Try this: <? while($row = mysql_fetch_array($result)) { $one['id'] = $row['id']; $one['name'] = $row['name']; $one['link'] = $row['link']; $one['parent'] = $row['parent']; $thisArray[] = $one; } echo '<pre>'; print_r($thisArray); ?>

Member Avatar for vibhaJ
0
121
Member Avatar for dyingatmidnight

try to change admin rule with : `RewriteCond %{REQUEST_URI} !/admin` Check if it is working or not? > ck direct access to

Member Avatar for vibhaJ
0
95
Member Avatar for realworldmedia

Make sure any tag doesn't break. Try below code i have used photourl as image src. <div class="body2"> <div class="main"> <section id="content"> <div class="wrapper"> <article class="col1"> <div id="slider"> <?php while($row=mysql_fetch_array($result)) { ?> <img src="<?php echo $row['photourl'] ?>" alt="" title="<strong><?php echo $row['address'] ?></strong><span> <?php echo $row['bathroom'] . " bathrooms," . $row['bedroom'] …

Member Avatar for vibhaJ
0
233
Member Avatar for ak47carbon

How do you insert data? Using mysql_query function or any mysql interface like phpmyadmin?

Member Avatar for vibhaJ
0
225
Member Avatar for DaveyMoyes

PHP is having good function ctype_alnum, which will do all stuff for you in one line. <?php $username = 'testing123'; if(ctype_alnum($username)) { echo 'Username is valid'; } else { echo 'Username is not valid'; } ?>

Member Avatar for vibhaJ
0
283
Member Avatar for jbennet

I am adding code in post, and clicking on reply button. Codes are not highlighted. I thought i don't know how to use code tag but when i refreshed page it shows highlighting. Sorry if this post is repeated question. Also sometimes i need to delete last post.. Will it …

Member Avatar for Airshow
0
2K
Member Avatar for vizz

Apart from readymade script, if you still want to make your own code: 1) Design database tables. *e.g autoId chatSession fromUserId toUserId message dateTime* 2) There will be one div and one text area for design view. 3) When user type something in textarea and press enter trigger javascript and …

Member Avatar for vizz
0
298
Member Avatar for breakzzzz20

[http://www.daniweb.com/web-development/databases/mysql/threads/126510/copying-rows-from-one-table-to-another](http://www.daniweb.com/web-development/databases/mysql/threads/126510/copying-rows-from-one-table-to-another) Just to ask, What is the requirement for moving same data to another table?

Member Avatar for vibhaJ
0
2K
Member Avatar for 3tplus

PHP is server side language while javascript is client side. You can not combine both. If you want to use php functionality in javascript you can use ajax which will send js data to php and will return with php output. What is your exact requirement so that i can …

Member Avatar for Biiim
0
413
Member Avatar for heshanm

Try below. $query="SELECT admission_no FROM student_info WHERE student_info.admission_no='$admission_no'"; $result=mysql_query($query); $num_rows = mysql_num_rows($result); if($num_rows > 0) { // admission no already exist in system } else { // admission no not exist }

Member Avatar for IIM
0
254
Member Avatar for tarunfuture

It meanse you don't have offers.php in admin folder. Or form action path you have specified is not correct.

Member Avatar for vibhaJ
0
79
Member Avatar for abhishek2301

I don't understand why you have used iframe for image? I think below html will work for your design. <form method="post" name="mainForm" id="mainForm"> <table width="500" border="0" cellpadding="0"> <tr> <td width="21%" align="right" valign="top"><input type="radio" name="selected_option" id="rb1" value="one"></td> <td width="79%" align="left"><input type="image" name="imageField1" id="imageField1" src="img1.png"></td> </tr> <tr> <td align="right" valign="top"><input type="radio" name="selected_option" …

Member Avatar for vibhaJ
0
133
Member Avatar for bavenbabu
Member Avatar for pritaeas
0
173
Member Avatar for clarme

<div align="center" id="footer"><hr class="footerhr" align="center" /> <p> <img width="50" height="50" src="http://enla.org/wp-content/uploads/2011/07/cityoflosangeles.jpg" /> <img width="50" height="50" src="http://enla.org/wp-content/uploads/2011/07/losangelesregionalfoodbank.jpg" /> <img width="50" height="50" src="http://enla.org/wp-content/uploads/2011/07/salvationarmy.jpg" /> <img width="50" height="50" src="http://enla.org/wp-content/uploads/2011/07/unitedway.jpg" /> <img width="50" height="50" src="http://enla.org/wp-content/uploads/2011/07/211.jpg" /> <img width="50" height="50" src="http://enla.org/wp-content/uploads/2011/07/fcbc.jpg" /> <img width="50" height="50" src="http://enla.org/wp-content/uploads/2011/07/catholiccharities.jpg" /> <img width="50" height="50" src="http://enla.org/wp-content/uploads/2011/07/countyoflosangeles.jpg" /><br /> <img width="50" …

Member Avatar for Biiim
0
179
Member Avatar for labhijitp

This is simple code for exporting student table to excel. Hope this helps you. [CODE] <? mysql_connect('localhost','root',''); mysql_select_db('test'); $sql = "select name,sirname from student"; // Query Database $result=mysql_query($sql); $filename = 'file.xls'; // Send Header header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download");; header("Content-Disposition: attachment;filename=$filename"); …

Member Avatar for leardas
0
1K
Member Avatar for xiiopao

Use array [] in check box name in form as shown below. [CODE] Orders <input name="orders[]" type="checkbox" value="One" /> One <input name="orders[]" type="checkbox" value="Two" /> Two <input name="orders[]" type="checkbox" value="Three" /> Three [/CODE] Then you need to change php code: [CODE] <?php $name = $_POST['name']; $address = $_POST['address']; $phone = …

Member Avatar for tashi lhendup
0
3K
Member Avatar for MDanz

Try this. [CODE] RewriteEngine On RewriteRule ^user=([^=]*)$ /profile.php?user=$1 [L] [/CODE]

Member Avatar for hijabihtohai
0
142
Member Avatar for jacksantho

You can also do it by using ternary operator. [CODE]<? echo '<td> echo <select name="type"><option value=" ">select the type</option><option value="C" "'.((trim($_POST['ctype2'])=="C")?('selected'):('')).'">Calcium</option><option value="V">Vitamin</option></td> </tr>'; ?>[/CODE]

Member Avatar for bijoy340
0
222
Member Avatar for Midnite007

Or before [B]<center><font color="white" size=5>[/B], add this line. [CODE]<br style="clear: both;">[/CODE]

Member Avatar for diafol
0
142
Member Avatar for aecha

Where is $User_id defined in update_user1.php? Also you need to assign all form's posted variables. e.g. $User_tcno = $_POST['User_tcno']; Then only you can use $User_tcno in update query.

Member Avatar for aecha
0
183
Member Avatar for bala2111
Member Avatar for siina

siina, 1) firstly you need to take all html content from site url using [B]file_get_contents[/B]. 2) Then find all image tags from html source using [B]preg_match_all[/B]. 3) have a loop of images array and again use [B]file_get_contents[/B] function to grab image source and save it in your folder.

Member Avatar for cwarn23
0
188
Member Avatar for musicmancanora4

[CODE] if (isset($_POST['submit'])) // when form is submitted { if($_SESSION['item']==$_POST['h1']) // if "h1" input's value is same as item stored in session (2*: see below) { $_SESSION['qty'] = $_SESSION['qty'] + 1; // then increament qty stored in session } else // if h1's value is not matching with session (1*: …

Member Avatar for vibhaJ
0
118
Member Avatar for rakwel10

Normally there are two used of functions. 1) Just call function abstractly, and you don't need anything from function. e.g. [CODE] function echoSum($a,$b) { $c = ($a+$b); echo "Sum is :".$c; } //==== some php code ===== echoSum($a,$b) // function output is not required further //==== some php code ===== …

Member Avatar for vibhaJ
0
123
Member Avatar for ptermourra
Member Avatar for didier_m
0
375
Member Avatar for Virangya

I have created this function. You can use it or customize it as per requirement. [CODE] <? function dateDifference($date1, $date2) { $date1=strtotime($date1); $date2=strtotime($date2); $diff = abs($date1 - $date2); $day = $diff/(60*60*24); // in day $dayFix = floor($day); $dayPen = $day - $dayFix; if($dayPen > 0) { $hour = $dayPen*(24); // …

Member Avatar for lyrico
1
14K
Member Avatar for jollywood

Don't use $_POST for file input field. You need to use $_FILES['p_logo']['name'] for file name. and store that name in database. When you want to display image fetch filename from database and concate with $target_path. e.g. <img src="<?php echo $target_path.$file_name;?>" />

Member Avatar for vibhaJ
0
174
Member Avatar for davy_yg

what is below code ?[CODE]$f = function ($d) // f) $g = function ($d) { $e++; }[/CODE] What you want to do with this lines?

Member Avatar for karthik_ppts
0
167
Member Avatar for vanzpaticawen

I am using jqPrint from here : [URL="http://plugins.jquery.com/project/jqPrint"]http://plugins.jquery.com/project/jqPrint[/URL] Demo will not work but download file and try it. You just need to use any selector. i.g. div id.

Member Avatar for vibhaJ
0
56
Member Avatar for momo219

1) If [B]code_block.php[/B] is in parent folder then only use [B]include('../code_block.php')[/B] if both files are at same folder then use [B]include('code_block.php')[/B] 2) You need to create $code_block variable in code_block.php in order to use it in page.php [CODE]<? $code_block = 'html html... but here i need an include html html... …

Member Avatar for vibhaJ
0
102
Member Avatar for mwenyenia07
Member Avatar for urtrivedi
0
110
Member Avatar for turt2live

Where is [B]settings.inc.php[/B] in included? In index.php OR includes.inc.php? And what is the order of include coding?

Member Avatar for turt2live
0
302
Member Avatar for Aksel

When your form is submitted use urlencode in following way before inserting into database. [CODE]$comment = urlencode($_POST['comment']);[/CODE] I think it should not cutoff with &amp, What is field type of comment in database?

Member Avatar for vibhaJ
0
103
Member Avatar for jabeen111

[CODE]echo '<td><a onclick="return confirm('Are you sure want to delete?');" href="teachers_delete.php?Course_Id=' . $row['Course_Id'] .'" ><img src="images/delete.gif" /></a></td>';[/CODE]

Member Avatar for vibhaJ
0
140
Member Avatar for mlhazan

You are fetching images based on categoryid passed in link [B]viewproduct_by_category.php?categoryid=1[/B]. So when you click next link url should also have categoryid i.e. [B]viewproduct_by_category.php?categoryid=1&page=2[/B]. Check in your coding whether you are getting it or not.

Member Avatar for mlhazan
0
324
Member Avatar for gganeriwal

check [B]Draggable[/B] and [B]Effects[/B] at this link [URL="http://jqueryui.com/demos/"]http://jqueryui.com/demos/[/URL]. You need to customize jquery based on your requirement.

Member Avatar for limohire
0
711
Member Avatar for ace3df

[CODE]onchange="window.location.href='http://www.mysitehere.com/subfolder/subfolder1/subfolder3/'+this.value;"[/CODE]

Member Avatar for vibhaJ
0
202
Member Avatar for vlowe

Check this code. [CODE]<? session_start(); $sendAfter = (10)*(60); // in seconds $sendEmail = false; $now = date('Y-m-d H:i:s'); if(!isset($_SESSION['sent_time'])) // if you are first time send email { $sendMail = true; $_SESSION['sent_time'] = $now; } else { $diff = strtotime($now) - strtotime($_SESSION['sent_time']); if($diff >= $sendAfter)// if difference is more than …

Member Avatar for karthik_ppts
0
231
Member Avatar for vibhaJ

Hi Friends, I am working on php from builder, where user can add text-box, text-area, chekbox, radio-button etc field using jQuery. Now i am ready with html code of form. Next step is to save each attributes(i.e. name, optionstags, label, title, tooltip, class etc) in mysql database. How can i …

Member Avatar for vibhaJ
0
213
Member Avatar for zulfistyle

If you just need image in email body then create email body string which contain img tag. [CODE]<?php emailBody = '<img src="http://images.daniweb.com/logo.gif" />'; ?>[/CODE] Check this example for help : [URL="http://in.php.net/manual/en/function.mail.php#example-2935"]http://in.php.net/manual/en/function.mail.php#example-2935[/URL]

Member Avatar for vibhaJ
0
97
Member Avatar for vibhaJ

I have one index.php file that is on abc.com server. Here in index file i have frameset and src of that is : 'http://www.xyz.com/login.php' All my php files are on xyz.com. What i am having problem is when user open url : abc.com And they get login page. they are …

Member Avatar for vibhaJ
0
134
Member Avatar for vibhaJ

Hello All, I wand Firefox to remember my password when i login in phpmyadmin. But Firefox doesn't ask me to 'Remember password'. When i inspect phpmyadmin form using developer tool, i done see any trick. Secondly i also want in my website coding that when user log in Firefox don't …

Member Avatar for vibhaJ
0
1K
Member Avatar for vibhaJ

Hi Pals, I am using filezilla and i heard that it causes virus attacks on my website. I am also not saving password in site manager rather using quick connect. From some days m using core FTP. What do you guys think. What is secure way? Regards, Vibha

Member Avatar for vibhaJ
0
322

The End.