-
Posts
237 -
Joined
-
Last visited
Everything posted by ozestretch
-
value="" with inputs will make that the value, the actual data in the field itself. with textarea, the value is the data within <textarea> this is the data which is the value </textarea> name="" is what is used when 'identifying', the key, of each value. (I am no good at explaining ) so where <input type=text" name="email" value="me@ohmy.com" /> or what value is entered by the user you would retrieve it on your process form with $email = $_POST['email]; <-- where ['this value=the name of the field'], assuming the method used in the form was method="POST" I stop now, I confusing me
-
ermmm, sorry for not seeing this before, I will let you add this (some homework ) no names given to form fields.... <div id="content"> <div class="bg-cont png"> <div class="indent-main"> <div class="container"> <div class="col-1"> <div class="box"> <form action="contact.php" method="POST" id="form2"> <div class="indent-box"> <img alt="" src="images/6page_title1.gif" class="title1" /><br /> <div class="h1"><input type="text" class="input1" name="Name" value="Name: " /></div> <div class="h1"><input type="text" class="input1" name="E-Mail" value="E-Mail: " /></div> <div class="h1"><input type="text" class="input1" name="Phone" value="Phone:" /></div> <div class="h1"><input type="text" class="input1" name="State" value="State:" /></div> <textarea rows="40" class="textarea" cols="30" name="Message">Message:</textarea><br /> <input type="reset" value="reset" /> <input type="submit" value="submit" /> <div class="clear"></div> </div> </form> </div>
-
I heard of joomla, never looked at it. can your server read php within a .js if so, session?
-
Have you defined $s a string if (empty($s)) { $s=0; }
-
<?php $subject = 'Tour'; $name = $_POST['Name']; $email = $_POST['E-Mail']; $phone = $_POST['Phone']; $state = $_POST['State']; $message = "Name: $name\r\n"; $message.= "Email: $email\r\n"; $message.= "Phone: ".$_POST['Phone']."\r\n"; $message.= "State: ".$_POST['State']."\r\n"; $message.= "Message: ".$_POST['Message']."\r\n"; $to = "gilbylu@gmail.com"; $headers = "From: ".$name."<".$email.">\r\n"; if(!mail($to,$subject,$message,$headers)){ $err = 'Message Not Sent.'; }else{ $err = 'Message Sent Succesfully.'; } ?> <html> <head> <title> Contact - Message Sent</title> <body> <?php echo $err; ?> </body> </html>
-
Can't fetch a certain data in mysql for some reason.
ozestretch replied to dezkit's topic in PHP Coding Help
KK, Except my daughter needs me to get her from school... may be some hours before I get a look again... if someone else takes a looksie in the mean time, else give me a while -
Subject is not defined.. well you need to make it defined with what you want anyways. <?php $subject = 'Now the email has a subject'; // edit with own subject line next, blank message case sensitive perhaps! <?php $message = $_POST['Message']."\r\n"; // change to lowercase and remove $message=''; //$message = ""; remove this, now the message will be in the email before the other details of the contact form want a from? add headers. <?php $headers = "From: ".$name."<".$email.">\r\n"; mail($to,$subject,$message,$headers); // add $headers into mail function ?>
-
Can't fetch a certain data in mysql for some reason.
ozestretch replied to dezkit's topic in PHP Coding Help
Wasn't meant as a 1 line solution, sorry. The foreach will need to be rewritten to suit the array, can you post the new code used with the altered array? Someone with more array experience may have a better solution for the structure of the array also? -
Can't fetch a certain data in mysql for some reason.
ozestretch replied to dezkit's topic in PHP Coding Help
Me and typos are like this >< $nicks[][$row['nickname']][$row['admintype']]=$row['server_id']; -
When you say 'nothing happens', are you implying the page does not load same data, just simply is a null link? Or the page loads with that link click, but displays the same results?
-
Can't fetch a certain data in mysql for some reason.
ozestretch replied to dezkit's topic in PHP Coding Help
DavidAM is right, where you have $admintype = $row['admintype'], means it is not defined out of the while loop. Maybe alter your array in the sql query to contain admin id? $nicks[][$row['nickname'][$row['admintype']]=$row['server_id']; -
Are you trying to debug a script by viewing all the actual queries or display the amount of total queries ran on that page? Like the footer of www.phpfreaks.com
-
For public searches, I agree. Makes it easy for bookmarking / crawling etc. Either way... with little/no code, our diagnosis will only be assumptive and limited.
-
After looking again, I can't see why the whitespace/header already outputted error persists in this situation except I just went to get the code, and that HDD is not plugged in (just spent last 5 hours fixing a MBR / NTLDR error) well spent 30 minutes fixing, 4 1/2 hours working out the what / why and how's :'( In my code above, should that cause header already outputted notice? (my actual code in page2.php contains more than that header redirect but I can't see how that causes the error when at page1.php) but when testing with redirecting to page1.php (like I have above) it outputs notice.
-
can we see index.php on line 102 (and maybe some other code before / after it?)
-
Just on that one, make sure they update it on a regular basis, their site looks like it is aimed at being current in 2006.... that is old school in technology
-
The tutorial you are working from seems to be old, and relies on globals being on several things; $search needs to be assigned (and validated) <?php $search = mysql_escape_string($_POST['search']); // assuming it is used in a database query another thing, you could post the rest of the code to make sure we are assuming correct
-
Maybe set each song into an array, not placing NULL entries obviously, then run foreach statement to update songlist, leaving the last entries remaining of the 20, if any exist, to update as NULL?
-
Could try in the sql forum
-
What are the issues with setting up something like this? page1.php <?php header('Location: http://www.phpfreaks.com/'); // meta refresh, html link down here as backup ?> page2.php <?php header('Location: page1.php'); // meta refresh, html link down here as backup ?> I realise that by itself seems usless. But what if page1.php is on a different domain, that happens to be a redirect page and I only control the page2.php Scenario: URL mask(shortner) script I have on site A uses header('Location: ....') plus a backup of meta refresh and an actual link just incase But a URL gets shortened that is redirected similarly I get a header output message for a moment when I do this, but meta kicks in and takes it to 'http://www.phpfreaks.com/' anyways
-
$tc = imagecolorallocate($im,255,255,255); is that setting the background.. the image, to white? Just stabbing away till someone else can fix ya up.
-
sleep() may, was vague on what "not show some html content to user" actually means If he still wants to display content, but only to selected users, then some form of authentication is required, if he wants to simply <?php echo '<div>here is some html to output</div>'; function here_is_some_code_to_run($aussie_chicks){ if($aussie_chicks != 'Hot'){ return false; }else{ return true; } } $blonde6footandbusty = here_is_some_code_to_run('Over Wieght Midget Monkey'); if(!$blonde6footandbusty){ require_once('a_bullet_to_the_head.php'); } echo '<div>here is some continued html to out put</div>'; ?> Then he has the right idea
-
Sorry, just seen that in your code (I am not good with image manipulation). While we wait for a more knowledged response... you are not using IE6 right? That has a png/transparent deficiency that requires hacking
-
So you want to output html, then run some code, then output more html?