Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
93% Quality Score
Upvotes Received
14
Posts with Upvotes
13
Upvoting Members
14
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
Ranked #607
~58.3K People Reached

98 Posted Topics

Member Avatar for kaungzaythu

Using $return in the view is the correct syntax as Codeigniter creates variables based off the array key names of the array you pass to the view() call. Except why are you using `$this->template->show()` instead of `$this->load->view()`? Two other things. 1) **return** is a PHP reserved word and it's bad …

Member Avatar for cereal
0
5K
Member Avatar for praba_web

Unless you have defined a `printpage()` function in JavaScript, that button will not do anything. Your <img> tag uses the right code `window.print()`, you could change the button to use the same thing: <input type="button" value="Print this page" onclick="window.print()"> As for problems with a dot-matrix printer, those aren't going to …

Member Avatar for cereal
0
11K
Member Avatar for fheppell

Files don't have mime types, there are two factors: The file extension, and the header in an image file that contains information about the image type. I assume you're referring to the latter? If the image is actually a jpeg ( http://www.php.net/manual/en/function.exif-imagetype.php can tell you ) then saving it as …

Member Avatar for Isaac_4
0
290
Member Avatar for justin22

Just to add about why exactly your code isn't working: 26. if ($newPassword == $conPassword) { 27. $sql = "UPDATE user SET password = '$newPassword WHERE user_id = $user_id"; 28. if($sql) 29. { 30. echo 'password successfully changed'; 31. } 32. else{ 33. 'new password and password must be the …

Member Avatar for Mike_danvers
0
194
Member Avatar for chrisschristou

You can't use anything on a session for 8 days. It'll expire as soon as the user closes the browser, or at the session expire limit. When you say the user submits a form containing title, description, and user id: How is the user id generated for temporary users? I …

Member Avatar for chrisschristou
0
1K
Member Avatar for erum.saeed.75

Make something related to your interests. A couple ideas would be a browser-based game, a social networking site, a forum... How many years have you taken and what level of experience do you need to show?

Member Avatar for pelle12
0
172
Member Avatar for Simunji

As far as emailing an attached file, this isn't the greatest of scripts but here is an example: http://www.shotdev.com/php/php-mail/php-send-email-upload-form-attachment-file/

Member Avatar for eTechZambia
0
196
Member Avatar for varunvashista

This is the relevant code that we need to see: 559.function ogluu_sendmail($to, $toName, $subject, $body) 560.{ 561. require_once(DIR_FS_INCLUDES . "phpMailer/class.phpmailer.php"); 562. 563. $mail = new PHPMailer(); 564. $mail->AddAddress($to, $toName); 565. $mail->SetFrom('support@ogluu.com', 'Ogluu'); 566. $mail->Subject = $subject; 567. $mail->Body = $body; 568. 569. $mail->IsSMTP(); 570. $mail->SMTPAuth = true; 571. $mail->Host = …

Member Avatar for varunvashista
0
616
Member Avatar for davidjennings

The open_dir and related functions are for working with a local filesystem. To access something on a remote server, you're better off looking into an FTP connection to achieve the results you're looking for. See documentation here: http://www.php.net/manual/en/book.ftp.php

Member Avatar for davidjennings
0
492
Member Avatar for davidjennings

Your notice says index1.php instead of index.php. Is this a new file you've created, or the same as index.php but just renamed?

Member Avatar for davidjennings
0
872
Member Avatar for luckyuser

Three parts to what you'll need: 1) http://us2.php.net/manual/en/function.setcookie.php to set the cookie 2) http://us2.php.net/manual/en/reserved.variables.cookies.php for reading the cookie value 3) To do a redirect from PHP you have to use header like this: `header("Location: http://" . $city . ".example.com");` Or for JS: `echo "<script type='text/javascript'>window.location.href = 'http://" . $city . …

Member Avatar for luckyuser
0
2K
Member Avatar for amit.chaudhari.71

Just to clarify, you want to print the report on the client side? You cannot print from a PHP server to a printer attached to a user's computer directly. If you want to do that you need to send the file to the user's browser with a JavaScript command `window.print()` …

Member Avatar for Lsmjudoka
0
659
Member Avatar for hemanshurpatel

GROUP BY isn't intended for use like this, it's supposed to be used with a MySQL function like COUNT() or MIN() to return information about a resultset from multiple rows. If you want everything sorted by publisher name first, then by time, you simply need to run the query ordered …

Member Avatar for Lsmjudoka
0
214
Member Avatar for shealtiel

I don't have exact numbers to Isreal but you can try speedtest.net/pingtest.net and see if you can find a server there for reference numbers. Ping from West coast to East Coast of US is ~100ms, from East Coast to Europe is another ~100ms. I have a friend who lives in …

Member Avatar for Lsmjudoka
0
202
Member Avatar for ollicadyan

To determine the level of work actually required you need to determine what pages and features you need, as the cost can range dramatically. Example you're talking about a Nutrition Information System, your requirements should include something like this: * Database containing nutritional information(calories, fat, trans fats, saturated fats, carbs, …

Member Avatar for Lsmjudoka
0
94
Member Avatar for timetraveller1992

A note about PHP_EOL, it sets the line endings to what is correct for the current server, not necessarily the client computer. Meaning if you're on a windows computer and you view a file with PHP_EOL line endings generated from a Linux server, it'll all be on the same line. …

Member Avatar for Lsmjudoka
0
259
Member Avatar for tony75

I'm not sure exactly why you have 300% width specified on your header, and 300% height specified on a couple other things - Perhaps you mean 300px? Also you use <header> <nav> and <aside>, are you intending to use those as divs? (e.g. <div id="header">)

Member Avatar for ingolfsson
0
156
Member Avatar for TIM_M_91

The problem is right now you only run the search query if the form data has been submitted, see lines 16-20: if (isset($_POST['formsubmitted'])) { 17. $hi = $_POST['hi']; 18. $result = mysql_query("SELECT * FROM birds where species='$hi' ") 19. ; 20. } And when the user clicks your link, all …

Member Avatar for diafol
0
227
Member Avatar for AAAA23

Unless the sites you want to search offer an API, you have to probably use CURL to send the request to their search form, then use a regex parser to sort out the links in the result. Or you can look into a Google custom search box.

Member Avatar for AAAA23
0
127
Member Avatar for seanboy50

The display of "Array" is a clue as to what is actually happening here: 76. foreach ($_POST as $key => $val) { 77. $message .= ucwords($key) . ": " . clean($val) . "\r\n"; 78. } The loop here loops through all the form elements and adds them to the email. …

Member Avatar for Lsmjudoka
0
2K
Member Avatar for Izzah_1

For starters I would change your email statement a bit as currently it will result in you passing a boolean variable to mysql_real_escape_string(), which isn't really what that function is intended for. Try moving it to around stripslashes like this: $email = (isset($_POST['email']) ? mysql_real_escape_string(stripslashes($_POST['email'])) : false); $password = (isset($_POST['password']) …

Member Avatar for Izzah_1
0
309
Member Avatar for david.roun.7_1

Not sure if this is exactly the issue but it appears your 3rd and 4th paramaters are backwards. See http://us3.php.net/manual/en/function.mail.php `bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )` $message should go before $headers. If you think $mrow['email'] is the …

Member Avatar for david.roun.7_1
0
173
Member Avatar for Izzah_1

At first glance nothing looks immediately wrong, what errors are you getting? One big thing for security and some functionality purposes, however, is that you're using unsanitized form data in your SQL queries. Meaning you're putting the data from $_POST straight into the query. This is a major no-no, you …

Member Avatar for Lsmjudoka
0
213
Member Avatar for Linddha

Facebook-style notifications revolve around the concept of "following" a post, which is done automatically when a user either A) Created the post, B) Likes the post, or C) Comments on the post. I'm sure there's a more efficient way to do this but the simplest I can think of is …

