Jump to content

Lessur

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Lessur's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. is it the servers problem?
  2. I have this code: <?php if(isset($_POST['submit'])) { $to = "Email here, blah"; $subject = "ALBUM REQUEST"; $name = $_POST['name']; $email = $_POST['email']; $add = $_POST['add']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $tel = $_POST['tel']; $body = "From: $name\n E-Mail: $email\n Address: $add\n City: $city\n State: $state\n Zip: $zip\n Tel: $tel"; mail($to, $subject, $body); echo "Thanks! Data sent to $to"; } else { echo "blarg!"; } ?> and of course I have a form for this on another page, but for some reason, even when i get the confirmation text, it just doesn't send. Why?
  3. I followed this website: http://www.webreference.com/programming/php/phpemail/index.html And i keep getting that all fields are required, even when i put data in. it is like it is not getting the data. Look at it at: http://b4ls.joolo.com/index.php If you need the code that i edited a bit just ask. Thanks.
  4. " <form .. action="?id=$id&submit='OK'" " ?  could you include it all please?
  5. Is whast you want is like an outline? I. Category 1   A. Comment 1   B. Comment 2 II. Catergory 2   A. Comment 1   B. Comment 2 ?
  6. Ok, I have an flash submission system.  You upload the flash file, along with some comments, a title, etc, it puts the information in a mySQL database, give it an id, and you can access it via view.php?id=(id here). I want to make an edit submission page, so I did the following, for editsub.php: [code]<?php   if ($_SESSION['username']){     $sql=mysql_query("SELECT * FROM `portal` ORDER BY id DESC LIMIT 0 , 200 ") or die(mysql_error());   while ($row=mysql_fetch_array($sql)){   $i++;   $id=$row['id']; //Id   $title=stripslashes($row['title']); //Title   $author=stripslashes($row['user']); //Username     $small_image=stripslashes($row['small_image']); //Small icon to go with the submission   if ($author == $username){ echo "<a href='editsub2.php?id=$id'><img src='small_images/$small_image' width='50' height='50' border='0'>&nbsp;&nbsp;$title by $author</a><br>"; } else{ echo ""; } } } else { echo "<div align='center'>You must be logged in to edit submissions!</div>"; }?>[/code] That, you access when you are logged in, generating a page with all of your submissions on it.  Now, if you may have noticed, each links to editsub2.php?id=$id . This is editsub2.php: [code]<?php if (is_numeric($_GET['id'])){ if ($_SESSION['username']){ if ($_GET['submit']){ $check=mysql_num_rows(mysql_query("SELECT * FROM `portal` WHERE id = '$id' LIMIT 1")); if ($check == 1){ $sql=mysql_query("SELECT * FROM `portal` WHERE id = '$id' LIMIT 1"); $row=mysql_fetch_array($sql); $title_show=stripslashes($row['title']); $wide_show = stripslashes($row['wide']); $high_show = stripslashes($row['high']); $title_show=stripslashes($row['title']); $author_show=stripslashes($row['user']); $desc_show=stripslashes($row['desc']); // USED TO UPDATE DATABASE $title=addslashes(strip_tags($_POST['title'])); $desc=addslashes(strip_tags($_POST['desc'])); $wide=addslashes(strip_tags($_POST['wide'])); $high=addslashes(strip_tags($_POST['high'])); $terms=addslashes(strip_tags($_POST['terms'])); if ($title == ""){ echo "Field title left blank <a href='?'>Go back?</a>"; } elseif($desc == ""){ echo "Field desccription left blank <a href='?'>Go back?</a>"; } elseif ($wide == ""){ echo "Field width left blank <a href='?'>Go back?</a>"; } elseif ($high == ""){ echo "Field height left blank <a href='?'>Go back?</a>"; } elseif (!is_numeric($wide) || !is_numeric($high)){ echo "Field width or height false <a href='?'>Go back?</a>"; } elseif ($terms == ""){ echo "You did not agree to are Terms of Use! <a href='?'>Go back?</a>"; } else{ $sql=mysql_query("UPDATE `portal` ( `title` , `desc` , `wide` , `high`) VALUES ('$title', '$desc', '$wide', '$high')"); if ($sql){ echo "Success! Submission updated!! - <a href='index.php'>Index!</a>"; } else { echo "Failed"; }[/code] I have a form on the page also, with: [code]<input name="title" type="text" id="title" value="<?php echo "$title_show"; ?>" size="20" maxlength="15">[/code] For example.  So to my understanding, this should work.  On editsub2.php it should show the $title_show in the database as the value for the textboxes, and should update the submission.  but this does not work.  It does not give the values to the textboxes, and when i click the submit button, it clicks and nothing happens. Help?
  7. Oh, for the reg file upload (that works)  I have this code: $upload = dirname(__FILE__)."/uploads/"; But for the small image one I have: $upload2 = dirname($smallimagepath); Instead should I have: $upload2 = dirname(__FILE__)."/small_images/"; ? Or what does __FILE__ do?
  8. Ok, I have come back to this topic becasue I was out of town.  The image did not exceed the max filesize.  I still don't know how to fix this.  I have tried all the above.  But when I clikc submit I get: "Error! Couldn't upload 50x50 Image!" Which is this line: [code]copy($_FILES['small_image']['tmp_name'],$upload2.$small_image) or die("<br>Error! Couldn't upload 50x50 Image! <a href='?'>Go back?</a>");[/code] Help?
  9. Lessur

    ?page=

    I want to have something like www.domain.com/?page=pagehere. For example, if I went to my domain.  It would come up on index.php.  And say I have a link to info.  I want to be able to make that link www.domain.com/?page=info.  I also have a link to flash, with, there a link to each persons flash.  I wnat to be able to say www.domain.com/?page=flash&user=usernameofuser .  How can I do such a thing?  I already have all the pages.
  10. Lessur

    ?page=

    Would that code code into my index.php (My home page.)  or Shoudl I make that code index.php and the old index.php index2.php?  Hehe, sorry but Im a newb when it comes to php  :'(
  11. Lessur

    ?page=

    [quote author=businessman332211 link=topic=102191.msg405273#msg405273 date=1154109356] [code]?page=flash[/code] That simply means as I states the ? ends the actual url information and starts the variables the variable page is set to teh word flash $page = flash; is how you would do it, or how it would look in php. this probably tells a redirecting page to send it to the flash version of the site, or could be for something else, or something used in the script to decide whether to activate flash or not.  Could be many reasons. [/quote] So basically, in another page there is $page = flash; ?  And when you say www.blah.com/?page=flash it goes to the page that has $page = flash;  in it?
  12. Lessur

    ?page=

    I dont really understand.  I am talking about for example a site like http://thesmurk.net/.  When you click on "Flash" for example the new address is http://thesmurk.net/?page=flash
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.