Jump to content

yellowzm

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by yellowzm

  1. I need an Event Registration Script that allows for payment with Paypal & saves form details and Paypal transaction ID to my MySQL DB After the payment has been finalized. I want to have ppl be able to register for camp, and with that choose if they want to preorder the new camp DVD, order last camps DVD, order both DVD's or neither DVD. I am not incredible gifted with PHP since I am new so please be gentle. What do you recommend? I would like to learn a little from this process instead of buying a completed script. Thanks
  2. Thank you very much for the clear explanation. I appreciate the help.
  3. this appears to make it work properly, thanks for the help, I would still like to know why it was doing what it was. I am going to test this with more than 2 posts real quick and I'll come mark as resolved if no more problems occur.
  4. I am trying to create a way to delete old information from the db for my kids wrestling teams website that I got asked to create. so far I have managed to get everything working(some help from ppl here was needed). The code below is what I was trying to use and it doesn't quite do what I think it should. Instead of deleting the row with the selected id like it should it deletes the row that is displayed at the bottom of the page. I have change the ORDER BY from DESC to ASC and it still deletes the post listed at the bottom of the page regardless of the id. <? mysql_connect("localhost","user","pass"); mysql_select_db("teambrav_teambraves"); if(!isset($cmd)) { $result = mysql_query("select * from events"); while($r=mysql_fetch_array($result)) { $title=$r["eventtitle"]; $id=$r["id"]; echo "<a href='deletetest.php?cmd=delete&id=$id'>$title - Delete</a>"; echo "<br>"; } } if($_GET["cmd"]=="delete") { $sql = ("DELETE FROM events WHERE id=$id")or die(mysql_error()); ; $result = mysql_query($sql); echo "Row deleted!"; } ?> I am by no means dead set on using this code so If someone has a better way to do this I am open to the suggestion. but I would like to know why this is doing what it is doing. Thanks in advance for any help you can give. P.S. I am still new to PHP and MySQL so take it easy on me.
  5. Thanks for the help, I managed to get it working again. for some reason it was not working with the user name that I had added. I would not have ever figured it out w/o the code y'all helped me with.
  6. I changed the code as suggested and this is the error I get. MySQL Error: No database selected Query: SELECT eventtitle, eventbody, eventtime, eventsub, weighin, directions, DATE_FORMAT(eventdate, '%M %d, %Y') AS date FROM events WHERE eventdate >= '2009-02-15' ORDER BY eventdate ASC LIMIT 100 Thanks for the help I do appreciate it
  7. I Just signed up for hosting at hostmomster and then I uploaded my site, imported my db from the old site on yahoo, then changed all the info in my script to match my new password, db name, etc. After doing that I tried to view the page and all 3 scripts display the following errors. Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/teambrav/public_html/home.php on line 138 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/teambrav/public_html/home.php on line 164 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/teambrav/public_html/home.php on line 183 Bill from tech support said to me "you are declaring a argument for a mysql query. the argument is $result for some reason it does not apper to be properly declared" If he is correct how do I fix it? The exact same script works perfectly on our test site that I host at Yahoo so I am confused and I am really new to php and mysql. http://teambraves.org/home.php is where you can see the page for yourself. all 3 are identical but take data from different tables And here is the code: <?php mysql_connect("localhost","dbname","dbpass"); mysql_select_db("dbname"); $query ="SELECT newstitle, newsbody, newssub, postby,"; $query.=" DATE_FORMAT(postdate, '%M %d, %Y') AS date"; $query.=" FROM news ORDER BY postdate DESC LIMIT 9"; $result=mysql_query($query); while (list($newstitle,$newsbody,$newssub,$postby,$postdate,) = mysql_fetch_row($result)) { echo "<dt><b><h1>$newstitle </h1></b></dt>"; echo "<dd><b><h2>$newssub </h2></b></dd>"; echo "<dd><h4><b>Posted By: $postby;($postdate)</b></h4></dd>"; echo "<dd> </dd>"; echo "<dd>$newsbody</dd>"; } ?> Thanks for the help in advance.
  8. I figured it out, it was a very simply fix but I was doing things in the wrong order i guess. Anyway here is how I got it working <?php mysql_connect("mysql","user","pass"); mysql_select_db("braves"); $today = date('Y-m-d'); $query ="SELECT eventtitle, eventbody, eventtime, eventsub, weighin, directions,"; $query.=" DATE_FORMAT(eventdate, '%M %d, %Y') AS date"; $query.=" FROM events WHERE eventdate >= '$today' ORDER BY eventdate ASC LIMIT 5"; $result=mysql_query($query); while (list($eventtitle,$eventbody,$eventtime,$eventsub,$weighin,$directions,$eventdate,) = mysql_fetch_row($result)) { echo "<dt><b><h1>$eventtitle </h1></b></dt>"; echo "<dd><b><h2>$eventsub </h2></b></dd>"; echo "<dd><b><h3>($eventdate)</h3></b></dd>"; echo "<dd><b><h3>$eventtime</h3></b></dd>"; echo "<dd><b><h4>$weighin</h4></b></dd>"; echo "<dd> </dd>"; echo "<dd>$eventbody</dd>"; echo "<dd> </dd>"; echo "<dd>$directions</dd>"; }
  9. I am designing a website for my kids wrestling team. The team participates in several different season from several different organizations at a time and as a result we have 4-5 tournaments to choose from on some weekends and some weeks with events on several days. I have been able to get the events page working but it is not quite what i want. It will currently display all events starting with the one with the highest date, which can be several months away. That is fine for the archive page, but I want to put the same basic code on the main page of the site and have it display the events from the next week or 2 to a max of 5 events. So if someone could please assist me with this i'd be grateful. btw I am very new to PHP so please forgive my code <?php mysql_connect("mysql","user","pass"); mysql_select_db("braves"); $query ="SELECT eventtitle, eventbody, eventtime, eventsub, weighin, directions,"; $query.=" DATE_FORMAT(eventdate, '%M %d, %Y') AS date"; $query.=" FROM events ORDER BY eventdate DESC LIMIT 10000"; $result=mysql_query($query); while (list($eventtitle,$eventbody,$eventtime,$eventsub,$weighin,$directions,$eventdate,) = mysql_fetch_row($result)) { echo "<dt><b><h1>$eventtitle </h1></b></dt>"; echo "<dd><b><h2>$eventsub </h2></b></dd>"; echo "<dd><b><h3>($eventdate)</h3></b></dd>"; echo "<dd><b><h3>$eventtime</h3></b></dd>"; echo "<dd><b><h4>$weighin</h4></b></dd>"; echo "<dd> </dd>"; echo "<dd>$eventbody</dd>"; echo "<dd> </dd>"; echo "<dd>$directions</dd>"; } ?> That's the code from the archive page, it works great for me. So, How can it be modified to do what i described above? Thanks in advance for the help ~Zach
×
×
  • 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.