Member Avatar for Lsmjudoka
0
231
Member Avatar for urbanthistleuk

Assuming your connection doesn't run in config.inc you need to fill in the mysql_connect() in the above code with the variables from the file, for instance: `mysql_connect($host, $user, $password) or die(mysql_error());` Also this bit of code is backwards again: 11. $agree_date = $rows['agree_date']; 12. 13. $rows=mysql_fetch_array($result); You fundamentally cannot use …

Member Avatar for urbanthistleuk
0
285
Member Avatar for Iikeloa

When your form is method='get' any get variabhles within the action url will be overriden. What you have to do is make a hidden input field to pass it through, like so: `<input type='hidden' name='id' value='$id' />` Also in your script you really need to sanitize the form data before …

Member Avatar for Iikeloa
0
269
Member Avatar for erminasrcutp

PDO is great, but to answer the original question: The key to fetching and updating a specific set of data (For instance user #11) is exactly that, fetching the data for user #11. Usually this is done with a user_id column in your database table. What you will have to …

Member Avatar for Lsmjudoka
0
322
Member Avatar for isaac.iji.5

Given: 1) You have a column named 'friend_ids' which contains a comma-separated list of friend IDs, like so: "1378,1892,461,1781". 2) Your posts table uses user_id as a column to identify who made the post. 3) You have a local variable named $user_id that holds the id of the current user …

