39,323 Topics
| |
Hi. I need a function which will convert a decimal to a fraction, so that I can put in [CODE]echo dec2frac(1.75);[/CODE] and it'll output 1 3/4. Any suggestions? Thanks | |
I wrote the following codes: [CODE] <?php $nama = ('a' => 'John', 'b' => 'James', 'c' => 'Ray', 'd' => 'Lime', 'e' => 'Kit') sort $nama reset($nama) $i=1; do { $i++; echo "The key is " . $i . "and the value is “ .$i <br />"; } while ($i<=5); … | |
hi.. i'm going to host my project and on clients site, a user always have to login to view what he can view. So the user has a user name and a password. Is there a way i can enable a user to login automatically without just entering user name … | |
How can I make my website work like this: User forgot to logout its account to PC1. Then he goes to PC2 and login the same account he uses to PC1. User successfully logs in to PC2 while its account in PC1 is autamatically logged out. How is that? | |
hello, I need the coding of only selected users allow the certain pages and they don't have a permission in admin section in php. Please reply ASAP. | |
Hi, Is there any possibility to use Coda in windows for PHP Developement ?!?!?!? I have seen CODA on a Friend's Macbook Pro and it is wonderful and have great features. Anyway to use it on Windows? Thanks | |
Hi, I need some help in editing the theme ''allure real estates theme''. I got stranded when adding a new country to the 4 countries listed. I managed to add a country at (/home/dbname/public_html/wp-content/plugins/placester/core/const.php) but when I try add a listing, the reply in the country field is that the … | |
I am trying to send registration/ activation information via email, but don't want to store my authentication within the vb.net app and therefore not wanting to use .NET SMTP. I have the below php script that works from a website, but I can't seem to get the variables sent to … | |
Hi, I am stuck with a problem being un-solved. Basically i want a solution in which when a User signup , he to be asked a secret Code which is only known by the [B]CS WING staff[/B]. If the user signup as other then CS WING staff section member (options … | |
[CODE] $nama = array('a' => 'John', 'b' => 'James', 'c' => 'Ray', 'd' => 'Lime', 'e' => 'Kit'); //sort ($nama); //reset($nama); $i=1; do { echo "The key is " .$i. " and the value is " .$nama[$i]; $i++; } while ($i<=5); Echo "newline"; ?> [/CODE] The following error appears: Notice: … | |
I have written a login page but each time I login it returns a blank page even with a wrong password please help: the login page is as follows: [CODE] </head> <body> <div id="wrapper"> <form action="methods/login.php" method="post"> <ul> <li><label>Username:</label><input type="text" name="username" size="10" value="<?php echo htmlentities("$username"); ?>" /></li> <li><label>Password:</label><input type="password" name="password" … | |
[B]Sending email through PHP[/B] [B]Intro[/B] Thousands of websites use contact forms to communicate with their users. You will have almost certainly seen one if not used one to contact someone. The contact form will take the users information that he or she has filled in then send the data over … | |
$split = preg_split('/[\s]+/',$datarow); What does '/[\s]+/' mean? [\s] represents any whitespace character, '+' represents the whitespace character should be followed by something. But what do the two '' mean? | |
Hi I have a script that is scheduled to run with task scheduler will download a file via FTP and import it to a mysql DB How would I go about handling the retries if there is either a problem with the connection or something. I tried going about it … | |
please help me. this my trouble Notice: Undefined index: p in C:\wamp\www\index.php on line 7 and soure [CODE]<?php session_start (); include ("function.php"); $title = "Trang chủ"; include ("header.php"); $p_now = intval($_GET ['p']); $total = mysql_result ( mysql_query ( "SELECT COUNT(id) FROM baiviet WHERE kieu='post'" ), 0 ); $numofpages = $total … | |
Ok, working on a blog engine. Small and somewhat unimpressive, basically following along with a tutorial. The tutorial basically has me write a little MySQL to query some test fields that we filled in manually. And here is what I get. (see attachments) The first one shows the read out … | |
hello i wanted to display the nultiple image in the webpage from mysql database. I am new to php. till now it only displays one image at a time. Please help . Here is the code snippet: [CODE]<?php $db = mysqli_connect ('localhost', 'username', 'pwd', 'databasename'); $query = "select * from … | |
[CODE]<?php $datax = $db->get_results("SELECT katid, katparentid, katadi, katsira, katdurum FROM sql_kategori WHERE katparentid='0'");?> <form action="index.php?menu=com.kategori:ekle.kod" method="post" name="formx" id="formx"> <table id="tablexcaption" width="600" border="0" cellspacing="2" cellpadding="2"> <tr id="caption"> <td width="40" align="center" valign="middle">Id</td> <td width="40" align="center" valign="middle">P.Id</td> <td>Kategori Adı</td> <td width="40" align="center" valign="middle">Durum</td> <td width="40" align="center" valign="middle">Sıra</td> <td width="40" align="center" valign="middle">Düzenle</td> <td width="40" … | |
Hi, I have two servers. The question is i want to select the information form one server's table and insert it into other server's table. for that how many files i need. I am able to select table data form server one but i don't know how to insert it … | |
I want to display last 6 months from the current month. For example This month is september, I want to display April, May, June, July, August, September Can anyone help me with this ? | |
How can I output the resulting echo from my php to the main html? heres my code: what I want is when the I submit , the resulting echo will be posted in the <p id="alert" name="alert"></p> of the main html HTML: [code] <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>REGISTER</title> <link rel="stylesheet" type="text/css" … | |
hi friends how to send post value in url code is: header('Location:edit_products.php?catid=$_POST[catidHd]&catname=$_POST[catnameHd]'); the $_POST[catidHd] value coudnt taken how to give this $_POST[catidHd] in url tnx | |
This question is in regards to the little dynamic image that you can link to in your Daniweb profile (see profile page, bottom right). I was curious how Daniweb is set up to dynamically create these images. I would like to do something similar on my site. Could Dani share … | |
Hi, What's the code to print out all letters that is consonants (exclude all vowels)? [CODE] $name = James Cool Yang; i=1; do { echo parse_str($name) } while(i<strlen($name)) [/CODE] The following error occurs: Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\php_exercise\exercise4.php on line 4 | |
Hi, I have this PHP code to send mail with attachment... when I send mail without attachment I am getting the message but when I attach something I am getting the attachment but the message body is blank... please help!! Below is the PHP code : [CODE] <?php // Your … | |
hi frns how to remove & and space from a string.i just gn in url. wn i get this name using request only the door comes rest will be cut.how to remove & and space prod.php?name=Door%20&%20Window%20Hardware tnx | |
can I ask a question? how can I accept inputs in PHP...... here is the code..... [CODE]<html> <body> <h4>Grade Form</h4> <form action="testingform.php" method="post"/> Grade: <input name="Grade" type="text" /> </form> <?php if ($grade>="75") { echo "PASSED"; } else($grade<="75") { echo " FAILED"; } ?> </body> </html> [/CODE] [B]the condition is if … | |
i have website and the XML from another site gives booking info within the CDATA and i want to extract the content of this CDATA using PHP and also create a button so when this is clicked this CDAT content is retrieved. Please help | |
Hi, I have a MySQL database and an array with ID's. For example: $q = array(4,7,9,34,12,3,...etc); The ID count in array can be over 100. What's the best way to select only those rows matching those ID's in array? The usual SELECT * FROM table WHERE ID = '$q[0]' OR … |
The End.