231 Posted Topics

Member Avatar for Roriomphe

Okay, the correct way to do this will depend on what your form action and method are set to do. If you could post your form code I should be able to help.

Member Avatar for cossay
0
125
Member Avatar for chris evans

You shouldn't need a template to do this! Just look at the CSS. The easiest way to do this is to create a <div> tag that wraps around all your content, then specify the width of it using CSS. [CODE] <html> <head> <style type="text/css"> container { width: 100%; } </style> …

Member Avatar for nonshatter
0
91
Member Avatar for Venugopal Ravi

If you are using Linux, you can set up a cron job. The cron daemon provides the ability for a system administrator or any other user (if permitted to do so) to automate the routine running of scripts, tasks or any other server function on a regular basis. You can …

Member Avatar for nonshatter
0
214
Member Avatar for Joe34

So what's the error you're getting? Try this and report back with the error message: [CODE] $Query = mysql_query("INSERT INTO products (title, url, finalurl, category, owner, shortdescription, longdescription, price, rank, tag1, tag2, tag3) VALUES ('$Title','$Random_Number','$url','$Category','$Username','$SD','$LD','$Price','0','$Tag1','$Tag2','$Tag3')") or die(mysql_error()); echo "Yes! Your product was created I hope " . $Title . " …

Member Avatar for nonshatter
0
168
Member Avatar for stephen_UK

You get this error message because you're trying to retrieve $_GET['start'] from the URL when it doesn't exist. Why not check whether the variable exists before deciding what to do with its value. E.g. [CODE] <?php if (isset($_GET['start'])) { $start = $_GET['start']; } else { $start = 0; } ?> …

Member Avatar for stephen_UK
0
94
Member Avatar for cossay

I developed an online auction website for my final yr project. It's a pretty good project to do - lots of potential for interactive and business-like features. And to add to that - in my opinion, for a final year project it shouldn't really matter if a jQuery feature doesn't …

Member Avatar for diafol
0
126
Member Avatar for nonshatter

Hi all, How can I execute an external program (wget) on a linux box? I assume I should be using exec() or something similar. The command I'm trying to execute is: [CODE]wget -p 'x.x.x.x/inventory.ssi?mag_0=1&mag_1=1'[/CODE] Which returns the html page of inventory. I am then parsing the file using DOMDocument to …

Member Avatar for nonshatter
0
134
Member Avatar for mrlol

Have a look at the BETWEEN function in MySQL. You could try this, although I really don't know whether it will work in the format you're using. Worth a try though [CODE]("SELECT * FROM mytable WHERE date BETWEEN '12-10-2010' AND '12-10-2010'");[/CODE]

Member Avatar for Dragonbaki
0
11K
Member Avatar for nonshatter

Okay, I've been racking my brain trying to figure this one out but the more I try, the more I get stuck. I need to construct a multi-dimensional array as follows, so for each iteration there are 4 values added to the array. (there is a total of 6 iterations, …

Member Avatar for nonshatter
0
105
Member Avatar for nonshatter

Hi all, I'm trying to figure out how to stop MySQL errors being displayed to the user. I have turned off all the necessary options in php.ini such as [CODE]display_errors = Off log_errors = On error_log = /path/to/log/[/CODE] I have even tried to override these settings using ini_set() in my …

Member Avatar for somedude3488
0
247
Member Avatar for shenbagam
Member Avatar for designershiv

You can still use the $_GET method to grab variables from your URL using form method="post", but you'd have to append the Id variable to the form action like this: [CODE]<form action="<?php 'process.php?id=$id' ?>" method="post">[/CODE] (that's if you're actually using a form, you haven't stated whether you are). Can you …

Member Avatar for nonshatter
0
491
Member Avatar for gunnarflax

I *think* in this case they will be two copies of the same value. You could probably check for definite if you use the PHP debugger in Linux CLI.

Member Avatar for gunnarflax
0
101
Member Avatar for pearll