Member Avatar for isaac.iji.5
0
273
Member Avatar for nadiam

Yeah I believe diafol is correct. Look at your own script above: `<?php if(@$query2){echo htmlentities(@$ptotal['ptotal']);} ?>` After you run this code: $query2=mysql_query("SELECT ptotal FROM personal"); $ptotal=mysql_fetch_array($query2); The value in $ptotal is not a number, but an array containing two key/value pairs: 0 => (value of ptotal) 'ptotal' => (value of …

Member Avatar for Lsmjudoka
0
353
Member Avatar for Indians

In this code: `$tariff = mysql_query("INSERT INTO ebvouchertariffs ( TariffSlNo, TariffDate)", $link );` Where is your `$link` variable coming from? It appears you are discarding all of the values submitted via the $_POST array, or at least not using them in your database. To help you with writing a query …

Member Avatar for Lsmjudoka
0
6K
Member Avatar for yavindu

Are you looking for Pagination? Pagination is where basically if the number of rows exceeds X (for instance 30) only 30 rows will be displayed, with a link below to view the next 30 rows, and so on. Similar to how threads in this forum work.

Member Avatar for Lsmjudoka
0
130
Member Avatar for nadiam

I have to add to this that you **need** to sanitize all HTML form data before using it in a query, to prevent both accidental errors and deliberate hacking. Specifically here: $basic = $_POST['basic']; $allowance = $_POST['allowance']; Should be: $basic = mysql_real_escape_string($_POST['basic']); $allowance = mysql_real_escape_string($_POST['allowance']); Since these are number fields …

Member Avatar for Lsmjudoka
0
5K
Member Avatar for nancybrown1959

Your problem starts from not passing a valid $conn handle to your mysql_select_db function, which then causes your subsequent query to fail. This traces back to your mysql_connect() statement pzuurveen mentioned. It should look something like this: `mysql_connect($host, $user, $password) or die(mysql_error());` This way if there is any error, the …

Member Avatar for Lsmjudoka
0
432
Member Avatar for davidjennings

To access files on a remote server, your best bet is probably the FTP extension. The general filesystem functions only work with your local server/an HTTP request to a remote server, which won't give you the level of functionality you're looking for. http://php.net/ftp

Member Avatar for diafol
0
401
Member Avatar for jothimathi

Indeed your question doesn't give us a lot to work with. Perhaps you're trying to take the contents of a MySQL table and display them in an HTML table?

Member Avatar for Lsmjudoka
-1
119
Member Avatar for karen.frias0316

Poster above me has the right idea but to clarify-- Lines 1-49 in your code are only relevant if the user uploaded a file. And the problem is that in that section of code, there are four image-upload related places where the script will exit if there are any issues …

Member Avatar for karen.frias0316
0
860
Member Avatar for narasimha9

Your AJAX call is sending the request like this: 19. XMLHttpRequestObject.open("GET","getcitylist.php?state_id,city_id="+state_id,+city_id,true); It looks like you're trying to separate the variables in the URL string with a comma and then add the values after, but you need to do them individually. When you are passing paramaters via the GET method, they …

Member Avatar for diafol
0
2K
Member Avatar for strongard63

Bypassing a deactivated link of another site to get to its content would be hacking, which isn't something discussed here. If you would like to replicate this effect in a site you're developing we can provide examples of how to do this as minitauros did. In essence there are two …

Member Avatar for Nutan_1
0
100
Member Avatar for davy_yg

Why are you setting your SMTP server to Yahoo.com? If you're trying to use their mail server to send your mail then it's highly possible they're blocking it as they have external mail access blocked except for premium users I believe.

Member Avatar for davy_yg
0
409
Member Avatar for VNexus

To my knowledge CURL and mail() operate independently of each other as mail() uses whatever SMTP server is defined in your php.ini. The only way to really go about securing an email is to encrypt the contents - I haven't done this personally but it looks like the popular solution …

Member Avatar for Lsmjudoka
1
499
Member Avatar for wenbnet

Guys to expand on what <M/> was saying as it might not be clear, OP made this thread over a year ago so replies to the original query are no longer relevant.

Member Avatar for Lsmjudoka
0
259
Member Avatar for PulsarScript

There are a couple ways you can do this, both involve placing the four tables in a container. 1) Make the container as big as the screen, add `position: relative;` to it. Then on each of your tables add `position:absolute;` and use top/left/right/bottom to define their spacing from the parent …

