Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
nothings working im going to go crazy god.
sub cart_settings { $id = param('id'); $sth = $dbh->prepare("SELECT id,name,parent,description,view_cats_pro +d FROM category WHERE id = '$id'"); $sth->execute or die $dbh->errstr; ($ided,$name,$parent,$des,$view) = $sth->fetchrow_array; print qq~ <input type="hidden" name="id" value="$id"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="110" bgcolor="#CCCCCC" align="center" class="da +rktext"> Category</td> <td bgcolor="#CCCCCC" class="text"> <input type="text" name="cat" value="$name" maxlength="255"> </td> </tr> <tr> <td width="110" bgcolor="#CCCCCC" class="darktext" align=" +center"> Short Description</td> <td bgcolor="#CCCCCC" class="darktext"> <input type="text" name="des" value="$des" maxlength="25 +5"> </td> </tr> <tr> <td width="110" bgcolor="#CCCCCC" class="darktext" align=" +right"> ~; if($view eq "yes") { print qq~ <input type="checkbox" name="page" value="yes" CHECKED> ~; } else { print qq~ <input type="checkbox" name="page" value="yes"> ~; } print qq~ </td> <td bgcolor="#CCCCCC" class="darktext"> Have all of the categories products on this page </td> </tr> <tr> <td bgcolor="#CCCCCC"></td> <td bgcolor="#CCCCCC" class="darktext" align="center"><inp +ut type="submit" name="cart" value="Update Settings"></td> </tr> </table> ~; } sub cart_upsettings { $id = param('id'); if(! param('cat') || ! param('des')) { inerror("You didn't enter a category or description"); } $cat = param('cat'); $des = param('des'); if(param('page') eq "yes") { $dbh->do("UPDATE category SET name='$cat' AND view_cats_prod='yes +' AND description='$des' WHERE id='$id'") or die $dbh->errstr; } else { $dbh->do("UPDATE category SET name='$cat' AND view_cats_prod='no' + AND description='$des' WHERE id='$id'") or die $dbh->errstr; } print qq~ <p>$cat, settings has been updated</p> ~; if($id) { print "<a href=\"admin.cgi?cart=cat&id=$id\">Return to Manage Categ +ories</a>"; } else { print "<a href=\"admin.cgi?cart=cat\">Return to Manage Categories</ +a>"; } }
Theres some more info if you need it

In reply to Re: Re: Re: Re: Somethings not rightwith my MySQL do() by andrew
in thread Somethings not rightwith my MySQL do() by andrew

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-05-28 20:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found