Using <center> is deprecated since HTML 4.0. You should use CSS to control the styles: [CODE] <style type="text/css"> td.tdcenter { text-align:center; padding: 2px; } </style> <tr> <td class="td_center"> <input type="button" class="btn" value="New" name="New" onClick="window.location.href='new2.php'" onMouseOver="hov(this,'btn btnhov')" onMouseOut="hov(this,'btn')" align="absmiddle"> &nbsp; <input type="submit" value="Delete" name="delete" class="btn" onMouseOver="hov(this,'btn btnhov')" onMouseOut="hov(this,'btn')" ></td> </tr> [/CODE]

Member Avatar for nonshatter
0
86
Member Avatar for rajesh1158

Personally, I wouldn't rely on updating your database to determine this. Precisely for the reason you just mentioned and it isn't necessary. Have a read of this chapter of the php manual to see what fits your bill [url]http://www.php.net/manual/en/features.http-auth.php[/url]

Member Avatar for nonshatter
0
117
Member Avatar for Awah Mohamed

I don't fully understand what you're asking. But PHP is a server-side language - Meaning that any request by the client must be sent to the server so PHP can process it. You can process form data on the same page by using the $_SERVER global, as long as it …

Member Avatar for Sorcher
0
100
Member Avatar for kaycee3x

I've never come across that message before but what Firefox is telling you is that the site is redirecting you in a loop E.g. Page A sends you to Page B which sends you to Page A. An alternative is to install Google Chrome and see if you get a …

Member Avatar for kaycee3x
0
276
Member Avatar for trilithon

So $testname is going to be your array right? Try: [CODE]$testname[] = "|".$row['full_path']."|";[/CODE] Then you could use a foreach() to loop through the array and apply the explode() function

Member Avatar for trilithon
0
172
Member Avatar for programmer12

You can use Javascript inside a php function to control your redirects. [CODE] <?php redirect("www.redirecting.com/page.php"); function redirect($url) { ?> <script type="text/javascript"> window.location = "<?php echo $url ?>" </script> <?php } ?>[/CODE]

Member Avatar for ofus
0
137
Member Avatar for andrewliu

You can use another regular expression to decide whether to allow/deny the email address. [CODE](\.([a-z]{3})$)[/CODE] I'm no expert on these, but *I think* this will match ".com" at the end of the email address, so you'll need to work on how to match the sub-domains that you want to allow …

Member Avatar for andrewliu
0
151
Member Avatar for nonshatter

Hi all, I have virtually no knowledge of C, but I have a problem with one of my scripts. It runs fine on a 64-bit Linux machine, yet it gives me a seg fault when run on 32-bit linux. gdb tells me that the seg fault occurs on line 314. …

Member Avatar for mitrmkar
0
116
Member Avatar for CanadianGSX

Try re-writting your query so that it looks something like this: [CODE] $insert = mysql_query("INSERT INTO info (field1,field2,field3) VALUES ('$fname','$lname','$note')") or die(mysql_error()); [/CODE] (replacing <field1><field2> etc with the names of the corresponding columns in your database)

Member Avatar for CanadianGSX
0
291
Member Avatar for terabyte

You can use strlen() to check this. [CODE] if(strlen($x) ==0) { echo "X is blank"; } [/CODE]

Member Avatar for terabyte
0
172
Member Avatar for Kniggles

You can break out of the php tags to make it a bit more manageable: [CODE] <td><a class="mylink" href="<?php 'www.'.$row['website']; ?>"> <?php echo "www.$row['website']" ?></a></td> [/CODE] You'll also need an image link for the thumbnail... [CODE]<td> <img src="/path/of/image" alt="image description" href="<?php $row['url'] ?>" height="78px" width="78px"></td>[/CODE] This prints "www.outputsite.com" and the …

Member Avatar for Kniggles
0
223
Member Avatar for yanoli

