Philip
Staff Alumni-
Posts
4,665 -
Joined
-
Last visited
-
Days Won
20
Everything posted by Philip
-
You have echo "$formcode"; it should be echo $formcode;
-
It is not here because they just upgraded the forum. One of the mods should be working on making it work with the upgrade ;)
-
You could always try session_register(); before hand. Sometimes it helps. [quote]My script works on everyones server so far except one person.[/quote] What is that one person running? What PHP settings?
-
Cingular has no roaming :D (at least on my plan)
-
[quote author=emehrkay link=topic=122662.msg506631#msg506631 date=1169005555] but so was that 100 dollar laptop that i wasnt able to get on black firday from circuit city [/quote] I wish there were more Black Fridays.... sigh.
-
I think he was talking about CV's smoke signal idea ;)
-
You need session_start(); at the top of your page.
-
TigerDirect.com and Newegg.com are very trustworthy. I think pretty much anybody here that's bought from them can testify that.
-
You are using too many colors with the link color. You have a green top, and overall color scheme, with orange accents isn't bad. However, I noticed that the orange links, the hover over color needs to change to something else. That dark blue doesn't really look good. Agreed with Latest Advertisements, hope that gets fixed. The links under that, not only should the hover over color be changed, but I think it would look better if it was bold.
-
Yeah, I really don't like the light bulb either, and the text that you have below (Recent Projects) the blue needs to be a little darker.
-
Well, it's missing IEEE 1394 cable linkage... And that reset button seems like it would be really easy to accidentally hit. And man, that's a lot of RAM :P WHEW, we'll be blazin' fast! However, I like the idea, it would come in handy for a lot of places, especially like help desks and such. :)
-
Yeah, it's really not that bad at all. I don't pay much
-
Hmm, okay. Makes sense... kinda. I guess I'll have to see if my calc teacher can get it. He can do crazy things in his head. And btw, - Someone posts a Simple - Intermediate PHP challenge. IS one of the rules... but I don't think you broke it, the PHP isn't hard... its the math getting to the PHP that is :P Nice workaround for the rules :P
-
I [b]think[/b] understand what you're saying Barand, however, did you write the Sigma in the correctly on the right side? Should it be 2 * (a[sub]n-1[/sub]10[sup]n[/sup] + a[sub]n-2[/sub]10[sup]n-1[/sup] + ... + a[sub]0[/sub]10 + a[sub]-1[/sub]) ? I dunno, I'm only in high school Calculus, but I'm afraid I'm trying to over-complicate it. However, I must admit, it does look like some tangent function, at least from what I could tell from looking at all the numbers. Asymptotes are at x=0 and x=5. Am I on the right path?
-
Ahh ookay Don't use <?php echo $hash;?> because you're already running PHP, and you are nestling php tags inside another one. try: [code]<?php $to = "$email"; $subj = "test"; $mess = "<html>\n" ."<head>\n" ."<title>Test Mail</title>\n" ."</head>\n" ."<body>\n" ."This is an html email test<br />\n" ."<p><b>Your order has been processed. Please click on the link to download your purchase</b></p>\n" ."<p><a href='http://www.xxxx.com/e_cart8/pick_up.php?pur_id=". $hash."'Download Your Purchase ".$hash."</a></p>\n" ."</body>\n</html>\n"; $mess = wordwrap($mess,70); ?>[/code]
-
Please post what it outputs: [code]<?php include('incl_db.php'); include('function.inc'); if ($_POST['Submit']) { echo "Submit - OK<Br />"; //delete after debugging $connection = mysql_connect($host, $user, $password) or die ("Couldn't connect to the server."); // Connect $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); $table_id = Trim(stripslashes($_POST['table_id'])); //Set variables $company = Trim(stripslashes($_POST['company'])); $amt_tix = Trim(stripslashes($_POST['amt_tickets'])); $comments = Trim(stripslashes($_POST['comments'])); $sql = "SELECT * FROM `Table` WHERE `table_id`='".$table_id."'"; // SQL statement - select all from table where the table id matchs the inputted one $result = mysql_query($sql) or die("could not execute! ".mysql_error()); $num = mysql_num_rows($result); // If any matches... if($num > 0) { echo "That table has already been reserved.)"; // tell the user that is has been taken include ("reservetable_form.inc"); //show form exit; // exit script } else { $sql2 = "INSERT INTO `Table` ( `table_id` ,`company` , `table_amt` , `comments` ) VALUES ('".$table_id."' , '".$company."', '".$amt_tix."', '".$comments."')"; //SQL statement for inserting into the DB echo $sql2." SQL - OK<br />"; // delete after done debugging $result2 = mysql_query($sql2) or die("Couldn't execute query. ".mysql_error()); //header("Location: index.php"); // Go back to index -- uncomment when done debugging } } else { include('reservetable_form.inc');//show form if it has not been submitted } ?>[/code]
-
You don't need the single quotes and you need you have echo <?php echo $hash;?> <- replace that into both php statements you have in your link.
-
Well, you need to assign a name to each value of the array. firstname => $_POST['firstname'], lastname => $_POST['lastname'] ... etc.
-
How to remove number of record limit in MySQL? - urgent solution needed!
Philip replied to LeeVee's topic in PHP Coding Help
Trying looking around on your host's FAQ and such. -
How to remove number of record limit in MySQL? - urgent solution needed!
Philip replied to LeeVee's topic in PHP Coding Help
Does your host have a limit on Database sizes? (not just number of rows, but physical size (.5MB or something)) -
Do you know how to use CRON jobs?
-
$errorhandler .= $k . "was left blank, please correct this.<br />"; Notice the Space missing after the "? Should be this: $errorhandler .= $k . " was left blank, please correct this.<br />";
-
Array name/position 0 (zero) was left blank. You didn't leave a space between the variable and the statement.
-
[code]<?php $con = mysql_connect("-","-","-"); if (!$con) { die('Error: ' . mysql_error()); } mysql_select_db("members", $con); if (isset($_GET['id'])) { $sql="SELECT * FROM basic WHERE id='".$_GET[id]."'"; $result=mysql_query($sql); $num=mysql_numrows($result); if ($result = mysql_query($sql)) { $i=0; while ($i < $num) { $i++; } else { echo "No results found matching ".$_GET['id']; } } else { mysql_error(); } } $user=mysql_result($result,$i,"username"); $date=mysql_result($result,$i,"date"); mysql_close($con) ?> Username: <?php echo $user ?> <br> Date Joined: <?php echo $date ?>[/code] Just some minor tweaks to your code. However, here's my way of doing it, it's a little cleaner: [code]<?php $con = mysql_connect("-","-","-") or die('Error: <br />'. mysql_error()); mysql_select_db("members", $con) or die('Error: <br />'. mysql_error()); if (isset($_GET['id'])) { $sql = "SELECT * FROM `basic` WHERE `id`='".$_GET[id]."'"; $result = mysql_query($sql) or die('Error: '.mysql_error()); $num = mysql_num_rows($result); if($num == 0) { echo "No results found matching ".$_GET['id']; } else { $array = mysql_fetch_array($result); echo "Username: ".$user; echo "<br>" echo "Date Joined: ".$date; } } else { echo "No ID!"; } ?>[/code]
-
is it possible to display data from 2 tables
Philip replied to Rother2005's topic in PHP Coding Help
look at MySQL's JOIN function http://dev.mysql.com/doc/refman/5.0/en/join.html