Member Avatar for Lsmjudoka
0
81
Member Avatar for narasimha9

Your code for index.php and retrieve.php seems to be the same script. Also the link points to retrievepass.php but you don't have a file by that name listed. If you post the relevant code we can take a look.

Member Avatar for Lsmjudoka
0
140
Member Avatar for pkarovsky

Those numbers from the database are MySQL data type specifications, they have nothing to do with the HTML table display. The look of your end webpage is controlled only by HTML and CSS, which will be found in one of three locations: * Inline style attribute in the HTML tags …

Member Avatar for diafol
0
249
Member Avatar for annyangel

Also this isn't as much related to your original post but I noticed this or something similar appears in almost all your functions: $res = mysql_query($sql); mysql_query($res); I'm not entirely sure what your logic is here but this is essentially calling mysql_query() once to run an SQL query, and then …

Member Avatar for Lsmjudoka
0
214
Member Avatar for andydeans

I'm guessing the previous poster slightly misunderstood. You will have variables like $name and $address in the script, correct? And anywhere the user enters <name> you want to put $name in there? str_replace is the way to do it. [code=php] $name = "John Smith"; $raw_message = $_POST['message']; $message = str_replace("<name>", …

Member Avatar for mrhankey
0
123
Member Avatar for ritesh0104

If you're looking for the form to change without reloading the page, you need JavaScript. Go here: [url]http://www.daniweb.com/forums/forum117.html[/url] Edit: You may also find this useful: [url]http://answers.google.com/answers/threadview/id/208742.html[/url]

Member Avatar for Wailintun
0
273
Member Avatar for Jfunch

Yes, just separate further variables with & instead of ?. subcategory.php?id=1&category=drivers&type=3 Sidenote: As usual, don't forget to properly sanitize any get/post input you're using with the database =)

Member Avatar for LethargicCoder
0
201
Member Avatar for jrwin_19

You may already be thinking of this, but one idea is to make two timers. One is a PHP timer(as described above, using dates or timestamps). Two, if you want to enhance the user's experience, make a JavaScript timer [b]as well[/b], which doesn't alter the user data in any way …

Member Avatar for crammo
0
1K
Member Avatar for TheSecOrg

If you're doing form processing, e.g: user submits form from PHP1.php and PHP2.php echoes "Hello (name)", then you'll want it like this. Form on PHP1.php [code=html] <form action='PHP2.php' method='post'> Name: <input type='text' name='name' /><br /> <input type='submit' value='Submit' /> </form> [/code] Script on PHP2.php [code=php] <?php if(isset($_POST['name'])) { echo "Hello …

Member Avatar for TheSecOrg
0
753

The End.