Your coding was slightly incorrect. Your input field AND your submit button have the same names (name="submitcost"). This works: [CODE] <?php if (isset($_POST['submit'])) { $price = $_POST['submitcost']; echo $price ."<br>"; echo "it works"; } ?> <form name="unitcost" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input ID="submitcost" name="submitcost" size="21" maxlength="20" VALUE=""> &nbsp; <input …

Member Avatar for nonshatter
0
6K
Member Avatar for gunderjj

[CODE]$result = mysql_query ("select Name from dba.wx_faq_backup group by Name") or die (mysql_error()); echo "<select name='DB_Backup' value=''>Database Backup</option>"; $i=1; while($nt=mysql_fetch_assoc($result)) { echo "<option selected value='$i' > $nt[Name] </option>"."<BR>"; $i++; } echo "</select>"; [/CODE] Before, you were populating the value of the selection, rather than the actual selection option. You may …

Member Avatar for gunderjj
0
74
Member Avatar for feoperro

Personally, I find IDEs to be a waste of time. I just stick to the good old fashioned Notepad++ for windows, or gedit/kate for linux Here's a list you can look at though [url]http://www.ibm.com/developerworks/opensource/library/os-php-ide/index.html[/url] (Eclipse seems to be a popular one)

Member Avatar for feoperro
0
83
Member Avatar for hassancool

Hi there, All Linux distros have some differences... But essentially, they all perform the same operations, albeit with slight desktop and/or command-line variations. CentOS is a good, (free) RedHat-based distro, whereas Fedora is based on a debian system. When I first began using Linux I used Ubuntu (another debian based …

Member Avatar for hassancool
0
260
Member Avatar for daffi_gusti

This should get you started... It permutes the string, working out each combination. But it only works out combinations with the same amount of characters of the input string. E.g. The 4 letter string "abcd" returns the following 4 letter combinations: abcd abdc acbd acdb adcb adbc bacd badc bcad …

Member Avatar for monica singh
0
148
Member Avatar for avinash_545

Looks like there's a few bugs in there... 1. You have commented out the filename so you're pointing to just 'a'. Not sure what you're trying to do here... This makes no sense! Also, you're trying to write three lines of code on one line... You should concatenate these lines …

Member Avatar for avinash_545
0
211
Member Avatar for vibhaJ

[QUOTE]Do i need to mount? Do i need to repartition?[/QUOTE] I'm not sure what exactly you're trying to do here... All you need for users to connect is a correct network set up with the correct services running. You could mount the VM disk over the network as well if …

Member Avatar for nonshatter
0
90
Member Avatar for changeco

you could create a loop and counter to count the number of users... [CODE] $sql = "SELECT COUNT(CDID) AS total FROM rtnUser GROUP BY CDID"; $query = mysql_query($sql); $count=0; while ($recordset = mysql_fetch_assoc($query)) { $count++; } echo "$count"; [/CODE]

Member Avatar for changeco
0
165
Member Avatar for nonshatter

Hi all, I'm relatively new to Perl and particularly new to regular expressions. This is really simple script I've just mocked up. All it does is to take the input string and check if it's in the correct format or not. Here are some examples of correct format (will always …

Member Avatar for k_manimuthu
0
197
Member Avatar for prvnkmr449

Sounds like a driver issue. Have you checked whether your hardware is supported on Ubuntu? I had the same problem with a Netgear wireless dongle. Have you using a wired connection?

Member Avatar for suntom
0
173
Member Avatar for fsl4faisal

I did an Online Auction website for my first PHP project. It took about 8 weeks of hard work. Depends on how much time you have I guess...

Member Avatar for xinam
-1
112
Member Avatar for stonest123

Why not put your function(s) in a seperate file, and include that file as you need it File1.php [CODE] function stuff() { // do some stuff... } [/CODE] File2.php [CODE] include('File1.php'); $location=stuff(); echo $location; [/CODE]

Member Avatar for stonest123
0
2K
Member Avatar for nyler01

I've never used access, but you should be able to do the processing using PHP First, convert to returned datetime variable to a unix timestamp Then apply the date() function to display just the bits you want. [CODE] $date=odbc_result($query); $convert_date = strtotime($date); $formatted_date = date("Y-m-d", $convert_date); echo $formatted_date; [/CODE] Should …

Member Avatar for nonshatter
0
87
Member Avatar for ruwanaru
Member Avatar for sameeya007

[CODE] for ($i=0;$i<=$x;$i++) { $query = mysql_query("select amount_id from payment where admission_no='$admission_no[$i]'") or die (mysql_error()); }[/CODE] You do not need to concatenate the query/variable. Just put single quotes around the variable you're inputting

Member Avatar for nonshatter
0
48
Member Avatar for debasishgang7

I would suggest staying away from Iframes as many browsers don't have good support for them. Instead I would recommend using html <div> tags to display each 'section'. Then each topic has a hyperlink that references content.php with an added topic variable. Eg: [CODE] Topics: <a href="content.php?topic=12">Global Warming</a> <a href="content.php?topic=13">Child …

Member Avatar for hielo
0
196
Member Avatar for shrikant12

First of all, you won't be inserting an actual image into mysql. You will upload the image into a folder on your server, then MySQL will provide a link or path to that location, so the image can be displayed. You'll need a column in your database called 'image' and …

Member Avatar for nonshatter
0
92
Member Avatar for quibbie

[CODE]<textarea value="<?php echo $_POST["article_summary"] ?>"></textarea>[/CODE] Maybe something along the lines of this? Although I'm not sure that will work edit: yeah, that definately doesn't work... ... text areas don't allow their content to be formatted differently. So I really don't know if it is possible to display a link like …

Member Avatar for quibbie
0
160
Member Avatar for programmer12

Actually, mysql_fetch_array can return a result row as an associative array, a numeric array, or both! [url]http://php.net/manual/en/function.mysql-fetch-array.php[/url] Although I usually use mysql_fetch_assoc() as it's easier to determine the result resource. Are you receiving any errors? Instead of this: [CODE]$query = "SELECT * FROM lgmsevze_sunbrite.webtemps LIMIT 0, 2"; $sql = mysql_query($query);[/CODE] …

Member Avatar for programmer12
0
85
Member Avatar for Agent Cosmic
Member Avatar for facarroll

You could use CSS display:none; or in HTML: <style="display:none;"> tag if you simply want to hide the image. I expect you're using a submit button to remove the image? [CODE] <?php if(isset($_POST['remove'])) { ?> <div id="image" style="display:none;"> //image here </div> <?php } else { ?> <div id="image"> //image here </div> …

Member Avatar for nonshatter
0
2K
Member Avatar for fredrickprem

If you want to use smarty for documentation, then you can use a tool called phpdocumentor. [url]http://www.phpdoc.org/[/url]

Member Avatar for pritaeas
0
72
Member Avatar for BzzBee

Can you give us some examples of the characters you're trying to display? Try: [CODE]<meta http-equiv="content-type" content="text/html; charset=windows-1251" />[/CODE]

Member Avatar for BzzBee
0
3K
Member Avatar for gazza7

Not exactly sure about this, but it could be because your search input field is saved as a variable. When you navigate to the next page, the variable is lost. You may be able to save the input text in a session, so it is available across all pages of …

Member Avatar for gazza7
0
197
Member Avatar for kesh1000

[CODE] <?php if ($Valid == 0) { echo 'Incomplete Data, Redirecting...'; Redirect("QuoteAgeError.html"); } /** * JavaScript Redirect Function - Redirects the user should the result data be empty * @param string $url the dynamic url to redirect to */ function Redirect($url) { ?> <script type="text/javascript"> window.location = "<?php echo $url …

Member Avatar for nonshatter
0
81
Member Avatar for suhnako

You will need to define the requirements for the system before that question can be answered. There is no set language for a particular type of project. It is down to you to recognise what is needed, what are the inputs and outputs, how will the users interact with the …

Member Avatar for theausum
0
92

The End.